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

Write EFAULT unhandled excpetion #9003

Open
hoveywankenobi opened this issue Apr 1, 2025 · 5 comments
Open

Write EFAULT unhandled excpetion #9003

hoveywankenobi opened this issue Apr 1, 2025 · 5 comments

Comments

@hoveywankenobi
Copy link

Running into this EFAULT error when doing a quit and install update running on Raspberry Pi OS Bookworm. It consistently displays this error on every quit and install type update. Debugging leads me to the AppImageUpdater code base but getting stuck on exactly why this is happening.

Executing: /home/Dummy.AppImage with args:
Uncaught Exception:
Error: write EFAULT
at afterWriteDispatched (node:internal/stream_base_commons:161:15)
at writeGeneric (node:internal/stream_base_commons:152:3)
at Socket._writeGeneric (node:net:958:11)
at Socket._write (node:net:970:8)
at writeOrBuffer (node:internal/streams/writable:572:12)
at _write (node:internal/streams/writable:501:10)
at Writable.write (node:internal/streams/writable:510:10)
at execFileSync (node:child_process:938:20)
at func (node:electron/js2c/node_init:2:2559)
at AppImageUpdater.doInstall (/tmp/.mount-oGu7dWw/resources/app.asar/node_modules/electron-updater/out/AppImageUpdater.js:95:42) {
errno: -14,
code: 'EFAULT',
syscall: 'write'
}

@mmaietta
Copy link
Collaborator

mmaietta commented Apr 1, 2025

Just to confirm, what archive are you updating from? AppImage?

If you could provide your electron-builder config, that'd help a bit. I'm not familiar with Raspberry Pi OS though. Last time I used a Raspberry Pi was over a decade ago.

@hoveywankenobi
Copy link
Author

hoveywankenobi commented Apr 1, 2025

@mmaietta - Good call out. Yes, it is an AppImage we are updating from. Here is the electron-builder config, pretty simple config.

"build": {
"appId": "com.org.dummy",
"productName": "org-dummy",
"files": [
"dist-electron",
"dist-react"
],
"extraFiles": [
{
"from": ".env",
"to": "."
}
],
"extraResources": [
"dist-electron/preload.cjs"
],
"icon": "./Icon.png",
"mac": {
"target": "dmg"
},
"linux": {
"target": "AppImage",
"category": "Utility",
"artifactName": "Dummy.${ext}"
},
"win": {
"target": [
"portable",
"msi"
]
},

@hoveywankenobi
Copy link
Author

Interestingly enough this issue seems to be isolated to running on RPi CM 4 with eMMC. Trying the same code and same image on an RPI 5 and running the same update process no Javascript EFAULT errors occur on update. The error behavior is consistent across the 10 RPi CM 4 devices I have. Unfortunately I dont have a RPi CM 4 Lite without the eMMC module to test that running on an SD card to see if it is something in the way the storage is handled causing the issue or if it is something else in the RPi CM 4 hardware

@hoveywankenobi
Copy link
Author

Update to my last message. I was able to test on a standard RPi 4 Model B board using the exact same image and SD card that I had tested on the RPi 5. The Javascript error is present on the update attempt when running on the RPi 4 however is not present when running the exact same SD card on the RPi 5.

@hoveywankenobi
Copy link
Author

I've narrowed it down to this part of the Electron-Updater code:
https://github.com/electron-userland/electron-builder/blob/106640dd42a3db08bfbe3a3a32fe333e93ba5c10/packages/electron-updater/src/AppImageUpdater.ts#L103C5-L106C6

Something specifically happening in this execFileSync that RPi4 doesnt like.

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

No branches or pull requests

2 participants