A timestamp was expected but was not found

We are facing following message "A timestamp was expected but was not found" during codesign for following .dylib and .pkg and it cause notarization process failed.

We are facing this issue for last 3 days and we have access for timestamp.apple.com and 17.0.0.0/8 and we didn't change firewall settings. We are facing this issue randomly and not for all time(scenario is 3:1).

We tried the below command to sign the package,

codesign --verbose --deep --force --timestamp --options=runtime --sign "<CODE SIGN IDENTITY>" <TO BE SIGNED PACAKGE>

Kindly let us know how to fix this probelm.

Answered by DTS Engineer in 622559022
Based on some great bug reports filed by folks on this thread, the team responsible for the timestamp server was able to track down and fix what they believe is the root cause of this problem. So, everything should be all good now (-:

If you see this problem crop up again (and we’re still investigating why it wasn’t detected by our own internal systems) please file a bug report and then post your bug number here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
What do you see when you run packet trace when signing? Ideally you’d capture one trace for the working case and one trace for the failing one, and compare.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Chiming in to say the same thing has been happening for me right now, and also over the last few days. Having other code-signing problems ('unnotarized Developer ID' reported by spctl) that didn't arise previously, but am assuming this is a coincidence.
Having the same issue atm. It's all started somewhere around last Thursday. Trying to figure out maybe something went wrong with a network on my side.
Same issue for us in Hungary, in multiple development teams, build machines etc., but interestingly, not all of the developer machines.
Same issue for me with the Developer ID Application certificate and the Developer ID Installer certificate, since about 2 days ago.
The pkgbuild and the productbuild also failed.

Same problem - started July 16th. Randomly getting either "segmentation fault: 11" or "A timestamp was expected but was not found" errors when running codesign. MacOS 10.15.6, Xcode 11.6

Tried restarting, changing time server in System Preference > Date & Time,
finally tried using --timestamp=http://timestamp.apple.com/ts01 parameter for codesign,
no change - sometimes it works, sometimes it fails.
@eskimo Kindly find the trace route below,

traceroute timestamp.apple.com

traceroute to timestamp.pki-apple.com.akadns.net (17.179.249.1), 64 hops max, 52 byte packets
 
 3  122.15.156.129 (122.15.156.129)  0.254 ms  0.270 ms  0.234 ms
 4  122.15.149.182 (122.15.149.182)  1.306 ms  1.196 ms  1.258 ms
 5  182.19.106.113 (182.19.106.113)  21.068 ms  21.119 ms  21.515 ms
 6  xe-8-3-2.mlu.cw.net (195.89.101.185)  135.515 ms  124.646 ms  125.076 ms
 7  ae6-xcr1.fix.cw.net (195.2.10.245)  173.146 ms  172.576 ms  173.006 ms
 8  ae0-xcr1.amd.cw.net (195.2.28.29)  172.818 ms  162.635 ms  161.825 ms
 9  ae15-xcr1.att.cw.net (195.2.24.177)  161.600 ms  161.853 ms  172.600 ms
10  apple-gw-att.cw.net (208.173.212.142)  136.138 ms  136.302 ms  136.402 ms
11  17.0.11.64 (17.0.11.64)  262.691 ms
    17.0.11.70 (17.0.11.70)  266.252 ms
    17.0.11.64 (17.0.11.64)  279.198 ms
12  17.0.13.250 (17.0.13.250)  262.091 ms  262.263 ms  262.384 ms
13  17.1.0.7 (17.1.0.7)  290.301 ms
    17.1.0.19 (17.1.0.19)  264.237 ms
    17.1.0.7 (17.1.0.7)  265.058 ms
14  17.1.0.119 (17.1.0.119)  262.646 ms  277.225 ms
    17.1.0.113 (17.1.0.113)  288.798 ms
15  17.0.8.55 (17.0.8.55)  264.563 ms
    17.0.8.35 (17.0.8.35)  265.392 ms
    17.0.8.55 (17.0.8.55)  265.185 ms
16  * * *
17  17.1.1.35 (17.1.1.35)  263.979 ms
    17.0.13.205 (17.0.13.205)  262.185 ms
    17.0.13.201 (17.0.13.201)  274.387 ms
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *


It seems that this problem no longer occurred in Japan.
Currently working for me just now from Australia

Accepted Answer
Based on some great bug reports filed by folks on this thread, the team responsible for the timestamp server was able to track down and fix what they believe is the root cause of this problem. So, everything should be all good now (-:

If you see this problem crop up again (and we’re still investigating why it wasn’t detected by our own internal systems) please file a bug report and then post your bug number here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
@eskimo, Thank you, Its working fine now as we expected.
I am seeing this starting this evening - did something happen again?
This is on a build server that has worked for years - nothing has changed on it or on its network. I sign (as a part of my build) 5 different binaries. A different one fails each time. I was able to take a PCAP from that machine during its build process - and it shows three successful time stamping as and a fourth request (with no corresponding response).

I was able to take a PCAP from that machine during its build process -
and it shows three successful time stamping as and a fourth request
(with no corresponding response).

Well, that’s not good. You should file a bug report about this, making sure to include your packet traces. Once you’re done, please post your bug number here.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Faced the same problem. Nothing changed on our CI machine, but the build stopped working with codesign "a timestamp was expected but was not found" error. wrote to the feedback assistant - FB9288985

call traceroute timestamp.apple.com gives:

traceroute to timestamp.pki-apple.com.akadns.net (17.179.249.1), 64 hops max, 52 byte packets
 1  188.128.25.25 (188.128.25.25)  0.718 ms  0.360 ms  0.547 ms
 2  5.143.233.1 (5.143.233.1)  1.541 ms  1.637 ms  1.541 ms
 3  87.226.174.241 (87.226.174.241)  1.918 ms  1.715 ms  1.627 ms
 4  * * 188.128.126.81 (188.128.126.81)  43.306 ms
 5  17.1.168.136 (17.1.168.136)  48.196 ms  36.598 ms  57.129 ms
 6  17.0.12.112 (17.0.12.112)  228.237 ms  218.270 ms
    17.0.12.116 (17.0.12.116)  222.642 ms
 7  17.1.3.243 (17.1.3.243)  218.001 ms  210.820 ms  219.386 ms
 8  17.1.3.240 (17.1.3.240)  223.942 ms
    17.1.3.242 (17.1.3.242)  211.452 ms  219.917 ms
 9  17.1.2.171 (17.1.2.171)  230.444 ms
    17.1.2.179 (17.1.2.179)  219.296 ms  226.349 ms
10  17.1.2.176 (17.1.2.176)  219.132 ms  212.270 ms  219.311 ms
11  17.1.0.119 (17.1.0.119)  220.040 ms
    17.1.0.113 (17.1.0.113)  211.403 ms  218.593 ms
12  17.0.8.35 (17.0.8.35)  236.001 ms  210.848 ms  224.461 ms
13  * * *
14  17.0.13.205 (17.0.13.205)  225.599 ms
    17.1.1.35 (17.1.1.35)  230.321 ms
    17.0.13.205 (17.0.13.205)  212.251 ms
15  * * *
16  * * *
17  * * *

Today faced this problem on CI machine. Where is no changes in configuration. From time to time codesign failed with "a timestamp was expected but was not found". Wrote request in feedback assistant FB9290141.

Experiencing this in Hungary again, too. As before, not on every machine.

I Faced same problem from few days ago in Japan. I wrote to feedback assistant FB9282952.

I'm actively facing this issue and cannot codesign any of my builds on CI. This is a major problem for us.

https://developer.apple.com/forums/thread/687788

Created a ticket in Feedback Assistant, FB9493987.

Paging @eskimo? 🙏

Created a ticket in Feedback Assistant, FB9493987.

I’ll respond on your new thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi, 

This issue is happening from this week. It works sometimes. Both Codesign and productsign commands are failing. I have created FB10804197. It is working from our office in California. Could you please help. 

regards 

Prema Kumar 

It is working from our office in California.

Given your other recent thread, I suspect that this is more to do with the network setup in your non-California office than the timestamp service itself.

The timestamp service is an HTTP server available at timestamp.apple.com. I recommend that you try running some standard network diagnostics in the office where you’re having problems. For example:

% curl http://timestamp.apple.com
<html>
<head><title>302 Found</title></head>
<body>
<center><h1>302 Found</h1></center>
<hr><center>Apple</center>
</body>
</html>

The 302 response means that the request made it through to the origin server.

And:

% telnet timestamp.apple.com 80
Trying 17.32.213.129...
Connected to timestamp.pki-apple.com.akadns.net.
Escape character is '^]'.
^]
telnet> q
Connection closed.

The telnet tool is no longer built-in to macOS but you can either install it yourself use use nc.

And:

% host timestamp.apple.com
timestamp.apple.com is an alias for timestamp.pki-apple.com.akadns.net.
timestamp.pki-apple.com.akadns.net has address 17.32.213.129

And:

% traceroute timestamp.apple.com
traceroute to timestamp.pki-apple.com.akadns.net (17.32.213.129), 64 hops max, 52 byte packets
…

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi Quinn,

Thank you for the support. I have tried the commands and updated the ticket. It takes more than one minute to establish the connection. Sometime the connection gets timeout as well.

regards Prema Kumar

A timestamp was expected but was not found
 
 
Q