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

New helper apps on macOS in Electron v6 #4104

Closed
MarshallOfSound opened this issue Jul 29, 2019 · 17 comments
Closed

New helper apps on macOS in Electron v6 #4104

MarshallOfSound opened this issue Jul 29, 2019 · 17 comments

Comments

@MarshallOfSound
Copy link
Member

  • Version: 🤷‍♂

  • Target: macOS

This is just a heads up that electron@6 will include two new "Helper.app" applications as a result of a Chromium change and builder needs to be updated to support those two new helpers.

Refs: electron/electron#19500 (comment)

electron-packager commit to handle the new files --> electron/packager@8d407e7

@stevenroussey-privicy
Copy link

Related: electron/electron#19510

@mattpilott
Copy link

Any timeline on this?

@Kilian
Copy link
Contributor

Kilian commented Jul 31, 2019

For reference, this is where the new helpers need to be added:

const appPlistFilename = path.join(contentsPath, "Info.plist")
const helperPlistFilename = path.join(frameworksPath, "Electron Helper.app", "Contents", "Info.plist")
const helperEHPlistFilename = path.join(frameworksPath, "Electron Helper EH.app", "Contents", "Info.plist")
const helperNPPlistFilename = path.join(frameworksPath, "Electron Helper NP.app", "Contents", "Info.plist")
const helperLoginPlistFilename = path.join(loginItemPath, "Electron Login Helper.app", "Contents", "Info.plist")
const plistContent: Array<any> = await executeAppBuilderAsJson(["decode-plist", "-f", appPlistFilename, "-f", helperPlistFilename, "-f", helperEHPlistFilename, "-f", helperNPPlistFilename, "-f", helperLoginPlistFilename])

@btzsoft
Copy link

btzsoft commented Jul 31, 2019

guys, any timeline? thx!

@btzsoft
Copy link

btzsoft commented Jul 31, 2019

@Kilian I did this changes, also added to moveHelpers but the same, app is crashing.

@caesar
Copy link

caesar commented Jul 31, 2019

@Kilian @btzsoft there are many more places in that file where the new helpers need adding. (Ideally it should be refactored to make the code DRYer for so many helpers.)

@btzsoft
Copy link

btzsoft commented Jul 31, 2019

@caesar I did it working right now, my mistake was that I haven't included (GPU) helper also.
I changed electronMac.js directly from node_modules until a new release will be here.
Thx!

@steverandy
Copy link
Contributor

@btzsoft can you share the code snippet?

@Kilian
Copy link
Contributor

Kilian commented Jul 31, 2019

@btzsoft @steverandy Or submit a PR? ;)

@Evoks
Copy link
Contributor

Evoks commented Jul 31, 2019

PR #4111

@develar
Copy link
Member

develar commented Jul 31, 2019

Thanks! 21.2.0 released.

@gaodeng
Copy link
Contributor

gaodeng commented Aug 8, 2019

@develar @Evoks
I upgraded from Electron5 to 6 (electron-builder to the latest version), when submitted via the Application Loader, it gives these error:

ERROR ITMS-90277: "Invalid Bundle Identifier. The application bundle contains a tool or framework Electron Helper (GPU) [fm.moon.apps.desktop.player.pkg/Payload/Moon FM.app/Contents/Frameworks/Moon FM Helper (GPU).app] using the bundle identifier 'fm.moon.apps.desktop.player.helper.(GPU)', which is not a valid bundle identifier." 

ERROR ITMS-90277: "Invalid Bundle Identifier. The application bundle contains a tool or framework Electron Helper (Plugin) [fm.moon.apps.desktop.player.pkg/Payload/Moon FM.app/Contents/Frameworks/Moon FM Helper (Plugin).app] using the bundle identifier 'fm.moon.apps.desktop.player.helper.(Plugin)', which is not a valid bundle identifier."

ERROR ITMS-90277: "Invalid Bundle Identifier. The application bundle contains a tool or framework Electron Helper (Renderer) [fm.moon.apps.desktop.player.pkg/Payload/Moon FM.app/Contents/Frameworks/Moon FM Helper (Renderer).app] using the bundle identifier 'fm.moon.apps.desktop.player.helper.(Renderer)', which is not a valid bundle identifier."

@caesar
Copy link

caesar commented Aug 8, 2019

@gaodeng I suspect you should open a new issue for this. But for what it's worth, the issue you're seeing is caused by these lines:

function configureHelper(helper: any, postfix: string) {
helper.CFBundleExecutable = `${appFilename} Helper ${postfix}`
helper.CFBundleDisplayName = `${appInfo.productName} Helper ${postfix}`
helper.CFBundleIdentifier = `${helperBundleIdentifier}.${postfix}`
helper.CFBundleVersion = appPlist.CFBundleVersion
}
if (helperRendererPlist != null) {
configureHelper(helperRendererPlist, "(Renderer)")
}
if (helperPluginPlist != null) {
configureHelper(helperPluginPlist, "(Plugin)")
}
if (helperGPUPlist != null) {
configureHelper(helperGPUPlist, "(GPU)")
}

As you can see, the configureHelper function takes a postfix parameter which is used both in the filename of the helper app, and as the final part of the bundle identifier.
The postfix values being passed contain ( and ) characters which are invalid in the bundle identifier.

This function will need refactoring to avoid this.

Actually the whole of this file is pretty ugly… I started work a while back on refactoring the whole thing but I didn't have time to finish, and won't have time for at least several months more.

@johannesjo
Copy link

Still an issue for me with 21.2.0.

1 similar comment
@jcc
Copy link

jcc commented Oct 12, 2019

Still an issue for me with 21.2.0.

@dimitrisnl
Copy link

Happens to me too.

(I know posting a comment doesn't help, but since the thread is locked I wanted to bring some extra attention.)

@turbidwater
Copy link

turbidwater commented May 19, 2020

Updating electron-builder to 21.2.0 and adding electron-packager did resolve this for me.
"electron-builder": "^21.2.0", "electron-packager": "^14.2.1",
FWIW, I was using electron 8.3.0 with this.

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