-
Notifications
You must be signed in to change notification settings - Fork 194
Keytar + Electron: Works on OSX, "Error: %1 is not a valid Win32 application" on Windows #39
Comments
I'm running into the same issue, but I'm also not sure how to fix it. |
i got same error and managed that. console.log(process.arch); also check out electron-rebuild for building module instead of using node-gyp directly. |
rebuild with electron-rebuild works for me
|
I am still running into this while building a windows package on a Mac OS. Is there a specific way keytar needs to be rebuilt if doing this? |
same error for me |
In my experience, I had to build the Windows version of my electron app on windows in order for modules to be compiled and packaged properly. So, I built my package for Mac on Mac, and the windows app on windows. I don't think this is necessary if you don't have any native modules. In that case you can build and package on one platform for all platforms. But for native modules, I was only able to get it to work by building and packaging on the same platform that I'm targeting. I've heard that you might be able to use wine on mac to build and compile native modules into electron apps. I tried it, but it didn't work for me. Microsoft provides free VM you can use for these purposes |
Running TL;DR:
|
same error |
Getting the same error. |
@xp6530 @levinunnink can you try deleting your |
As I read here, there is nothing to do to compile an electron app for Windows from macOS and compile the Windows version should be done on Windows ? Right ? If no, could someone help me ? I've the |
Hi all, did anyone have any luck with this? I'm hitting the same error and have tried all the suggestions above. Thanks |
Thanks @popod ! Appreciate the help. |
So I have to compile electron on a Windows machine to get correct Windows executables? Thats a problem because i don't have one |
This now should be resolved thanks to #67. |
Still happening with the latest version of node-keytar after building an electron x64 app. |
@IGassmann which version of Electron are you trying to target? |
Hi everyone, I am also getting this issue (the one @IGassmann is reporting). I am using electron 4.0.4 and keytar 4.4.0. I am using electron-builder to build a 64 bit windows package. But when I run the app (the package is successfully built, problem happens on app execution) I get this error. Not an issue on mac Any ideas how I can work around this at the moment? |
Same as @adeperio but weirdly it happens only in some conditions, could only reproduce it with CI now |
We still didn't find out the reason but might be that manually clearing node_modules may help (even with |
i'm using the Thanks |
So, we are trying to automate our builds using We're getting the same error in the console:
I'm wondering if there is a way for the prebuild to not try and detect what OS it's on and specify it directly? Or the prebuild can recognize Wine is installed and instead build for Windows? For reference, here is the output from the prebuild of keytar inside the wine docker container. As you can see it's building all 10 versions from v75 to v85 as linux instead of windows: |
|
I added Keytar to my Electron app and ran electron-rebuild on it. After packaging the resulting app works just fine on OSX, but when I try to run the .exe on windows I get the dreaded:
I read that this might be due to the module being built for x64 which makes it not run on an ia32 environment.
So I installed node-gyp and rebuilt the module using:
It built fine but I got the same result after packaging the app for win32.
Is there any way to get this running on a 32-bit windows environment? Am I doing something wrong when in rebuilding step?
I can see that keytar is at least included inside the app folder after packaging. Is there a way to tell what architecture keytar was built for?
Thanks in advance for any help.
The text was updated successfully, but these errors were encountered: