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

Can't build on MacOS 10.15 Catalina #1529

Closed
barmac opened this issue Oct 10, 2019 · 7 comments · Fixed by #1585
Closed

Can't build on MacOS 10.15 Catalina #1529

barmac opened this issue Oct 10, 2019 · 7 comments · Fixed by #1585
Assignees
Milestone

Comments

@barmac
Copy link
Collaborator

barmac commented Oct 10, 2019

I can't build the app on MacOS anymore due to Can't locate Mac/Memory.pm in @INC (you may need to install the Mac::Memory module).

Related: electron-userland/electron-builder#3990

Describe the Bug

Log
electron-builder -c.forceCodeSigning=false --publish=never -c.artifactName=${name}-${version}-${os}-${arch}.${ext} -c.dmg.artifactName=${name}-${version}-${os}.${ext} -c.nsis.artifactName=${name}-${version}-${os}-setup.${ext} -c.nsisWeb.artifactName=${name}-${version}-${os}-web-setup.${ext}

  • electron-builder version=20.28.4
  • loaded configuration file=/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/electron-builder.json
  • writing effective config file=dist/builder-effective-config.yaml
  • no native production dependencies
  • packaging       platform=darwin arch=x64 electron=3.1.12 appOutDir=dist/mac
  • skipped macOS application code signing reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, see https://electron.build/code-signing allIdentities=
                                                  0 identities found

                                               Valid identities only
                                                  0 valid identities found
  • building        target=DMG arch=x64 file=dist/camunda-modeler-3.3.5-mac.dmg
  • building        target=macOS zip arch=x64 file=dist/camunda-modeler-3.3.5-mac.zip
Error: Exit code: 2. Command failed: /usr/bin/perl /private/var/folders/kb/by0f9f1j52dbfsqsrwlfxgb80000gn/T/t-1i2E3J/1-dmgProperties.pl
Can't locate Mac/Memory.pm in @INC (you may need to install the Mac::Memory module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /private/var/folders/kb/by0f9f1j52dbfsqsrwlfxgb80000gn/T/t-1i2E3J/1-dmgProperties.pl line 4.
BEGIN failed--compilation aborted at /private/var/folders/kb/by0f9f1j52dbfsqsrwlfxgb80000gn/T/t-1i2E3J/1-dmgProperties.pl line 4.

Can't locate Mac/Memory.pm in @INC (you may need to install the Mac::Memory module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /private/var/folders/kb/by0f9f1j52dbfsqsrwlfxgb80000gn/T/t-1i2E3J/1-dmgProperties.pl line 4.
BEGIN failed--compilation aborted at /private/var/folders/kb/by0f9f1j52dbfsqsrwlfxgb80000gn/T/t-1i2E3J/1-dmgProperties.pl line 4.

    at /Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/builder-util/src/util.ts:128:16
    at ChildProcess.exithandler (child_process.js:301:5)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
From previous event:
    at applyProperties (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/dmg-builder/out/dmgUtil.js:176:18)
    at /Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/dmg-builder/src/dmg.ts:305:9
From previous event:
    at customizeDmg (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/dmg-builder/out/dmg.js:209:18)
    at /Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/dmg-builder/src/dmg.ts:41:7
    at /Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/dmg-builder/src/dmgUtil.ts:37:31
From previous event:
    at attachAndExecute (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/dmg-builder/out/dmgUtil.js:114:17)
    at /Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/dmg-builder/src/dmg.ts:41:7
    at Generator.next (<anonymous>)
From previous event:
    at DmgTarget.build (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/dmg-builder/src/dmg.ts:73:7)
    at Function.buildAsyncTargets (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/app-builder-lib/src/platformPackager.ts:139:36)
    at MacPackager.packageInDistributableFormat (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/app-builder-lib/src/platformPackager.ts:118:24)
    at nonMasPromise.then.then (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/app-builder-lib/src/macPackager.ts:90:26)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
From previous event:
    at /Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/app-builder-lib/src/macPackager.ts:90:10
    at Generator.next (<anonymous>)
From previous event:
    at MacPackager.pack (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/app-builder-lib/src/macPackager.ts:80:95)
    at /Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/app-builder-lib/src/packager.ts:376:24
    at Generator.next (<anonymous>)
    at xfs.stat (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
    at /Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/graceful-fs/polyfills.js:285:20
    at FSReqWrap.oncomplete (fs.js:154:5)
From previous event:
    at Packager.doBuild (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/app-builder-lib/src/packager.ts:344:39)
    at /Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/app-builder-lib/src/packager.ts:314:57
    at Generator.next (<anonymous>)
    at /Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/graceful-fs/graceful-fs.js:111:16
    at /Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/graceful-fs/graceful-fs.js:45:10
    at FSReqWrap.args [as oncomplete] (fs.js:140:20)
From previous event:
    at Packager._build (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/app-builder-lib/src/packager.ts:285:133)
    at /Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/app-builder-lib/src/packager.ts:281:23
    at Generator.next (<anonymous>)
From previous event:
    at Packager.build (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/app-builder-lib/src/packager.ts:238:14)
    at build (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/app-builder-lib/src/index.ts:58:28)
    at build (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/electron-builder/src/builder.ts:227:10)
    at then (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/electron-builder/src/cli/cli.ts:42:48)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
From previous event:
    at Object.args [as handler] (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/electron-builder/src/cli/cli.ts:42:48)
    at Object.runCommand (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/yargs/lib/command.js:238:44)
    at Object.parseArgs [as _parseArgs] (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/yargs/yargs.js:1089:24)
    at Object.get [as argv] (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/yargs/yargs.js:1004:21)
    at Object.<anonymous> (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/electron-builder/src/cli/cli.ts:25:28)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/execa/index.js:347
		throw err;
		^

Error: Command failed: electron-builder -c.forceCodeSigning=false --publish=never -c.artifactName=${name}-${version}-${os}-${arch}.${ext} -c.dmg.artifactName=${name}-${version}-${os}.${ext} -c.nsis.artifactName=${name}-${version}-${os}-setup.${ext} -c.nsisWeb.artifactName=${name}-${version}-${os}-web-setup.${ext}
    at makeError (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/execa/index.js:174:9)
    at module.exports.sync (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/node_modules/execa/index.js:338:15)
    at Object.<anonymous> (/Users/maciej.barelkowski/workspace/bpmn-io/camunda-modeler/tasks/distro.js:127:1)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
    at startup (internal/bootstrap/node.js:283:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! camunda-modeler-builder@0.0.0 build:distro: `node tasks/distro.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the camunda-modeler-builder@0.0.0 build:distro script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/maciej.barelkowski/.npm/_logs/2019-10-10T17_42_04_008Z-debug.log
ERROR: "build:distro --" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! camunda-modeler-builder@0.0.0 build: `run-s client:build "build:distro -- {@}" "build:test-distro -- {@}" --`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the camunda-modeler-builder@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/maciej.barelkowski/.npm/_logs/2019-10-10T17_42_04_073Z-debug.log
ERROR: "build --" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! camunda-modeler-builder@0.0.0 all: `run-s clean lint test "build -- {@}" --`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the camunda-modeler-builder@0.0.0 all script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/maciej.barelkowski/.npm/_logs/2019-10-10T17_42_04_105Z-debug.log

Steps to Reproduce

  1. Upgrade MacOS to 10.15
  2. Run npm run all

Expected Behavior

App builds.

Environment

  • OS: MacOS 10.15 Catalina
  • Camunda Modeler Version: develop, any in fact

Child of #1584

@pinussilvestrus
Copy link
Contributor

pinussilvestrus commented Oct 11, 2019

Updating the electron-builder to the latest version (21.2.0) seems to fix the build (as it bundles all files, the application is runnable via the .dmg file), but break the test-distro command.

FAILURE Error: invalid comment length. expected: 55271. found: 0
    at /Users/niklas.kiefer/bpmn-io/camunda-modeler/node_modules/yauzl/index.js:133:25
    at /Users/niklas.kiefer/bpmn-io/camunda-modeler/node_modules/yauzl/index.js:631:5
    at Immediate.<anonymous> (/Users/niklas.kiefer/bpmn-io/camunda-modeler/node_modules/fd-slicer/index.js:202:5)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)

Indeed, the zipping seems to be still broken:

Kapture 2019-10-11 at 7 38 05

Cf. electron-userland/electron-builder#4179

@barmac
Copy link
Collaborator Author

barmac commented Oct 11, 2019

Yes, the zip files problem has not been fixed yet: electron-userland/electron-builder#3534

@nikku
Copy link
Member

nikku commented Oct 15, 2019

This is not a critical issue for us as long as releases can still be built our releases on Travis. As it looks like Travis still uses 10.12 so we are fine (cf. build log).

It is annoying and a potential time sink, though, as our Mac developers cannot test the built app anymore.

@pinussilvestrus You mentioned a manual workaround, could you investigate if that exists / works for the time being?

@pinussilvestrus
Copy link
Contributor

Sure, I'll check this soon.

@nikku nikku added the backlog Queued in backlog label Oct 15, 2019 — with bpmn-io-tasks
@pinussilvestrus pinussilvestrus self-assigned this Oct 17, 2019
@pinussilvestrus
Copy link
Contributor

pinussilvestrus commented Oct 17, 2019

So the manual workaround for fixing the .zip file would basically look like:

  • taking the built .app file from dist/
  • zipping it

Cf. manual workaround snippet

LOL


Anyway, what currently would work by upgrading the electron-builder dependency, it's that it is building a working .dmg file. The only thing which is broken is the .zip file. It seems like they are actively looking for a solution right now: electron-userland/electron-builder#4299

So I think, as it is currently possible for us, the Mac Developers, to build the application locally by upgrading the electron-builder to v21.2.0 version, we should just wait for the actual zipping fix for closing this issue here.

If you guys think we should do an intermediate step by updating to v21.2.0 and another update later, we can also do it this way.

@pinussilvestrus pinussilvestrus removed their assignment Oct 17, 2019
@pinussilvestrus
Copy link
Contributor

A new pre-release version of the build tools are published (v22.1.0) but doesn't fix the broken zipping.

Maybe, but don't know for sure, adding a notarization could touch this one as well.

@barmac barmac self-assigned this Nov 12, 2019
@barmac barmac added in progress Currently worked on and removed backlog Queued in backlog labels Nov 12, 2019
@barmac barmac mentioned this issue Nov 12, 2019
3 tasks
barmac added a commit that referenced this issue Nov 13, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
barmac added a commit that referenced this issue Nov 13, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
barmac added a commit that referenced this issue Nov 14, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
barmac added a commit that referenced this issue Nov 14, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Nov 14, 2019
nikku pushed a commit that referenced this issue Nov 15, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
nikku pushed a commit that referenced this issue Nov 15, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Nov 15, 2019
nikku pushed a commit that referenced this issue Nov 15, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
@nikku nikku added this to the M32 milestone Nov 15, 2019
@JAlbertoGonzalez
Copy link

Same issue. Upgrading electron-builder to the latest version (21.2.0) solved the problem.

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

Successfully merging a pull request may close this issue.

4 participants