Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid cross reference id when creating new package version #2133

Closed
barak-11 opened this issue May 13, 2023 · 9 comments
Closed

invalid cross reference id when creating new package version #2133

barak-11 opened this issue May 13, 2023 · 9 comments
Labels
investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer

Comments

@barak-11
Copy link

barak-11 commented May 13, 2023

Summary

Unable to create new package version for unlocked packages. getting:

Error (1): Multiple errors occurred: 
(1) my_app: invalid cross reference id

Steps To Reproduce:

  1. update sf-cli to
    @salesforce/cli/1.77.6 darwin-arm64 node-v19.9.0
    or sfdx-cli to 7.200.7
  2. Include profileActionOverrides tag in the lightning application
<profileActionOverrides>
        <actionName>View</actionName>
        <content>General_Contact</content>
        <formFactor>Large</formFactor>
        <pageOrSobjectType>Contact</pageOrSobjectType>
        <recordType>Contact.Customer</recordType>
        <type>Flexipage</type>
        <profile>Customer</profile>
    </profileActionOverrides>
  1. run sf package version create --package "myPackage" -x --wait 100
    or run sfdx package:version:create -p "myPackage" -x -w 100

Expected result

expected it work as it did the day before I upgraded the sf-cli.
Version create.... Create version status: Success

Actual result

Error (1): Multiple errors occurred: 
(1) my_app: invalid cross reference id

System Information

using zsh on Mac Ventura

{
  "cliVersion": "@salesforce/cli/1.77.6",
  "architecture": "darwin-arm64",
  "nodeVersion": "node-v19.9.0",
  "osVersion": "Darwin 22.3.0",
  "shell": "zsh",
  "rootPath": "/opt/homebrew/lib/node_modules/@salesforce/cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.1.9 (core)",
    "@oclif/plugin-commands 2.2.14 (core)",
    "@oclif/plugin-help 5.2.9 (core)",
    "@oclif/plugin-not-found 2.3.23 (core)",
    "@oclif/plugin-plugins 3.0.1 (core)",
    "@oclif/plugin-search 0.0.17 (core)",
    "@oclif/plugin-update 3.1.13 (core)",
    "@oclif/plugin-version 1.3.3 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.36 (core)",
    "@oclif/plugin-which 2.2.19 (core)",
    "@salesforce/cli 1.77.6 (core)",
    "apex 2.2.15 (core)",
    "auth 2.7.14 (core)",
    "data 2.3.14 (core)",
    "deploy-retrieve 1.8.18 (core)",
    "info 2.6.10 (core)",
    "limits 2.3.13 (core)",
    "login 1.2.8 (core)",
    "org 2.7.3 (core)",
    "packaging 1.16.11 (user)",
    "schema 2.3.10 (core)",
    "settings 1.4.6 (core)",
    "sobject 0.1.18 (core)",
    "source 2.10.7 (core)",
    "telemetry 2.2.0 (core)",
    "templates 55.4.13 (core)",
    "trust 2.4.14 (core)",
    "user 2.3.10 (core)"
  ]
}

Additional information

Was able to resolve it by reverting to old sfdx version 7.196.9 and executing: sfdx package:version:create -p "myPackage" -x -w 100.
Another way to resolve it is just to remove the profileActionOverrides but that doesn't really help.

@barak-11 barak-11 added the investigating We're actively investigating this issue label May 13, 2023
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@mshanemc
Copy link
Contributor

please see: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profileactionoverride.htm?q=profileActionOverrides

ProfileActionOverrides aren’t supported in packaging. They’re supported in change sets, but you have to add them manually.

We had a recent bug with certain node versions where that command would "succeed" but not really.
general issues with node 18.16.0. You might be getting the proper error now instead of a false negative.

@mshanemc mshanemc added the more information required Issue requires more information or a response from the customer label May 15, 2023
@arafesthain
Copy link

arafesthain commented May 19, 2023

@mshanemc just saw that ProfileActionOverrides cannot be used in package but was working fine since a long time.
Also Profiles meta are (at least it seems) not pushed anymore in the package version create phase (IMHO that's the verry root cause of the error for @barak-11 and me)
I have a Unit test that is failing when querying the needed profile. I can open a different issue if needed. But I first came here due to the profile was not found anymore in profileActionOverides (error is coming from missing profile and not unpackageable profileActionOveride)

{
  "cliVersion": "sfdx-cli/7.201.6",
  "architecture": "linux-x64",
  "nodeVersion": "node-v18.15.0",
  "osVersion": "Linux 5.15.0-1037-azure",
  "shell": "bash"
}

@iowillhoit
Copy link
Contributor

Hello @barak-11, you mentioned that this just recently stopped working. Can you please try a few more versions and narrow down the exact CLI version in which this broke? That will make it easier to track down what changed.

@arafesthain
Copy link

hello @iowillhoit
I tried to revert to the last Success build sfdx version (7.194.1) but did not help. The package version create is failing even with version where it was working fine.

Error (1): Multiple errors occurred: 
(1) FS_Change_Requests _(ligthning app metadata)_ : invalid cross reference id

{
"cliVersion": "sfdx-cli/7.194.1",
"architecture": "linux-x64",
"nodeVersion": "node-v18.15.0"
}

@mshanemc
Copy link
Contributor

If no CLI versions work anymore, that adds support for the theory that the packaging process changed to align with the docs.

@arafesthain
Copy link

arafesthain commented May 23, 2023

@mshanemc yes you right. that's why if you look into my previous comment I tried to remove profileActionOveriddes from the picture.
I don't think there is anything link to profileActionOveriddes. The problem comes from custom Profile (in our case) that cannot be found.

#2153

@iowillhoit
Copy link
Contributor

Closing this issue as it seems that the process now matches the documentation as Shane mentioned. Will continue the other discussion in 2153

@arafesthain
Copy link

#2192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer
Projects
None yet
Development

No branches or pull requests

4 participants