<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Google Storage setup: JSON parse exception in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/google-storage-setup-json-parse-exception/m-p/327154#M14155</link>
    <description>&lt;P&gt;Does the JSON have to be put directly into the config file like that? I thought that &lt;CODE&gt;nuxeo.gcp.credentials&lt;/CODE&gt; was supposed to point to the file that contains the JSON.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Mar 2020 22:40:51 GMT</pubDate>
    <dc:creator>Sean_Hagen</dc:creator>
    <dc:date>2020-03-24T22:40:51Z</dc:date>
    <item>
      <title>Google Storage setup: JSON parse exception</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/google-storage-setup-json-parse-exception/m-p/327152#M14153</link>
      <description>&lt;P&gt;Trying to get Google Storage set up for assets, and when nuxeo starts this is the error message I get:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Caused by: org.nuxeo.ecm.core.api.NuxeoException: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('/' (code 47)): maybe a (non-standard) comment? (not recognized as one since Feature 'ALLOW_COMMENTS' not enabled for parser)
 at [Source: (ByteArrayInputStream); line: 1, column: 2]
        at org.nuxeo.ecm.core.storage.gcp.GoogleStorageBinaryManager.setupCloudClient(GoogleStorageBinaryManager.java:125) ~[nuxeo-core-binarymanager-gcp-10.10-HF12.jar:?]
        at org.nuxeo.ecm.blob.AbstractCloudBinaryManager.initialize(AbstractCloudBinaryManager.java:122) ~[nuxeo-core-binarymanager-common-10.10-HF12.jar:?]
        at org.nuxeo.ecm.core.blob.BlobManagerComponent.getBlobProvider(BlobManagerComponent.java:191) ~[nuxeo-core-api-10.10.jar:?]
        at org.nuxeo.ecm.core.blob.BlobManagerComponent.getBlobProviderWithNamespace(BlobManagerComponent.java:202) ~[nuxeo-core-api-10.10.jar:?]
        at org.nuxeo.ecm.core.transientstore.keyvalueblob.KeyValueBlobTransientStore.getBlobProvider(KeyValueBlobTransientStore.java:180) ~[nuxeo-core-cache-10.10.jar:?]
        at org.nuxeo.ecm.core.transientstore.keyvalueblob.KeyValueBlobTransientStore.doGC(KeyValueBlobTransientStore.java:239) ~[nuxeo-core-cache-10.10.jar:?]
        at java.util.HashMap$Values.forEach(HashMap.java:976) ~[?:?]
        at org.nuxeo.ecm.core.transientstore.TransientStorageComponent.doGC(TransientStorageComponent.java:98) ~[nuxeo-core-cache-10.10.jar:?]
        at org.nuxeo.ecm.core.transientstore.TransiantStorageGCWork.work(TransiantStorageGCWork.java:41) ~[nuxeo-core-cache-10.10.jar:?]
        at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:437) ~[nuxeo-core-event-10.10.jar:?]
        at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:357) ~[nuxeo-core-event-10.10.jar:?]
        ... 4 more
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('/' (code 47)): maybe a (non-standard) comment? (not recognized as one since Feature 'ALLOW_COMMENTS' not enabled for parser)
 at [Source: (ByteArrayInputStream); line: 1, column: 2]
        at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804) ~[jackson-core-2.9.8.jar:2.9.8]
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:693) ~[jackson-core-2.9.8.jar:2.9.8]
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:591) ~[jackson-core-2.9.8.jar:2.9.8]
        at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._skipComment(UTF8StreamJsonParser.java:3104) ~[jackson-core-2.9.8.jar:2.9.8]
        at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._skipWSOrEnd2(UTF8StreamJsonParser.java:2984) ~[jackson-core-2.9.8.jar:2.9.8]
        at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._skipWSOrEnd(UTF8StreamJsonParser.java:2940) ~[jackson-core-2.9.8.jar:2.9.8]
        at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:691) ~[jackson-core-2.9.8.jar:2.9.8]
        at com.google.api.client.json.jackson2.JacksonParser.nextToken(JacksonParser.java:55) ~[google-http-client-jackson2-1.19.0.jar:1.19.0]
        at com.google.api.client.json.JsonParser.startParsing(JsonParser.java:220) ~[google-http-client-1.19.0.jar:1.19.0]
        at com.google.api.client.json.JsonParser.parse(JsonParser.java:379) ~[google-http-client-1.19.0.jar:1.19.0]
        at com.google.api.client.json.JsonParser.parse(JsonParser.java:354) ~[google-http-client-1.19.0.jar:1.19.0]
        at com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:87) ~[google-http-client-1.19.0.jar:1.19.0]
        at com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:81) ~[google-http-client-1.19.0.jar:1.19.0]
        at com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:151) ~[google-auth-library-oauth2-http-0.15.0.jar:?]
        at com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:129) ~[google-auth-library-oauth2-http-0.15.0.jar:?]
        at org.nuxeo.ecm.core.storage.gcp.GoogleStorageBinaryManager.setupCloudClient(GoogleStorageBinaryManager.java:98) ~[nuxeo-core-binarymanager-gcp-10.10-HF12.jar:?]
        at org.nuxeo.ecm.blob.AbstractCloudBinaryManager.initialize(AbstractCloudBinaryManager.java:122) ~[nuxeo-core-binarymanager-common-10.10-HF12.jar:?]
        at org.nuxeo.ecm.core.blob.BlobManagerComponent.getBlobProvider(BlobManagerComponent.java:191) ~[nuxeo-core-api-10.10.jar:?]
        at org.nuxeo.ecm.core.blob.BlobManagerComponent.getBlobProviderWithNamespace(BlobManagerComponent.java:202) ~[nuxeo-core-api-10.10.jar:?]
        at org.nuxeo.ecm.core.transientstore.keyvalueblob.KeyValueBlobTransientStore.getBlobProvider(KeyValueBlobTransientStore.java:180) ~[nuxeo-core-cache-10.10.jar:?]
        at org.nuxeo.ecm.core.transientstore.keyvalueblob.KeyValueBlobTransientStore.doGC(KeyValueBlobTransientStore.java:239) ~[nuxeo-core-cache-10.10.jar:?]
        at java.util.HashMap$Values.forEach(HashMap.java:976) ~[?:?]
        at org.nuxeo.ecm.core.transientstore.TransientStorageComponent.doGC(TransientStorageComponent.java:98) ~[nuxeo-core-cache-10.10.jar:?]
        at org.nuxeo.ecm.core.transientstore.TransiantStorageGCWork.work(TransiantStorageGCWork.java:41) ~[nuxeo-core-cache-10.10.jar:?]
        at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:437) ~[nuxeo-core-event-10.10.jar:?]
        at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:357) ~[nuxeo-core-event-10.10.jar:?]
        ... 4 more
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The error seems to have something to do with the "\n" in the &lt;CODE&gt;private_key&lt;/CODE&gt; value of the Google Service Account JSON key, which I don't think I should remove. Has anybody run into this problem and know how to fix it?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 20:16:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/google-storage-setup-json-parse-exception/m-p/327152#M14153</guid>
      <dc:creator>Sean_Hagen</dc:creator>
      <dc:date>2020-03-24T20:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Google Storage setup: JSON parse exception</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/google-storage-setup-json-parse-exception/m-p/327153#M14154</link>
      <description>&lt;P&gt;Hello,
I've faced  some issues related to the JSON structure. It should look like (data anonymized obviously, but you'll get the idea):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;nuxeo.gcp.credentials={"type":"service_account","project_id":"my-super-project","private_key_id":"1234","private_key":"-----BEGIN PRIVATE KEY-----\\nXXXX/\\nXXXX
\\nXXXX/ricLjO2jedTdm/XSwMst7Gp2/RNzk2iQLYhiQoERmY/ZFI1qJVFGaIk\\nNm152wluobxo+Cmu9z74hT8a3i4GGaozrZKQ4ooRE034auKkeeQfytKDQsrr4u2r\\nXXXX/c3zEvIKktybAXofp2G4NBRGqmKobZDU1ZquI5KKZjYBtS47JhY19nXqYw\\n9BytmKRxTOLoGVhxTOaWIrMmfWxw0H4j3F+2wreJOOoT1zHDh1nx4fHx6/DoNEyU\\nViyrjmWjAgMBAAECggEAK6JzUyop9gPzgYzhMe/te81IIQvwL7/LLOVRKw6HvJ7H\\nXXXX/W0Ic9zhapOniy7x8AOqupkOhpYOAu0[....]/r\\n-----END PRIVATE KEY-----\\n","client_email":"somebody@super-project.iam.gserviceaccount.com","client_id":"123456","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/nuxeo-storage-toto%40superproject.iam.gserviceaccount.com"}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Mar 2020 20:42:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/google-storage-setup-json-parse-exception/m-p/327153#M14154</guid>
      <dc:creator>Gregory_Carlin</dc:creator>
      <dc:date>2020-03-24T20:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Google Storage setup: JSON parse exception</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/google-storage-setup-json-parse-exception/m-p/327154#M14155</link>
      <description>&lt;P&gt;Does the JSON have to be put directly into the config file like that? I thought that &lt;CODE&gt;nuxeo.gcp.credentials&lt;/CODE&gt; was supposed to point to the file that contains the JSON.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 22:40:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/google-storage-setup-json-parse-exception/m-p/327154#M14155</guid>
      <dc:creator>Sean_Hagen</dc:creator>
      <dc:date>2020-03-24T22:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Google Storage setup: JSON parse exception</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/google-storage-setup-json-parse-exception/m-p/327155#M14156</link>
      <description>&lt;P&gt;I'm experiencing a similar issue. I have to enter the JSON string in nuxeo.conf at nuxeo.gcp.credentials config parameter. Otherwise, I get the error list above. The key piece to getting mine to connect was escaping the \n with \n and adding a \r right before the 'END PRIVATE KEY' (/r\n-----END PRIVATE KEY-----).&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 17:13:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/google-storage-setup-json-parse-exception/m-p/327155#M14156</guid>
      <dc:creator>Robert_Smith</dc:creator>
      <dc:date>2020-03-31T17:13:19Z</dc:date>
    </item>
  </channel>
</rss>

