-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected token E in JSON at position 0 #186
Comments
Having the same issue |
This is the same issue as #177. |
Same here |
Looks like it is trying to parse a JSON that is not actually a JSON.
For me the error is "Error: HTTP status code: 403. Invalid or inaccessible developer team ID for the provided Apple ID. Ensure the Team ID is correct and that you are a member of that team." |
Turned out that you need to sign some new agreement on Apple Developer site. |
That may have been the case for you, but there are many other reasons the command can print non-JSON output. |
Strangely, it still fails for me when using the plugin as is. This change in const result = yield (0, spawn_1.spawn)('xcrun', notarizeArgs);
console.log('Attempting to parse that crap:', result.output.trim());
let parsed;
try {
parsed = JSON.parse(result.output.trim());
} catch (e) {
console.error("Failed to parse JSON:", e);
throw new Error(result.output.trim());
} |
Had the same issue, currently forking the repo to apply the above fix. |
Good morning, i have the same problem. i run notarize on a gitaction. when i am on local i have no problem but when the operation is run on GitHub instead i get that error message. I tried to fork the library and added the fix of 'EternallLight' but it doesn't seem to be used. Any advice? |
Rollback to version 2.2.0 where JSON is parsed correctly. "@electron/notarize": "2.2.0" Also be sure to add resolutions to your package.json so your other electron packages use the correct version. "resolutions": { |
Ok, with the rollback to 2.2.0 the error has changed. now it says "Error: HTTP status code: 401. Not authenticated. Make sure all authentication arguments are correct." but when I run notarize locally everything is fine. The problem occurs only on gitactions. I use the three environment variables:
|
Hi @andelf, can you provide more feedback as to what was missing? |
I am encountering the same problem. May I ask if there is any way to solve it? |
I have encountered this issue in my attempts. Leaving this here as it may help someone else. The error for me happened when the notarize function tried to parse the response from the initial request. I guess |
Thank you I was also able to fix this by logging into my Apple Developer account and accepting the updated agreement. |
This should be fixed by #191 |
for me as well |
If someone like me ended here today looking for solutions, make sure to |
For anyone else looking for quick link, go to https://appstoreconnect.apple.com/business and accept any agreements you have there 👍 |
We are facing the below error on using @electron/notarize v2.3.0
Not sure, what's the actual issue here. We are providing all the required params to the notarize function:
The text was updated successfully, but these errors were encountered: