Symbol not found
See original GitHub issue- Version: “electron-builder”: “^20.38.4”
- Target: macOS & Windows x64
I am writing a small app that utilises serialport as dependency (which itself has native dependencies).
When starting the app in dev mode (npm-run-all --parallel bundle serve
) everything is working fine. I am using electron-rebuild
as postinstall
script to compile the native dependencies for the used Electron (4.0.0) version.
When building the app for production issuing yarn build && electron-builder build --publish never
, I cannot start the app bundle with the following error in the macOS log:
Dyld Error Message:
Symbol not found: __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE
Referenced from: /var/folders/*/.com.my.app.a9yuVC
Expected in: flat namespace
After I have tried building the app, I am no longer able to start the app in dev mode with the shown command. This error is shown when starting the app in dev mode:
dyld: lazy symbol binding failed: Symbol not found: __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE
Referenced from: /Client/node_modules/@serialport/bindings/build/Release/bindings.node
Expected in: flat namespace
dyld: Symbol not found: __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE
Referenced from: /Client/node_modules/@serialport/bindings/build/Release/bindings.node
Expected in: flat namespace
I have to run $(npm bin)/electron-builder install-app-deps
first, only after that I can start the app in dev mode again.
Running ($npm bin)/electron-rebuild
does not work for some reason.
It seems, that this is an issue with the packaging. I am quite new to all the electron, nodejs stuff so I do not think this is a bug. Probably my configuration is wrong. Could anyone please help me out?
EDIT: I’ve created a small test application to reproduce the issue. Maybe it’s helpful. https://github.com/phhoef/serialport-test
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:9 (3 by maintainers)
Top GitHub Comments
@benoist I downgraded keytar to v4.2.1 as a workaround.
I’m seeing the same issue.
I have the “postinstall”: “electron-builder install-app-deps”, added to my package.json
After running yarn I see
Then when I start I get this message:
When I run $(npm bin)/electron-builder install-app-deps I see:
And after that the app starts normally.
When I try to release the app, it runs the install-app-deps again as it did with the postinstall And this causes the same crash in the release version.