microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.24k stars 1.14k forks source link

Failure to sign appx during deployment #7710

Closed NickGerleman closed 3 years ago

NickGerleman commented 3 years ago

and after installing visual studio manually and running install script again

npx react-native run-windows --logging

image

Originally posted by @rendomnet in https://github.com/microsoft/react-native-windows/issues/7436#issuecomment-830558863

NickGerleman commented 3 years ago

Note that there were some cert logic changes in 0.64 with https://github.com/microsoft/react-native-windows/pull/6646

This is also likely using the new deployment mechanism

asklar commented 3 years ago

@rendomnet do you have KB4535996 installed? if so that could be the source of the issue. See https://developercommunity.visualstudio.com/t/failed-to-sign-appx/934749

Uninstalling that KB seems to have worked for folks.

chrisglein commented 3 years ago

We believe this is resolved by getting the right KBs (either uninstalling the above one and/or moving forward to the next). @rendomnet let us know if that doesn't unblock you.

rendomnet commented 3 years ago

@chrisglein @asachin96 I don't have this update. image

asklar commented 3 years ago

Can you share the build log? (*.binlog file)

rendomnet commented 3 years ago

msbuild.zip

asklar commented 3 years ago

tagging @svetbonev and @srdjanjovcic to comment on this package signing failure

SvetBonev commented 3 years ago

@japarson FYI

@rendomnet Unfortunately, it seems signtool.exe didn't print a reason why it failed. Would you be able to run signtool.exe manually to try to sign the .appx package and see if you could capture more details? I would also suggest to pass /v on the command line for verbose output.

rendomnet commented 3 years ago

@SvetBonev what should I do exactly? image

rendomnet commented 3 years ago

okay I found the issue. signintool was not in ENV PATH. after adding 'C:\Program Files (x86)\Microsoft SDKs\ClickOnce\SignTool' to enviroment PATH app started.

asklar commented 3 years ago

it's weird that signtool wouldn't be found by the project system (there should be another one that isn't in the ClickOnce directory too, afaik) so it would be interesting to understand why/how you got into this state. Any idea what could have happened @SvetBonev ?

SvetBonev commented 3 years ago

@rendomnet We expect to find signtool.exe at "\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86\signtool.exe"

Does the binary exist in this location? If not, could you repair the Windows 10 SDK version 10.0.19041.0?

rendomnet commented 3 years ago

@SvetBonev yes file exists in \Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86\signtool.exe

ghost commented 3 years ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 14 days of this comment.