Skip to content
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

Error during signing when running as Windows SYSTEM user #1164

Closed
nicowiggersiv opened this issue Jan 24, 2017 · 4 comments · May be fixed by qcif/data-curator#563
Closed

Error during signing when running as Windows SYSTEM user #1164

nicowiggersiv opened this issue Jan 24, 2017 · 4 comments · May be fixed by qcif/data-curator#563
Labels

Comments

@nicowiggersiv
Copy link

nicowiggersiv commented Jan 24, 2017

#

  • Version: 11.5.1
  • Target: ia32

We have a Windows 7 host running jenkins and I'm trying to build an electron app with electron-builder. The Jenkins service is using the SYSTEM user. During the build process electron-builder creates a folder under C:\Windows\System32\config\systemprofile\AppData\Local , the local app data folder of the SYSTEM user. From this folder C:\Users\at-builduser.SIV\AppData\Local\electron-builder\cache\winCodeSign\winCodeSign-1.6.0\windows-6\signtool.exe is called. This process fails which I can reproduce on the CMD when I start signtool.exe with no arguments (application error). If I put this folder in a different location I can execute signtool.exe. In addition, if I copy the electron-builder folder on my local machine from myuser\AppData\local to C:\Windows\System32\config\systemprofile\AppData\Local I get the same error when trying to launch it from there. So it looks like that something is prohibiting to run it from the SYSTEM local app folder. Is it possible to change the folder where electron-builder puts it folder to?

@nicowiggersiv
Copy link
Author

Just tried to build it without signing. In this case makensis.exe fails:

Error: C:\Windows\system32\config\systemprofile\AppData\Local\electron-builder\cache\nsis\nsis-3.0.4\Bin\makensis.exe exited with code 3221225781

@develar
Copy link
Member

develar commented Jan 24, 2017

Duplicates #1097 See solution — #503 (comment)

@nicowiggersiv
Copy link
Author

It doesn't seem to be the environment variables. In one CMD I can't execute makensis/signtool but after copying it to a different folder I can run it from there. So in this case the environment does not change, neither does the working directory. However it look like the DLLs of these tools are not found. Perhaps this is a security restriction (so far I haven't found a cause for this restriction).

My current workaround that solves this is to change LOCALAPPDATA in the Jenkins batch file build step before running npm run dist:
SET LOCALAPPDATA=C:\electron-builder_localappdata

@develar
Copy link
Member

develar commented Jan 25, 2017

Thanks for clear explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants