I have the same problem, I don't know why. It's not the build number or anything like that.
xcrun altool --upload-package MyExportedArchive.ipa --apiKey <API_KEY> --apiIssuer <API_ISSUER> --type ios --bundle-id my.bundle.id.whatever-MyExportedArchive --bundle-version 1 --bundle-short-version-string 1.0 --apple-id my.apple.id@foobar.com
2022-09-17 20:07:13.646 *** Error: Error uploading 'MyExportedArchive.ipa'.
2022-09-17 20:07:13.648 *** Error: The provided entity includes a relationship with an invalid value: 'my.apple.id@foobar.com' is not a valid ID for this relationship. Unable to perform upload. (-19211)
{
NSLocalizedDescription = "The provided entity includes a relationship with an invalid value: 'my.apple.id@foobar.com' is not a valid ID for this relationship.";
NSLocalizedFailureReason = "Unable to perform upload.";
code = "ENTITY_ERROR.RELATIONSHIP.INVALID";
detail = "'my.apple.id@foobar.com' is not a valid ID for this relationship.";
id = "<...>";
source = {
pointer = "/data/id";
};
status = 409;
title = "The provided entity includes a relationship with an invalid value";
}
I tried switching --bundle-version and --bundle-short-version-string around, thinking maybe I got the terms wrong, but that didn't help either. It explicitly says there's some issue with my AppleID email address, I don't know why. When I try doing this using --username and --password instead, the fundamental error is the same.