MSI build fails with light.exe : error LGHT0216 : An unexpected Win32 exception with error code 0x2 occurred: File not found.
See original GitHub issue- Version: 21.2.0
- Target: Windows
The MSI build is failing. My OS details: Wine: 4.17 OS: openSUSE Tumbleweed
rush@rushpod: /c [master] 2m 30s » electron-builder -w
• electron-builder version=21.2.0 os=5.3.5-1-default
• loaded configuration file=/c/electron-builder.json
• writing effective config file=dist/builder-effective-config.yaml
• packaging platform=win32 arch=x64 electron=6.0.12 appOutDir=dist/win-unpacked
• building target=MSI arch=x64 file=dist/App-v4.20.0.msi
• building target=nsis file=dist/App-v4.20.0.exe archs=x64 oneClick=true perMachine=true
• building target=portable file=dist/Portable App v4.20.0.exe archs=x64
⨯ cannot execute cause=exit status 216
out=WiX Toolset Linker version
Copyright (c) .NET Foundation and contributors. All rights reserved.
Updating file information.
Creating cabinet files.
There will be '8' threads used to produce CAB files.
Creating cabinet 'C:\users\rush\Temp\wix191022T1311510164\#cab1.cab'.
Generating database.
errorOut=Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 key0009:fixme:mscoree:ConfigFileHandler_startElement Unknown element L"loadFromRemoteSources" in state 4
0009:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\\windows\\system32\\tzres.dll", (null), 0x32ec68, 0x155078, 0x32ec6c, 0x32ec60
0009:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\\windows\\system32\\tzres.dll", (null), 0x32ec68, 0x155290, 0x32ec6c, 0x32ec60
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
002d:fixme:cabinet:FCIAddFile compression 1503 not supported, defaulting to none
0009:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
light.exe : error LGHT0216 : An unexpected Win32 exception with error code 0x2 occurred: File not found.
command=wine 'Z:\home\rush\.cache\electron-builder\wix\wix-4.0.0.5512.2\light.exe' -out 'Z:\c\dist\App-v4.20.0.msi' -v -spdb -sw1076 '-dappDir=Z:\c\dist\win-unpacked' -pedantic -wx -sval project.wixobj
workingDir=
After running with WINEDEBUG
I am getting the following log:
rush@rushpod:/c/dist/__msi-x64> WINEDEBUG=warn+all wine 'Z:\home\rush\.cache\electron-builder\wix\wix-4.0.0.5512.2\light.exe' -out 'Z:\c\dist\App-v4.20.0.msi' -v -spdb -sw1076 '-dappDir=Z:\c\dist\win-unpacked' -pedantic -wx -sval project.wixobj
0009:warn:ntdll:NtQueryFullAttributesFile L"\??\C:\users\rush\Temp\wix191022T1330010109\InstallExecuteSequence.idt" not found (c0000034) 0009:warn:ntdll:NtQueryAttributesFile L"\??\C:\users\rush\Temp\wix191022T1330010109\InstallExecuteSequence.idt" not found (c0000034) 0009:warn:ntdll:NtQueryFullAttributesFile L"\??\C:\users\rush\Temp\wix191022T1330010109\MsiFileHash.idt" not found (c0000034) 0009:warn:ntdll:NtQueryAttributesFile L"\??\C:\users\rush\Temp\wix191022T1330010109\MsiFileHash.idt" not found (c0000034) 0009:warn:ntdll:FILE_CreateFile L"\??\C:\users\rush\Temp\wix191022T1330010109\#cab1.cab" not found (c0000034) 0009:warn:file:CreateFileW Unable to create file L"C:\users\rush\Temp\wix191022T1330010109\#cab1.cab" (status c0000034) 0009:warn:ntdll:FILE_CreateFile L"\??\C:\windows\mono\mono-2.0\lib\mono\gac\System\4.0.0.0__b77a5c561934e089\Kernel32.dll" not found (c0000034) 0009:warn:ntdll:FILE_CreateFile L"\??\Z:\usr\bin\…\lib\wine\kernel32.dll" not found (c0000034) light.exe : error LGHT0216 : An unexpected Win32 exception with error code 0x2 occurred: File not found.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13
Top GitHub Comments
I have changed my root package.json from:
To:
Which avoids this error for now - just remove the “msi” target option.
In case anyone stumbles upon this error: for me this error was triggered by disabling asar. When building with asar enabled, the MSI builds without problems.