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

Electron not launching with latest sharp libraries #5438

Closed
janakg opened this issue Nov 25, 2020 · 11 comments
Closed

Electron not launching with latest sharp libraries #5438

janakg opened this issue Nov 25, 2020 · 11 comments
Labels

Comments

@janakg
Copy link

janakg commented Nov 25, 2020

electron: "8.5.5",
electron-builder: "22.9.1"
Target: Ubuntu Linux
Sharp: 0.26.3

Suggestion from sharp author::

electron-builder needs to be modified, either to skip dependencies that uses N-API, or to invoke prebuild-install with runtime=napi first, then fallback to runtime=electron.

lovell/sharp#2440

@janakg
Copy link
Author

janakg commented Dec 8, 2020

Hi, any updates on this issue would help us understand timelines.

@stale
Copy link

stale bot commented Feb 7, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Feb 7, 2021
@Julusian
Copy link
Contributor

Julusian commented Feb 7, 2021

Still valid, PR with a fix to invoke prebuild-install correctly develar/app-builder#47

@marciomarim
Copy link

Any updates on this?

@Julusian
Copy link
Contributor

All merged, waiting for release.
Until that is done I am working around the issue by forcing a newer version of app-builder-bin via resolutions (yarn only)

"resolutions": {
	"electron-builder/**/app-builder-bin": "3.5.13",
}

@sujiewen
Copy link

INFO Building app with electron-builder:
• electron-builder version=22.10.5 os=19.6.0
• electron-rebuild not required if you use electron-builder, please consider to remove excess dependency from devDependencies

To ensure your native dependencies are always matched electron version, simply add script "postinstall": "electron-builder install-app-deps" to your package.json`
• writing effective config file=dist_electron/builder-effective-config.yaml
• rebuilding native dependencies dependencies=sharp@0.28.1 platform=win32 arch=x64
• install prebuilt binary name=sharp version=0.28.1 platform=win32 arch=x64
⨯ cannot build native dependency reason=prebuild-install failed with error and build from sources not possible because platform or arch not compatible
cause=exit status 1
errorOut=prebuild-install info begin Prebuild-install version 6.1.2
prebuild-install WARN install prebuilt binaries enforced with --force!
prebuild-install WARN install prebuilt binaries may be out of date!
prebuild-install info looking for local prebuild @ prebuilds/sharp-v0.28.1-electron-v87-win32-x64.tar.gz
prebuild-install info looking for cached prebuild @ /Users/lc/.npm/_prebuilds/e4bca0-sharp-v0.28.1-electron-v87-win32-x64.tar.gz
prebuild-install http request GET https://github.com/lovell/sharp/releases/download/v0.28.1/sharp-v0.28.1-electron-v87-win32-x64.tar.gz
prebuild-install WARN install connect ETIMEDOUT 192.30.255.112:443

                                command=/usr/local/bin/node /Users/lc/st/wmswarehouse/node_modules/prebuild-install/bin.js --platform=win32 --arch=x64 --target=12.0.5 --runtime=electron --verbose --force
                                workingDir=/Users/lc/st/wmswarehouse/node_modules/sharp

ExecError: /Users/lc/st/wmswarehouse/node_modules/app-builder-bin/mac/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess. (/Users/lc/st/wmswarehouse/node_modules/builder-util/src/util.ts:243:14)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
exitCode: 2,
alreadyLogged: true,
code: 'ERR_ELECTRON_BUILDER_CANNOT_EXECUTE'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@AlanSean
Copy link

All merged, waiting for release.
Until that is done I am working around the issue by forcing a newer version of app-builder-bin via resolutions (yarn only)

"resolutions": {
	"electron-builder/**/app-builder-bin": "3.5.13",
}

I tried, but it didn't work

@dennisameling
Copy link

dennisameling commented Jun 14, 2021

Versions 22.11.1 and higher of electron-builder include the fix for this issue (specifically it includes app-builder-bin 3.5.13 which has the fix).

Please report back here if those versions work for you 👍🏼

AttemptToCallNil added a commit to AttemptToCallNil/MAGE that referenced this issue Jun 14, 2021
Preparing for the postcss update. Note:
- Keytar is intentionally pinned to 7.6.0 due to an electron-builder
  bug that makes 7.7.0 not work.
  atom/node-keytar#380
  electron-userland/electron-builder#5438
pcjcos pushed a commit to MediaWikiAGE/MAGE that referenced this issue Jun 14, 2021
* Update dependencies, part 1

Preparing for the postcss update. Note:
- Keytar is intentionally pinned to 7.6.0 due to an electron-builder
  bug that makes 7.7.0 not work.
  atom/node-keytar#380
  electron-userland/electron-builder#5438

* Update dependencies, part 2

Mostly preparing to get rid of unsupported and vulnerable PostCSS 7.
Notes:
 - This requires a lot of beta versions for Vue-related packages.
   Non-beta versions tend to depend on PostCSS 7.
 - PostCSS 7 is still not eliminated entirely as one of the Vue packages
   still requires 7.
 - The babel-eslint package is deprecated, but can't be upgraded to the
   non-deprecated @babel/eslint-parser package, otherwise the standard
   build process would be broken.
 - The change in the SVG icon component was needed to make SVG icons
   display again. Not sure why this happened.
 - It seems Electron 13 can't be used due to no support from Keytar.

* Fix sorting functions in spellbook.js

* Fix login form allowing to enter "new" data under existing names

This silently overwrote and/or added to old settings. Now it's a
validation error.

* Fix saving wiki farms with certain URL patterns

Closes: #67

* Adjust breakpoints in the login screen

Closes: #65

* Increase vertical spacing in the login form

That makes the fields much more clearly separated.
Closes: #64

* Add event handlers for modals

Currently just the Escape key is handled to close the modal.

Closes: #63

* Update dependencies, part 3

This gets rid of the PostCSS security alert. Unfortunately, two
new and unrelated vulnerabilities were reported in other indirect
dependencies two days ago.

Closes: #66

* Address keyboard navigation in task view modals

The actual view still has some issues.

* Switch to Tailwind utility

and adjust the lightness slightly. This should also fit both light
and dark themes (somewhat).

* Improve task view navigation further

Add focus indicators, fix elements that shouldn't be focusable,
fix the "no input" zone of "Enabled?" checkboxes, and extract the
"deferred focus" hack into its own method. Sigh.

Closes: #59

* Fix logic error with deferred focusing

That added one iteration to the loop = extra 50 milliseconds of waiting.
Improves switching times when the conditionally-rendered element
is absent from the DOM entirely (read: `v-if`).

* Make the controls on the home page more separated

Like with the changes to the login menu.

* Improve keyboard navigation for the home view

Like with the tasks view. Also de-cluttered the HTML by using
`@apply` in a `<style>` rather than specifying all utilities
inline.

* Improve focusing indication in the login view as well

* Import jquery

Why didn't anyone do this before?

* Implement class-based dark mode handling

Simplifies style testing.

Closes: #61

* Persist home view state

This should actually be not just a major usability issue, but a
critical matter of communicating state to other components.

* Fix logic error in home view

Otherwise this will print errors about accessing the `accounts`
property of `undefined`.

* Persist login view data

* Improve inactive input visibility in dark login view

* Persist task view state.

This does not persist actual task process. This will have to be handled
very, very differently, and I'm not sure how yet.

Closes: #53

* Fix improperly using event handler
@KillerCodeMonkey
Copy link

Same here like @AlanSean said. Seems like it is not working. Even with latest version electron-builder and sharp version.
Building the app is not the problem, but after starting it, it freezes and no gui appears (tested with deb and AppImage).
Any idea?

@rrgeorge
Copy link

rrgeorge commented Aug 28, 2021

Same here like @AlanSean said. Seems like it is not working. Even with latest version electron-builder and sharp version.
Building the app is not the problem, but after starting it, it freezes and no gui appears (tested with deb and AppImage).
Any idea?

I think you're experiencing the same issue i just reported here: #6200
If you try running your built application from the command-line, you should see the message: libvips-cpp.so.42: cannot open shared object file: No such file or directory

@stale
Copy link

stale bot commented Apr 17, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the backlog label Apr 17, 2022
@stale stale bot closed this as completed Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants