-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Can't start app from ZIP artifact #4299
Comments
I am experiencing the same thing. I can open an unsigned build, but not a zipped up signed build. macOS: Catalina 10.15 |
Partially solved with electron-notarize. Due to Apple requirements on Catalina OS. https://developer.apple.com/news/?id=04102019a |
@jsgv I'm using |
Update: I've tried just compressing the |
@jookyboi I mostly followed this article: Important details is creating the 'App-specific password'. Your regular apple credentials will not work. Note: The ZIPPED app still fails to open, but the DMG works. |
@jsgv I don't have an issue notarizing the app (and neither does the issuer filer). It has to do with using the |
Update: Running from my Electron app's root folder: Can @develar look into removing some of the optional arguments for
|
Update: 7zip has nothing to do with it. I tried with the max compression option from the command line and that still worked okay on Catalina. Something happening between zipping and final output is causing the issue. |
My application is notarized so there is no issue with it, having said that I don't know zip artifact waits for notarization to be finish. I can try to compare content from zip app vs dmg app and see that has any difference |
Ok I used following command to check app notarized or not from dmg and zip and it is confirmed that zip picked up app before notarization is done. Command to check status of app: |
@pashvin Good find. So the issue is that the folder get zipped up before notarization is complete? It just feels strange as my build process resulted in a properly notarized zipped app in Mojave. How does this relate to the fact that the executable in the unzipped |
Here is the workaround I'm using until the problem gets fixed: https://snippets.cacher.io/snippet/354a3eb7b0dcbe711383 |
We've been experiencing the same issue and using a workaround similar to @jookyboi's. |
The last couple of days Apple has had issues with notarization, which if you do it by hand you would have noticed how long it took. Curious if the timing bug disappears when apple is running more smoothly today. |
No this is not a timing issue. This is always reproducible. I know notarization takes some time long and some time it is fast but I am tracking this issue from almost month and we have every day build. Every build has the same issue. |
Update: Found the culprit: https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/src/targets/ArchiveTarget.ts#L65 After creating the zip, the default behavior for I dug into
The resulting The resulting zip works fine on Catalina as does the auto-update functionality. My theory is that by altering the zip file in this way (after compressing the notarized |
Yes once app is signed by apple, any modification will make signature invalid. I think those item must be added (if really required) before starting app notarization. Looks like we have some solution and need to generate an official build with fix. |
I think the correct course of action would be to append the |
There is no need to notarize zip, if anything is added to .app, then it need to be added before it sent for notarization so correct fix is add everything to .app before notarization start and then make zip once notarization is done. remember ZIP is not complaining anything , it extracts fine but .app is not able to start. |
what is the next step to get the fix. I think we already proved that this is a real issue so to get the fix what is the next step? Need to assign to some developer? Waiting for fix for this issue almost 3 month. |
This is a very strange issue and I'll mention my findings because I haven't seen it mentioned here. I had multiple Catalina users report "The application Label LIVE can't be opened." I downloaded and the app worked fine on Catalina. URL for reference and public reproduction: http://label.live/download. I finally screen-shared (via Zoom) with a user and sure enough, the download app didn't work. They were using Chrome and the zip file was being decompressed by Archive Utility. I had the user download the same zip using Safari and presto, the decompressed app launched no problem. I have given this advice to other users with varying success. I believe that Safari users must have "Open safe files after downloading" checked. If not, then the Archive Utility is launched to unzip - causing the issue. In all of my own tests I was decompressing with Safari's built-in unzipper (whatever that is)... can anyone confirm this issue with their builds? I'm skeptical that I'm the only one to notice this behavior... |
@semireg I can confirm, that Safari downloaded app works for me and Chrome downloaded and Finder unzipped does not. |
Apple developer support confirmed and helped me understand the issue. 🙌 The problem is that Archive Utility (only on Catalina) fails to create the proper symlinks when unpacking, whereas Safari "open safe" does create the symlinks as expected. An example of this is But, before we can blame Archive Utility, consider that
Apple developer support recommended ditto to create the zip, but I'm not sure if this is our end goal... I have not looked into how to fix/work-around electron-builder. Looking for help with that! 😅
Apple developer support also recommended filing a bug on this. I filed bug |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
It is still relevant. |
Also, according to AWstats from cPanel, it seems that the automatic update system is downloading both the zip and the dmg for most of my users. I assume it's downloading the zip, noticing it was broken, and then downloading the dmg to solve the problem. I've recently made the dmg the default download (which is what I assume the path and sha512 of the YML root is), so I expect to put that theory to the test soon. |
Still relevant!!!! I have to edit
|
@fmiceli24 you can use this with
|
Thanks to @jookyboi 's 7za command, I've managed to replace the ZIP file with a functional one, but latest-mac-yml still had the info from the original ZIP file, so I had to create the JS file below, which receives the app version as an argument to work:
This is definitively just a workaround, and it requires |
Thanks. Did that in order to have it streamlined. I am not using the blockmap. I understand this is for delta updates, right? If delta updates are not working on OSX, and enabling the blockmap breaks updates altogether, would it be possible to have this workaround implemented upstream in order to avoid patching? |
i am getting same issue even after notrization |
i ### solved this problem by using different target packaging in electron-builder "tar.xz" "mac": { |
Correct me if I'm wrong, but doesn't Squirrel.Mac require .zip artefacts? See (2) in Note here: https://www.electron.build/auto-update#quick-setup-guide |
your right , in my use case i just wanted to compressed app which can launch after unzip i am not planning to autoupdate it at this moment. |
After a lot of pain I finally got this working, I spent more time figuring out codesign-ing and this issue than I did developing my app. You can see my implementation here: https://github.com/RobertLowe/force-audio which is based on https://gist.github.com/harshitsilly/a1bd5a405f93966aad20358ae6c4cec5 I use a two step process:
|
…edded blockmap breaks codesigning. fixes: electron-userland#4299
I discovered that I can just swap it to generate an external |
* building separate blockmap instead of embedding on mac since embedded blockmap breaks codesigning. fixes: #4299
@mmaietta Just used your changes in my local node_modules folder and this does work perfectly 🎉, thank you so much! Do you know when the change will make it over to npm? |
@0xdeafcafe I've just published Please note though...this issue was just reported but I've not been able to repro it in my 2 projects. So that's why I've published it as |
Writing this comment to help someone else facing the same issue in future. I am using MacOS Mojave for development purposes But when I saw above message from @mmaietta, I updated electron builder to v22.13.1 and then repeated the same process Thank you @mmaietta for resolving the issue. |
Extract app from ZIP and try to start it, fails with "The application xyz can't be opened".
The text was updated successfully, but these errors were encountered: