Skip to content
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

2.21.3 macOS-arm64 does not launch #630

Closed
lastnameclick opened this issue Dec 2, 2023 · 10 comments
Closed

2.21.3 macOS-arm64 does not launch #630

lastnameclick opened this issue Dec 2, 2023 · 10 comments

Comments

@lastnameclick
Copy link

Hey there,

It appears that the arm64 build of 2.21.3 (downloaded from GitHub) does not launch. Testing on M1 Pro running macOS 14.0.

image
@cpvalente
Copy link
Owner

Hi @JamesClick , thank you for reaching out.

The app is not signed, since this means a paid process. You can read about it in the Apple docs

For now, you can use the intel release (the one downloaded when you click the macOS download on the website) or you can bypass gatekeeper to run the arm version
This is a common problem for free applications and not unique to ontime, you should be able to find several guides on how to do so

Hope this helps

@jwetzell
Copy link
Collaborator

jwetzell commented Dec 5, 2023

I could try signing a ARM Mac build to see if the issue goes away. Not sure if it just needs signed or if it would also need to go through the notary process. I've got a few electron apps that I work on that do sign/notarize their Mac builds you could see if those produce this same error message.

@cpvalente
Copy link
Owner

Hi @jwetzell , I dont maintain any other electron apps and the process is slightly mysterious to me.

To what I can infer from the docs, signing should be enough, but I am unsure on how I can provide certificates to the CI without a paid developer account. If you are able to help it would be greatly appreciated

@jwetzell
Copy link
Collaborator

jwetzell commented Dec 6, 2023

@cpvalente @JamesClick here is a link to a signed version of the v2.21.3 tag both x64 and arm64 builds. If you would like to see if that resolves the "damaged" app popup.

@cpvalente
Copy link
Owner

thank you @jwetzell , do you maybe have some availability to help us get ontime signed?

@jwetzell
Copy link
Collaborator

jwetzell commented Dec 6, 2023

Yeah, electron-builder handles pretty much handles the hard part of signing/notarizing. The other part is giving in to Apple's $99 developer account fee so you can get the certificates necessary to hand off to electron-builder.

@cpvalente
Copy link
Owner

Closing this for now since there is not much we can do right now to improve the situation

@cpvalente cpvalente closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2023
@jwetzell
Copy link
Collaborator

@cpvalente If you ever get an Apple developer account I can assist with any troubles in setting up the signing/notarizing.

@cpvalente
Copy link
Owner

Hi @jwetzell

I am currently working on signing and notarizing Ontime's distribution for MacOS.
However without much luck

This work is happening on a separate, private repo to avoid exposing information while I run tests. If you are available we could try and find a way to communicate. Either over email at mail@getontime.no or on the video engineering discord

In short, the signing process works well and I have verified that the assets get signed. However the notarization step fails with a Unexpected token E in JSON at position 0 error as described here electron/notarize#186 (stack trace under)
I have attempted lowering the electron-notarize version as suggested with no luck.

I am pretty confident that the configuration of electron is correct and I have double-checked all secrets
My current estimation is that there is some issue with configuration and the error is unhelpful

Would you maybe have some availability to help?

    • signing         file=dist/mac-arm64/ontime.app platform=darwin type=distribution identity=... provisioningProfile=none
    ⨯ Unexpected token E in JSON at position 0  failedTask=build stackTrace=SyntaxError: Unexpected token E in JSON at position 0
  SyntaxError: Unexpected token E in JSON at position 0
      at JSON.parse (<anonymous>)
      at /Users/runner/work/ontime-signing/ontime-signing/node_modules/.pnpm/@electron+notarize@2.2.1/node_modules/@electron/notarize/src/notarytool.ts:79:25
      at Generator.next (<anonymous>)
      at fulfilled (/Users/runner/work/ontime-signing/ontime-signing/node_modules/.pnpm/@electron+notarize@2.2.1/node_modules/@electron/notarize/lib/notarytool.js:28:58)

@jwetzell
Copy link
Collaborator

jwetzell commented May 3, 2024

Yeah, I should have some free time this weekend to poke around. I don't have much in terms of configuration around notarizing. I have one setting in the package.json which can be moved to an environment variable with v25 of electron-builder (I just created a branch pointing to the alpha version, successfully testing it). With the correct env variables set it "just happens" when release is run.

You can also see what version of electron-builder and @electron/notarize I am using which can play a role as they have been working on the macOS notarize stuff specifically (as evidence by v25 of electron-builder changing things up even more).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants