No eligible provisioning profiles found when trying to run electron app on MacOS


#1

I am not finding relevant answers in other places on the internet, so I thought I would ask here.

After making my application with electron forge, I try to install and run it but it instantly crashes. When I open the console, I see two errors:

Disallowing [app bundle ID] because no eligible provisioning profiles found

and

CPValidateProvisioningDictionariesExtViaBridge returned invalid result: {
    success = 0;
}

I have created a Mac DirectDistribution provisioning profile in my Apple Developer settings and downloaded and installed it but either it is not working or that is not what I need to be doing to solve this issue.

If i run codesign --verify -vvvv path/to/app/in/Applications it shows me it is valid on disk:

--prepared:/Applications/MyApp.app/Contents/Frameworks/Privia Desktop Helper NP.app
--validated:/Applications/MyApp.app/Contents/Frameworks/Privia Desktop Helper NP.app
--prepared:/Applications/MyApp.app/Contents/Frameworks/Squirrel.framework/Versions/Current/.
--validated:/Applications/MyApp.app/Contents/Frameworks/Squirrel.framework/Versions/Current/.
--prepared:/Applications/MyApp.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/.
--validated:/Applications/MyApp.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/.
--prepared:/Applications/MyApp.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current/.
--validated:/Applications/MyApp.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/Current/.
--prepared:/Applications/MyApp.app/Contents/Frameworks/Mantle.framework/Versions/Current/.
--validated:/Applications/MyApp.app/Contents/Frameworks/Mantle.framework/Versions/Current/.
--prepared:/Applications/MyApp.app/Contents/Frameworks/Privia Desktop Helper.app
--validated:/Applications/MyApp.app/Contents/Frameworks/Privia Desktop Helper.app
--prepared:/Applications/MyApp.app/Contents/Frameworks/Privia Desktop Helper EH.app
--validated:/Applications/MyApp.app/Contents/Frameworks/Privia Desktop Helper EH.app
/Applications/MyApp.app: valid on disk
/Applications/MyApp.app: satisfies its Designated Requirement

I am totally lost as to why it is crashing. There are no errors when I run the linter and it runs fine when I run it via yarn on development.

Has anyone run into something similar and solved? Or does anyone see an obvious mistake I am making?

I know this issue is not specific to Electron, but perhaps someone with Electron experience understands why this is happening.


#2

Ok I figured this out - the problem lies within electron-osx-sign. By default (maybe?) apps are set to the platform mas which is supposed to crash on bootup for reasons I did not investigate. Since I don’t need mas for mine, I set the osxSign value of platform to darwin and it all checks out.