Tmp.Node is not a valid Win32 application
See original GitHub issue-
Version: 22.4.1
-
Electron Version: 9.2.1
-
Target: Mac, Windows, Linux
I am trying to build my electron application for all 3 platforms. I am using mac as build server. I am using below given command to build
electron-builder -mwl
Below is my build configuration in package json. Also note that i am using sqlite3 package which i use by running electron rebuild command.
"build": {
"appId": "appName",
"directories": {
"output": "output-path"
},
"mac": {
"category": "your.app.category.type",
"icon": "/desktop-app-icon-mac-512.icns",
"target": "dmg"
},
"win": {
"icon": "/desktop-app-icon-win-256.ico",
"target": [
{
"target": "nsis",
"arch": [
"x64",
"ia32"
]
}
]
},
"linux": {
"target": [
{
"target": "AppImage",
"arch": [
"x64"
]
}
]
},
"files": [
"/views/"
],
"publish": {
"provider": "generic",
"url": ""
},
"nsis": {
"deleteAppDataOnUninstall": true
}
}
Generated DMG file works successfully on mac, but after installing executable on 64 bit machine, below given error is logged in renderer process console
Uncaught Error: Uncaught (in promise): Error: \\?\{local-dir-path}\AppData\Local\Temp\10\1435ac1f-8452-42d8-952d-e07381d1b44b.tmp.node is not a valid Win32 application.
\\?\{local-dir-path}\AppData\Local\Temp\10\1435ac1f-8452-42d8-952d-e07381d1b44b.tmp.node
Error: \\?\{local-dir-path}\AppData\Local\Temp\10\1435ac1f-8452-42d8-952d-e07381d1b44b.tmp.node is not a valid Win32 application.
\\?\{local-dir-path}\AppData\Local\Temp\10\1435ac1f-8452-42d8-952d-e07381d1b44b.tmp.node
at process.func [as dlopen] (electron/js2c/asar.js:140:31)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1034:18)
at Object.func [as .node] (electron/js2c/asar.js:149:18)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> ({local-dir-path}\AppData\Local\Programs\{app-name}\resources\app.asar\node_modules\sqlite3\lib\sqlite3-binding.js:4:15)
It seems like 32-bit version got installed on 64 bit windows machine. If i create build for windows-only on 64-bit windows machine, then it is working fine. As it is clear in configuration, i am creating installer for both 32 and 64 bit platforms, i can confirm that installer contains both 32 and 64 bit application because my exe file got doubled once i included 32 bit architecture.
Does anybody else had the same issue? Kindly share your experiences.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6
Top GitHub Comments
@jjason685 Thank you for the suggestion. My problem got fixed too by upgrading sqlite3 to latest version (^5.0.0).
@asadmalik3 I was. Sorry for the late response, but I fixed it simply by upgrading sqlite3 to the latest version (^5.0.0 for me). Hope this helps.