-
Notifications
You must be signed in to change notification settings - Fork 244
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
Unpacked paths that include the Windows \\?\ hack to support long paths do not resolve #129
Comments
It is not a bug of asar after my 2 day digging.
I flow laggingreflex's idea. |
In my case with node sqlcipher, I got this error on Window 7 Problem was due to missing dll. Adding these to application folder solved it. icudt57.dll |
if you use electron-builder, you can use config.extraFiles, copy files from your node addon directory(include dll) to electron root.
|
The reason for this error may be the .node file cannot find its required .dll files. |
I believe my issue is related to #75, but nobody is responding to my comments on that issue.
I am getting the following error when I try and run my installed app on Windows:
Uncaught Error: The specified module could not be found.
\?\C:\Users\myuserid\AppData\Local\Programs\MyApp\resources\app.asar.unpacked\AmdGen\node_modules\java\build\Release\nodejavabridge_bindings.node
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
at Object.Module._extensions..node (module.js:598:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\myuserid\AppData\Local\Programs\MyApp\resources\app.asar.unpacked\AmdGen\node_modules\java\lib\nodeJavaBridge.js:21:16)
at Object. (C:\Users\myuserid\AppData\Local\Programs\MyApp\resources\app.asar.unpacked\AmdGen\node_modules\java\lib\nodeJavaBridge.js:316:3)
GUI.js:33 Uncaught TypeError: Cannot read property 'on' of undefined
at onLoad (GUI.js:33)
at onload (Index.html:8)
I have verified that the nodejavabridge_bindings.node file has indeed been unpacked and exists at the path specified.
Note: The \?\ prefix before the C: is apparently a hack from Microsoft that triggers proper support for long paths. I'm not sure what is adding that prefix as it appears from the stack trace that the path started without it and it was added before calling dlopen in ELECTRON_ASAR.js where the failure apparently happens. (https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath)
I am using electron-builder to create my installer.
I tried resolving this problem by manually adding the following to the "build" portion of my package.json file before building the installer:
That did not help.
My suspicion is that the \?\ prefix has, at some point, been introduced to allow electron (or Node.js) to support long paths on the Windows platform, but something in the dlopen() method inside ELECTRON_ASAR.js doesn't understand this weird notation.
I'm currently at electron version 1.7.5 and electron-builder version 19.20.1.
The text was updated successfully, but these errors were encountered: