Can not upload package to AppStore: ENTITY_ERROR.RELATIONSHIP.INVALID

Hi all,

I'm trying to upload my package to App Store and it fails with status=409 and message: "The provided entity includes a relationship with an invalid value"

Here sequence of my actions and the context:

  1. Packaged java based application with package and signed with "3rd Party Mac Developer Application" (app works nicely).
  2. Build pkg using:

productbuild --sign "3rd Party Mac Developer Installer: MyCompany" --component MyProduct.app /Applications MyProduct.pkg

  1. Verified my package with:

xcrun altool --validate-app ...

No errors (took a while to fix entitlements)

  1. trying to upload my package using:

xcrun altool --upload-package MyProduct.pkg --apple-id "MyID" --bundle-id "my.bundle.id" --bundle-version 6.0.0 --bundle-short-version-string 6.0.0 --type macos -u MyID -p "my-pass-word"

Error message I recieve:

*** Error: Error uploading 'MyProduct.pkg'
*** Error: ENTITY_ERROR.RELATIONSHIP.INVALID: The provided entity includes a relationship with an invalid value Unable to perform upload. (-19211)

 {

    NSLocalizedDescription = "ENTITY_ERROR.RELATIONSHIP.INVALID: The provided entity includes a relationship with an invalid value";

    NSLocalizedFailureReason = "Unable to perform upload.";

    code = "ENTITY_ERROR.RELATIONSHIP.INVALID";

    detail = "MyID" is not a valid ID for this relationship.";

    id = "c5b5de4f-5171-4af9-9d09-63fb73405ca0";

    source =     {

        pointer = "/data/id";

    };

    status = 409;

    title = "The provided entity includes a relationship with an invalid value";

}

Tried to use Transmitter and received following error:

Could not create a temporary .itmsp package for the app “MyProduct.pkg”.

No suitable application records were found. Verify your bundle identifier ‘my.bundle.id’ is correct.

I tried to re-create application in App Store Connect using different identifier and different bundle-id and to rebuild app with new ids- same result.

Any ideas?

We're you able to resolve this issue?

Hey, Did you find a solution? having the exact same issue

I am also experiencing this issue, or at least getting the same error

I got around my error. My issue was that my build number contained a letter (which is not allowed). This is documented elsewhere but was not clear AT ALL from the error message.

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.

The problem is providing the apple id Directly. You need to id number of apple id.

xcrun altool --list-apps -u ${APP_STORE_USERNAME} -p ${pwd}

After running the command you will get the following data.

provide the apple id from that result matches with the bundle id.

Can not upload package to AppStore: ENTITY_ERROR.RELATIONSHIP.INVALID
 
 
Q