Closed jakubgs closed 2 months ago
I have attempted to bisect code changes to find the issue, but today all builds are succeeding:
https://ci.infra.status.im/job/status-desktop/job/systems/job/windows/job/x86_64/job/bisect/
This led me to believe that the issue might be with something we do not control, which is the timestamp server:
signtool.exe sign -debug -fd SHA256 -p **** -f **** -tr http://timestamp.digicert.com ${BINARY_TO_SIGN}
For this reason I've contacted DigiCert support about possible issues with their server.
After talking to their support and mentioning our issues I got this response:
Aah I see, I have picked one or 2 customers reaching out regarding our time stamp
One managed to refresh and get it up
And some tested with different servers
So there was no confirmed issues with the server entirely
When experiencing these drops, can you kindly test with the below timestamp servers as well,
to check and confirm if its really the timestamp server
So it is possible that was the issue. I was also given a list of alternative timestamp servers we can try:
http://timestamp.sectigo.com/
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.apple.com/ts01
http://tsa.mesign.com/
http://time.certum.pl/
https://freetsa.org/
Apparently we can also check their service status at: https://status.digicert.com/
You are most welcome,
Yes, when our timestamp server is down, we update our status page, and this is updated by reported issues and running some tests to the server
https://status.digicert.com/
But currently it shows no issues.
My attempts to debug the issue have resulted in some changes:
But it appears -debug
flag for signtool.exe sign
provides no additional useful input in this case.
Apparently signtool.exe
should create logs under: C:\Users\jenkins\Signing Manager\logs
Can you kindly check the signtool logs and share
Below is where you can get your Logs:
C Drive >> Users >> Select your user >> Signing Manager >> Then logs
But no such folder exists for jenkins
.
Apparently another possibility is Windows Defender flagging the binary file as malicious:
I have checked and confirmed with my Senior, after running some further checks on the file and the error.
It looks like the windows defender is flagging the file as a malware, therefore preventing the the file from getting signed.
So this is more of a file issue than the timestamp or the certificate.
Below is one of the sources we have managed to get further information on this error.
Please note that this is not a DigiCert source (checking the "Re: Error Signing an exe-file Quote Tue Oct 24, 2023 7:36 am"):
https://www.advancedinstaller.com/forums/viewtopic.php?t=51721
And indeed:
Unfortunately these seems to be false positive detections of Windows Defender. The quickest action you can implement will be to add a Defender exclusion on the output folder where your setup project is built.
It's quite easy to add an exclusion rule to Defender settings via UI:
But we need a solution that can be applied with Ansible or Powershell in an automated manner.
It appears to be possible with Add-MpPreference
PowerShell command:
https://learn.microsoft.com/en-us/powershell/module/defender/add-mppreference?view=windowsserver2022-ps
I have added exclusion of workspace
folder in infra-ci
:
Currently we are still seeing some signing errors, but the error code is different:
21:06:12 Error information: "Error: SignerSign() failed." (-2146869243/0x80096005)
https://ci.status.im/job/status-desktop/job/systems/job/windows/job/x86_64/job/package/799/console
And I did try a different timestamp server from Sectigo.
It appears to be also a timestamp error, but due to wrong hashing algorithm being used:
Apparently the Sectigo URL can be used but needs an argument:
http://timestamp.sectigo.com/?td=sha256
Fix for the URL:
I'm going to close this, we can always reopen if it happens again.
Since last week we've been seeing failures to sign DLLs and EXE files in CI for Windows builds:
https://ci.status.im/job/status-desktop/job/prs/job/windows/job/x86_64/job/package/job/PR-16189/5/console