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鈥檒l 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 · 13 comments

Comments

@MarshallOfSound
Copy link
Member

commented Jul 29, 2019

  • 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/electron-packager@8d407e7

@develar develar added bug feature mac and removed bug labels Jul 29, 2019

@MarshallOfSound MarshallOfSound referenced this issue Jul 29, 2019
3 of 3 tasks complete
@stevenroussey-desiclabs

This comment has been minimized.

Copy link

commented Jul 29, 2019

@matt3224

This comment has been minimized.

Copy link

commented Jul 30, 2019

Any timeline on this?

@Kilian

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

commented Jul 31, 2019

guys, any timeline? thx!

@btzsoft

This comment has been minimized.

Copy link

commented Jul 31, 2019

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

@caesar

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

@btzsoft can you share the code snippet?

@Kilian

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

@btzsoft @steverandy Or submit a PR? ;)

@Evoks

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

PR #4111

@develar

This comment has been minimized.

Copy link
Member

commented Jul 31, 2019

Thanks! 21.2.0 released.

@gaodeng

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can鈥檛 perform that action at this time.