question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App won't start after unzipping on Mac Catalina

See original GitHub issue
  • Version: 22.4.0
  • Target: Mac / Zip

Description:

After building an electron app for macOS with Zip target, it won’t open after unzipping it by default Archive Utility app on Catalina.

Steps to reproduce:

  1. Build an electron app with the next build config: build_config
"build": {
    "mac": {
      "target": "zip",
      "icon": "./images/electron-icon-mac.icns",
      "category": "Development",
      "identity": null,
      "sign": false
    }
}
  1. Run build command electron-builder -m --x64.

  2. Unzip created zip on Mac (Catalina 10.15) using Archive Utility app. unzip

  3. Try to open the unzipped .app file.

Actual result:

Can’t open .app file. open_issue

Notes:

  1. If unzip app with any other archiver as Better Zip or The Unarchiver, the app file works. But most MacOS users use the default Archive Utility app, so this is a major issue.

  2. As I have noticed the problem occurs because of bad symlinks for Electron Framework, Libraries, and Resources in my_electron_app.app/Contents/Frameworks/Electron Framework.framework

Not working version: bad_sym-links

Working version: good_sym-links

  1. Also, I tried to remove line 65 in my node_modules/app-builder-lib here: https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/src/targets/ArchiveTarget.ts#L65
if (this.isWriteUpdateInfo && format === "zip") {
    // updateInfo = await (0, _differentialUpdateInfoBuilder().appendBlockmap)(artifactPath);
}

After I removed that line and built the app (zip), the symlinks were created correctly and the app started successfully.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:16
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alectrocutecommented, Jan 19, 2022

Still relevant.

1reaction
gerbuscommented, Apr 29, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix a Mac Application That's Not Starting - Lifewire
Restart the Mac. It's always smart to start with the simplest fix possible. · Update the app. Check that you have the most...
Read more >
Cannot unzip files since Catalina - Error 79 - Apple Discussions
I zipped several files a few months ago using Mohave on my Mac. Recently got a new computer (with OS Catalina) and now...
Read more >
How to fix 'The application "..." can't be opened' on Mac?
Open a terminal window (CMD + Space -> terminal); · Using the cd command, navigate to the place where the application is stored:...
Read more >
How to Fix macOS Catalina Installation Issues - MacSales.com
The two primary causes are; attempting to install on a Mac that Catalina doesn't support, or trying to install Catalina on a Mac...
Read more >
How to Unzip the files and folders on macOS Catalina
Launch Terminal on your Mac by tapping on Applications ->Utilities ->Terminal. · Then type the following commands. · Type UnZip File or Folder...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found