asticode / go-astilectron-bundler

Bundle your Astilectron app with ease
MIT License
129 stars 68 forks source link

Bundle doesn't run on another Mac from Downloads #24

Closed lamak closed 6 years ago

lamak commented 6 years ago

Hi! Bundle runs great, but not from another Mac, if you run it from Downloads. First time, you need to unlock the bundle, in the security, then run again. The problem is it will run from any other path (Desktop, Applications), but not from the Downloads. It silently exists with code 1, then I move to Desktop, run it again — starts okay. Probably, something is not well "plisted"? If you need any additional logs, I would glad to provide.

asticode commented 6 years ago

@lamak my guess is that the application can't start in the Downloads folder since it has not been signed. Moving it to the Applications folder or any other folder must be interpreted by MacOSX as a manual validation of the application. I will look deeper into this problem once I can get my hand on a mac.

asticode commented 6 years ago

@lamak I can't reproduce unfortunately :( How does your bundled app get to the Downloads folder? Do you download it as a .zip file?

Could you retrace exactly what you're doing from the bundle phase to the open phase?

lamak commented 6 years ago

@asticode Sorry for long answer, I think this is not an issue anymore, this is macOS behavior, which i didn't know and have not find anythere. You can't run just downloaded unsigned file — you should move it, and everything works well (this seems reasonably)

Setup: Two MacBooks (server and client), same model, same 10.13.4 version, same login / iCloud account, same keys.

Steps:

  1. On server Mac I make a unsigned bundle for darwin-amd64, with astilectron-bundler -v, move it to Downloads folder — everything runs great.
  2. Send .app bundle via airdrop to client mac (no zip)
  3. Run .app from client Mac downloads folder, got caution about running unsigned, go to security, open this up, try to run again — got nothing. The bundle even don't unpack itself. There is no difference, if I run .app with double click or right click - open. Once I move .app to any folder (~, Desktop, Applications) and run again — everything works well.

We tried this story on different client machines, different server + client machines, — everything is the same. If I transfer another way, another folder e.g zip and unpack — everything works well.

asticode commented 6 years ago

OK, thanks for the detailed update. Maybe you should consider signing your app even though I haven't tried it and an issue has been created.

Closing this issue.

Cheers.