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

Building Release and Debug Version on Mac 10.15.1 Error From Notarizing #108

Open
northkode opened this issue Nov 11, 2019 · 2 comments
Open

Comments

@northkode
Copy link

northkode commented Nov 11, 2019

Bug Report

Problem

When signing the build it fails due to electron config and developer ID issues that I believe are related to the new notarizing bug for new mac os

What is expected to happen?

To properly build a release.
I have a proper Developer ID Certificate from apple all setup

What does actually happen?

cordova build electron
[Cordova Electron] The built package size may be larger than necessary. Please run with --verbose for more details.
  • electron-builder version=20.44.4
  • writing effective config file=platforms/electron/build/builder-effective-config.yaml
  • installing production dependencies platform=darwin arch=x64 appDir=/Users/projects/${PROJECT}/tool_app/platforms/electron/www
  • packaging       platform=darwin arch=x64 electron=4.0.1 appOutDir=platforms/electron/build/mac
  • packaging       platform=mas arch=x64 electron=4.0.1 appOutDir=platforms/electron/build/mas
  • signing         file=platforms/electron/build/mac/Home.app identityName=Developer ID Application: Ltd (*******) identityHash=3B6331A34403D9BE4845BF4ED19BD1E326ED0468 provisioningProfile=salestool.provisionprofile
  • signing         file=platforms/electron/build/mas/Home.app identityName=Developer ID Application: Ltd (********) identityHash=3B6331A34403D9BE4845BF4ED19BD1E326ED0468 provisioningProfile=salestool.provisionprofile
{ Error: Command failed: spctl --assess --type execute --verbose --ignore-cache --no-cache /Users/projects/${PROJECT}/tool_app/platforms/electron/build/mas/Home.app
/Users/projects/${PROJECT}/tool_app/platforms/electron/build/mas/Home.app: rejected
source=Unnotarized Developer ID

Information

Cordova 9.0.0
Platform Electron 1.1.1

Command or Code

cordova build electron && cordova build electron --release

Environment, Platform, Device

Electron

Version information

This article might point to help, but i couldnt get it to work:
https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/

Checklist

  • [ X ] I searched for existing GitHub issues
  • [ X ] I updated all Cordova tooling to most recent version
  • [ X ] I included all the necessary information above
@WesUnwin
Copy link

WesUnwin commented Feb 12, 2020

That spctl command is the gatekeeper trying to assess whether the binary is singed and app notarized already.

It won't be notarized at this point of the process, electron-builder has a config option called gatekeeperAssess: false which will skip this command/check.

PROBLEM: cordova-electron was not even designed to pass through gatekeeperAssess: false to the underlying electron-builder build() function (I Believe, correct me if wrong). Looking through cordova-electron code...

I was able to solve this when using electron-builder directly.

@erisu
Copy link
Member

erisu commented Sep 17, 2021

Can you confirm if this is still a problem with Cordova Electron 3.0.0?

To upgrade:

cordova platform remove electron
cordova platform add electron@3.0.0

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

No branches or pull requests

3 participants