sindresorhus / get-windows

Get metadata about the active window and open windows (title, id, bounds, owner, etc)
MIT License
792 stars 162 forks source link

.tmp.node is not a valid Win32 application. #112

Open eyesmarty opened 3 years ago

eyesmarty commented 3 years ago

Describe the bug i have created project in electron using vue i am using active-win to get info about currently opened app. active-win works fine for both mac and linux but gives error on windows

To Reproduce

Expected behavior after following steps mentioned in reproduce section as soon as app is openend it should display currently focused app detail in console which works fine for mac and linux

Screenshots

in mac without error

Screen Shot 2021-05-22 at 1 27 24 PM

in window with error

Capture

Environment (please complete the following information):

"active-win": "^7.2.0",
"@vue/cli-plugin-babel": "^4.5.12",
"@vue/cli-plugin-router": "^4.5.12",
"@vue/cli-plugin-vuex": "^4.5.12",
"@vue/cli-service": "^4.5.12",
"electron": "^9.0.0",
"electron-builder": "^22.10.5",
"electron-devtools-installer": "^3.1.0",
"electron-icon-builder": "^1.0.2",
"electron-rebuild": "^2.3.5",
"sass": "^1.32.8",
"sass-loader": "^8.0.2",
"vue-cli-plugin-electron-builder": "^2.0.0-rc.6",
"vue-cli-plugin-vuetify": "^2.3.1",
"vue-template-compiler": "^2.6.11",
"vuetify-loader": "^1.7.2"

process versions

node: '12.14.1', v8: '8.3.110.13-electron.0', uv: '1.33.1', zlib: '1.2.11', brotli: '1.0.7', ares: '1.15.0', modules: '80', nghttp2: '1.40.0', napi: '5', llhttp: '2.0.1', http_parser: '2.8.0', openssl: '1.1.0', icu: '65.1', unicode: '12.1', electron: '9.4.4', chrome: '83.0.4103.122'

Vue.config.js module.exports = { "pluginOptions": { "electronBuilder": { "externals": ['iohook','sqlite-async','sqlite3','active-win'], "nodeIntegration": true, "builderOptions": { "publish": [ "github" ] } } }, "transpileDependencies": [ "vuetify" ] }

Prat1143 commented 3 years ago

Facing the same issue. After installing .exe generated by - "electron-builder --win --x64" it is giving me ".tmp.node is not a valid Win32 application".

wrgoto commented 3 years ago

I ran into the same issue. I noticed that the error occurs when building the WIndows app on a MacOS or Windows machine. As @Prat1143 mentioned above, setting the --x64 flag doesn't solve the issue when building on a MacOS machine (for me). However, it does not occur when building the Windows app on a Windows machine with the --x64 flag.

Not sure why this would be the case.

basantsd commented 2 years ago

Same issue ".tmp.node is not a valid Win32 application".