ERROR ITMS-90034: Missing or invalid signature

I have been uploading new versions of my app for months and months but yesterday, when I was preparing a new Testflight build I got the following message:
ERROR ITMS-90034: Missing or invalid signature

This came after the archive ended up successfully.
I got an email from App Store Connect with the following

ITMS-90034: Missing or invalid signature - The bundle 'com.XXXX.ZZZZ' at bundle path 'Payload/YYYY.app' is not signed using an Apple submission certificate.

This is weird as I have in Xcode the "Automatically manage signing" activated and nothing has changed from last build to this one.

Any idea?
Your best course of action here will be to file a bug report. When you do so, could you attach some additional logging to help us triage this? Launch Xcode like so in Terminal:

xcode-select -p/../MacOS/Xcode

Reproduce the issue. Then find a line in Xcode’s Terminal output that refers to an xcdistributionlogs bundle and attach it.
ERROR ITMS-90034: Missing or invalid signature
 
 
Q