Closed D4nt4lion closed 2 years ago
Your credentials json file is corrupted.
It is vallid json and I even created it new. I obviously removed the key for posting. Am I missing something?
{
"type": "service_account",
"project_id": "android-publishing-356308",
"private_key_id": "X",
"private_key": "X",
"client_email": "android-publishing@android-publishing-356308.iam.gserviceaccount.com",
"client_id": "112835740999932899426",
"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/android-publishing%40android-publishing-356308.iam.gserviceaccount.com"
}
That looks fine, so I'm not sure. Maybe make sure the file isn't empty if you're running this on CI? The error is definitely some kind of parsing failure when loading credentials:
Caused by: com.google.gson.stream.MalformedJsonException: Expected value at line 1 column 1 path $
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1564)
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:591)
at com.google.gson.stream.JsonReader.peek(JsonReader.java:426)
at com.google.api.client.json.gson.GsonParser.nextToken(GsonParser.java:149)
at com.google.api.client.json.JsonParser.startParsing(JsonParser.java:213)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:358)
at com.google.api.client.json.JsonParser.parse(JsonParser.java:335)
at com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:79)
at com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:73)
at com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:157)
at com.github.triplet.gradle.androidpublisher.internal.AndroidPublisherKt.createPublisher(AndroidPublisher.kt:25)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Sorry for the late response. It was a no brainer. Instead of the content of the json file the path was in the env variable. Feel free to close.
Sweet, thx.
Describe the bug
I can not get the publishing to run.
It continues to throw an error.
How To Reproduce
Versions
Tasks executed
What tasks did you run? For example,
publishBundle
.publishBundle
Expected behavior
The bundle to be published.
Additional context (if a crash, provide stack trace)