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

Mutliple issues with both beta and non-beta commands #1814

Closed
bdovh opened this issue Nov 17, 2022 · 38 comments
Closed

Mutliple issues with both beta and non-beta commands #1814

bdovh opened this issue Nov 17, 2022 · 38 comments
Labels
investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer

Comments

@bdovh
Copy link

bdovh commented Nov 17, 2022

I have opened a SF Support ticket but it has been more than a month and I can't get exact answer from higher management. Should we use beta or non-beta commands if both of them fail?

Summary

Mutliple issues with both beta and non-beta commands

Steps To Reproduce:

  1. Try to use sfdx force:package:version:create
    On the same codebase but with different package id there are different multiple errors.
    While if using sfdx force:package:beta:version:create, it is created without issues.

  2. Try to use sfdx force:package:beta:install command.
    If installation fails, no clues are output to troubleshoot why install fails.

  3. Try to use sfdx force:package:beta:uninstall command.
    If installation fails, no clues are output to troubleshoot why install fails.

While if using sfdx force:package:uninstall command, if there are failures, they are returned in json or other formats.

@bdovh bdovh added the investigating We're actively investigating this issue label Nov 17, 2022
@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.

@bdovh
Copy link
Author

bdovh commented Nov 18, 2022

Update.

Well, neither or beta or non-beta commands function properly.

Using command sfdx force:package:uninstall also fails

Uninstall Failed for the previous QA Console Package version 0.8.0.6 (0.8.0) with subscriber install id 04t5Y000001nUp0QAE from com sandbox ([email protected]) with errors null

Uninstall has been performed successfully but the command execution failed.

@bdovh
Copy link
Author

bdovh commented Nov 18, 2022

Uninstall Failed for the previous Finalize package version 1.25.0.56 (1.25.0 HotFix troubleshoot) with subscriber install id 04t5Y000001eUhSQAU from com sandbox ([email protected]) with errors Missing message package_uninstall_report:InProgress for locale en_US.

@peternhale
Copy link
Contributor

@bdovh Could you provide the errors you are seeing, aside from the missing message.

I could also use the results of sfdx version --verbose. Thank you

@shetzel
Copy link
Contributor

shetzel commented Nov 22, 2022

Should we use beta or non-beta commands if both of them fail?
I would reference this pinned post first: #1721

We want to move towards the beta commands and away from the packaging commands that are in the salesforce-alm plugin (i.e., the current "production" commands but what we refer to as deprecated and "legacy" since they will be replaced by the beta commands). An issue should be filed for the beta command(s) whenever they fail unexpectedly. If the failure is in a CI script and you can't switch to the beta command in your script then we can work on patching the legacy command(s), but we want to avoid that since those will be unmaintained when the switch from beta to production is made the first week in January 2023.

@bdovh
Copy link
Author

bdovh commented Nov 23, 2022

I had multiple issues with beta commands as well as with salesforce-alm plugin

Regarding beta command.

These two commands fail and do not provide the correct results

sfdx force:package:beta:uninstall:report

sfdx force:package:beta:install:report

@peternhale
Copy link
Contributor

@bdovh thank for your response. Could you provide the results of sfdx version --verbose as well as the errors you are getting from the beta commands.

@bdovh
Copy link
Author

bdovh commented Nov 23, 2022

I am always using the latest version and I had to switch back to sfdx force: package :uninstall:report and sfdx force: package :install:report commands because these failures are blockers for our CI development process...

I have outlined errors above

Uninstall Failed for the previous QA Console Package version 0.8.0.6 (0.8.0) with subscriber install id 04t5Y000001nUp0QAE from com sandbox ([email protected]) with errors null

and previously there was just failures but no error messages (so either install or uninstall may actually perform successfully or fail but beta commands reported status in a wrong way and didn't specify the failure reason)

@peternhale
Copy link
Contributor

peternhale commented Nov 23, 2022

@bdovh I tried to install the package QA Console with both beta and prod commands. Both produce the same error.

Encountered errors installing the package!,Installation errors: 
1) Invalid Upgrade., Details: The package you're installing depends on package 'Finalize', version '1.24'. Install package 'Finalize' in the target org before you install package 'QA Console'.

Is this the error you are seeing?

Also, if you give me the 04t Id for Finalize (I dont see the package on AppExchange), I would be happy to continue testing this.

@bdovh
Copy link
Author

bdovh commented Nov 23, 2022

No, that's not. I was trying to uninstall it and received an error when uninstalling

@peternhale
Copy link
Contributor

@bdovh So the uninstall error you are seeing is errors null, correct?

can you share the 04t ids I need to try and reproduce that error?

I need to install before I can uninstall.

@bdovh
Copy link
Author

bdovh commented Nov 23, 2022

I had the similar error with the base package version

Uninstall Failed for the previous Finalize package version 1.25.0.56 (1.25.0 HotFix troubleshoot) with subscriber install id 04t5Y000001eUhSQAU from com sandbox ([email protected]) with errors Missing message package_uninstall_report:InProgress for locale en_US.

@bdovh
Copy link
Author

bdovh commented Nov 23, 2022

there were several different errors:
errors null
or
error

Missing message package_uninstall_report:InProgress for locale en_US

@bdovh
Copy link
Author

bdovh commented Nov 23, 2022

Uninstall Failed for the previous Finalize package version 2.0.0.87 (2.0.0 Agreement Status Revamp) with subscriber install id 04t5Y000001eUgjQAE from com sandbox ([email protected]) with errors Missing message package_uninstall_report:InProgress for locale en_US.

Such errors were reoccurring each time I built a new package version

@bdovh
Copy link
Author

bdovh commented Nov 23, 2022

Uninstall Failed for the previous Finalize package version 1.24.0.64 (1.24.0) with subscriber install id 04t5Y000001nUovQAE from qaapp3 sandbox ([email protected]) with errors Missing message package_uninstall_report:InProgress for locale en_US.

@bdovh
Copy link
Author

bdovh commented Nov 23, 2022

status=0
Result.Status="InProgress"
status=1
Result.Status=null
Uninstall failed
Uninstall Failed for the previous QA Console Package version 0.8.0.6 (0.8.0) with subscriber install id 04t5Y000001nUp0QAE from com sandbox ([email protected]) with errors null

@bdovh
Copy link
Author

bdovh commented Nov 23, 2022

and if we are asking about the SFDX CLI version, it was always the latest one

Run ./.github/workflows/installSFDX.sh
v16.18.0

added 868 packages, and audited 1079 packages in 16s

72 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
Version of SFDX CLI is: sfdx-cli/7.177.1 linux-x64 node-v16.18.0

status=0
Result.Status="InProgress"
status=0
Result.Status="InProgress"
status=0
Result.Status="InProgress"
status=0
Result.Status="InProgress"
status=0
Result.Status="Success"
Uninstalled successfully
Previous QA Console Package version 0.9.0.3 (0.9.0) with subscriber install id 04t5Y000001eUfRQAU was uninstalled from qaapp3 sandbox ([email protected])

@bdovh
Copy link
Author

bdovh commented Nov 23, 2022

Run ./.github/workflows/installSFDX.sh
v16.18.0

added 868 packages, and audited 1079 packages in 22s

72 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
Version of SFDX CLI is: sfdx-cli/7.177.1 linux-x64 node-v16.18.0

Uninstalling 04t5Y000001eUgjQAE: sfdx force:package:uninstall -p 04t5Y000001eUgjQAE --json
{ "status": 0, "result": { "attributes": { "type": "SubscriberPackageVersionUninstallRequest", "url": "/services/data/v56.0/tooling/sobjects/SubscriberPackageVersionUninstallRequest/06y4S0000008OIFQA2" }, "Id": "06y4S0000008OIFQA2", "IsDeleted": false, "CreatedDate": "2022-11-18T16:04:07.000+0000", "CreatedById": "0054S000002NvxSQAS", "LastModifiedDate": "2022-11-18T16:04:07.000+0000", "LastModifiedById": "0054S000002NvxSQAS", "SystemModstamp": "2022-11-18T16:04:07.000+0000", "SubscriberPackageVersionId": "04t5Y000001eUgjQAE", "Status": "InProgress" } }
status=0
Result.Status="InProgress"
status=1
Result.Status=null
Uninstall failed
No backup folder, nothing to backup and zip
Uninstall Failed for the previous Finalize package version 2.0.0.87 (2.0.0 Agreement Status Revamp) with subscriber install id 04t5Y000001eUgjQAE from com sandbox ([email protected]) with errors Missing message package_uninstall_report:InProgress for locale en_US.

@bdovh
Copy link
Author

bdovh commented Nov 23, 2022

v16.18.0

added 868 packages, and audited 1079 packages in 15s

72 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
Version of SFDX CLI is: sfdx-cli/7.177.1 linux-x64 node-v16.18.0

status=0
Result.Status="InProgress"
status=1
Result.Status=null
Uninstall failed
Uninstall Failed for the previous QA Console Package version 0.8.0.6 (0.8.0) with subscriber install id 04t5Y000001nUp0QAE from com sandbox ([email protected]) with errors null

@bdovh
Copy link
Author

bdovh commented Nov 23, 2022

v16.18.0

added 868 packages, and audited 1079 packages in 14s

72 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
Version of SFDX CLI is: sfdx-cli/7.177.1 linux-x64 node-v16.18.0

Uninstall Failed for the previous Finalize package version 1.25.0.56 (1.25.0 HotFix troubleshoot) with subscriber install id 04t5Y000001eUhSQAU from com sandbox ([email protected]) with errors Missing message package_uninstall_report:InProgress for locale en_US.

@bdovh
Copy link
Author

bdovh commented Nov 23, 2022

v16.18.0

added 868 packages, and audited 1079 packages in 14s

72 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
Version of SFDX CLI is: sfdx-cli/7.177.1 linux-x64 node-v16.18.0

Uninstall Failed for the previous Finalize package version 1.24.0.64 (1.24.0) with subscriber install id 04t5Y000001nUovQAE from qaapp3 sandbox ([email protected]) with errors Missing message package_uninstall_report:InProgress for locale en_US.

@peternhale
Copy link
Contributor

The error Missing message package_uninstall_report:InProgress has been fixed in salesforce-alm v 5.84.4, which will be available in this week's sfdx latest-rc. You can install the update directly to give it a try sfdx plugins:install salesforce-alm

@peternhale
Copy link
Contributor

@bdovh Using these packages

  • 04t5Y000001nUp0QAE - qa console
  • 04t5Y000001eUgjQAE - Finalize

I was able to install each Finalize first followed by qa console into a scratch org with both beta and prod packaging commands. I was also able to uninstall each with both beta and prod commands.

I used salesforce-alm v 54.8.4 and @salesforce/plugin-packaging version 1.10.8. Both of these will be available in sfdx-cli latest-rc coming out later this week (Friday, given the holiday).

@bdovh
Copy link
Author

bdovh commented Nov 24, 2022

are you using --json parameter and reading the status from json response?
did you try to put it into a CI?

@bdovh
Copy link
Author

bdovh commented Nov 24, 2022

      echo $(sfdx force:package:install -p $qc -r --json) > install.txt
      installId=$(cat install.txt | jq '.result.Id' -r)
      sfdx force:package:install:report -i $installId --json > installReport.json
      v=$(cat installReport.json | jq '.status')
      s=$(cat installReport.json | jq '.result.Status')
      echo "status=$v"
      echo "Result.Status=$s"
      while [[ ($v == 0) && ($s == '"IN_PROGRESS"') ]]
      do 
          sleep 10
          sfdx force:package:install:report -i $installId --json > installReport.json
          v=$(cat installReport.json | jq '.status')
          s=$(cat installReport.json | jq '.result.Status')
          echo "status=$v"
          echo "Result.Status=$s"
      done
      if [[ ($v == 0) && ($s == '"SUCCESS"')]] 
      then 
          echo "Installed successfully"
          echo "success=true" >> $GITHUB_OUTPUT
          result="Latest QA Console Managed Beta version $version with subscriber install id $qc was installed into ${username##*.} sandbox ($username)"
      
          ./scripts/postQAConsoleOnlyInstall.sh
      fi
      if [[ $v != 0 ]] 
      then 
          echo "Install failed"
          m=$(sfdx force:package:install:report -i $installId  --json | jq '.message' -r)
          echo "Error message: $m"
          echo "success=false" >> $GITHUB_OUTPUT
          mx=$(echo $m | tr '\n' ' ')
          result="Install of the Latest QA Console Managed Beta version $version with subscriber install id $qc into ${username##*.} sandbox ($username) failed with errors $mx"
      fi

      echo "result=$result" >> $GITHUB_OUTPUT

@bdovh
Copy link
Author

bdovh commented Nov 24, 2022

echo $(sfdx force:package:uninstall -p $previousPackageVersion --json) > uninstall.txt
v=$(cat uninstall.txt | tr '\n' ' ' | jq '.status')
s=$(cat uninstall.txt | tr '\n' ' ' | jq '.result.Status')
echo "status=$v"
echo "Result.Status=$s"
if [[ $v != 0 ]]
then
echo "Uninstall failed"
m=$(cat uninstall.txt | tr '\n' ' ' | jq '.message' -r)
echo "Error message: $m"
echo "result=false" >> $GITHUB_OUTPUT
previousResult="Uninstall Failed for the previous QA Console Package version $previousPackageVersionNumber ($previousPackageVersionName) with subscriber install id $previousPackageVersion from ${username##.} sandbox (${username}) with errors $m"
else
while [[ ($v == 0) && ($s == '"InProgress"') ]]
do
sleep 10
v=$(sfdx force:package:uninstall:report -i $(cat uninstall.txt | tr '\n' ' ' | jq '.result.Id' -r) --json | jq '.status')
s=$(sfdx force:package:uninstall:report -i $(cat uninstall.txt | tr '\n' ' ' | jq '.result.Id' -r) --json | jq '.result.Status')
echo "status=$v"
echo "Result.Status=$s"
done
if [[ ($v == 0) && ($s == '"Success"')]]
then
echo "Uninstalled successfully"
echo "result=true" >> $GITHUB_OUTPUT
previousResult="Previous QA Console Package version $previousPackageVersionNumber ($previousPackageVersionName) with subscriber install id $previousPackageVersion was uninstalled from ${username##
.} sandbox (${username})"
fi
if [[ $v != 0 ]]
then
echo "Uninstall failed"
m=$(sfdx force:package:uninstall:report -i $(cat uninstall.txt | tr '\n' ' ' | jq '.result.Id' -r) --json | jq '.message' -r)
echo "result=false" >> $GITHUB_OUTPUT
previousResult="Uninstall Failed for the previous QA Console Package version $previousPackageVersionNumber ($previousPackageVersionName) with subscriber install id $previousPackageVersion from ${username##*.} sandbox (${username}) with errors $m"
fi
fi

@peternhale
Copy link
Contributor

@bdovh No I did not use --json and I have not put the process into a script. Not sure how doing these would affect the results I have found.

@bdovh
Copy link
Author

bdovh commented Nov 30, 2022

maybe it is not working when using --json attribute

@peternhale
Copy link
Contributor

@bdovh Are you willing to give sfdx-cli@latest-rc a try?

@bdovh
Copy link
Author

bdovh commented Nov 30, 2022

I already used it. However, I switched back to non-beta commands, because using beta commands breaks our workflow and blocks our development process :( We don't have capacity to constantly debug problems with CI

@peternhale
Copy link
Contributor

peternhale commented Nov 30, 2022

Not asking you to use beta commands. Does 7.179.0 solve the issues you describe against the prod packaging commands?

@RodEsp RodEsp added the more information required Issue requires more information or a response from the customer label Nov 30, 2022
@bdovh
Copy link
Author

bdovh commented Dec 1, 2022

Not asking you to use beta commands. Does 7.190.0 solve the issues you describe against the prod packaging commands?

Sorry, I don't understand. Do you mean if I tried to use the sfdx force:package:version:create commands?

@github-actions
Copy link

github-actions bot commented Dec 9, 2022

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

@github-actions github-actions bot added the stale label Dec 9, 2022
@bdovh
Copy link
Author

bdovh commented Dec 9, 2022

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

bots, please do not close issues

@bdovh
Copy link
Author

bdovh commented Dec 9, 2022

Looks like for ALM commands I am affected by this known issue https://trailblazer.salesforce.com/issues_view?id=a1p4V000001svfwQAA

@bdovh
Copy link
Author

bdovh commented Dec 9, 2022

Run ./.github/workflows/installSFDX.sh
./.github/workflows/installSFDX.sh
shell: /usr/bin/bash -e {0}
v16.18.1

added 984 packages, and audited 1195 packages in 15s

77 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
Version of SFDX CLI is: sfdx-cli/7.180.0 linux-x64 node-v16.18.1

Executing command: sfdx force:package:version:create -d force-app --postinstallscript PostInstall -x -w 60 --codecoverage -b sfdx-issues-1814 --json
{ "status": 0, "result": { "Id": "08c5Y000000fz6lQAA", "Status": "Success", "Package2Id": "0Ho5Y000000oLwNSAU", "Package2VersionId": "05i5Y000000fyehQAA", "SubscriberPackageVersionId": "04t5Y000001eUn6QAE", "Tag": null, "Branch": "sfdx-issues-1814", "Error": [], "CreatedDate": "2022-12-09 13:04", "HasMetadataRemoved": false, "CreatedBy": "0055Y00000Fse6NQAR" } }

@bdovh
Copy link
Author

bdovh commented Dec 9, 2022

looks like the prod package version commands are working now

@github-actions github-actions bot removed the stale label Dec 10, 2022
@RodEsp
Copy link
Contributor

RodEsp commented Dec 14, 2022

Heya @bdovh, I'm glad version 7.180.0 fixed your issue 😄

@RodEsp RodEsp closed this as completed Dec 14, 2022
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