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

sf project deploy quick returns SfError.wrap received type object but expects type Error or string #2962

Closed
MarcDBehr opened this issue Jul 19, 2024 · 4 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@MarcDBehr
Copy link

Note
Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
    • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

After running a validate command and getting back the id for a quick deploy, if the quick deploy can't be run (something else happened in the org post the validate), a SfError.Wrap l message is displayed.

Steps To Reproduce

  1. Validate an deployment (sf project deploy start -d force-app/main/default/classes/ -o [org])
  2. Deploy a different change to the same org (thus invalidating the previous validation)
  3. Now attempt to deploy the change from step 1 (sf project deploy quick --job-id 0AfO800000XXXXXXXX -o [org])

Expected result

An error message that says the quick deploy failed

Actual result

Got the following message:

Error (CannotQuickDeployError): SfError.wrap received type object but expects type Error or string

System Information

bash

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.50.6",
  "nodeVersion": "node-v20.15.0",
  "osVersion": "Darwin 23.5.0",
  "rootPath": "/Users/xxx/.local/share/sf/client/2.50.6-6e9d7f7",
  "shell": "bash",
  "pluginVersions": [
    "@dxatscale/sfpowerscripts 25.5.3 (user)",
    "@oclif/plugin-autocomplete 3.1.6 (core)",
    "@oclif/plugin-commands 3.3.4 (user)",
    "@oclif/plugin-help 5.2.17 (user)",
    "@oclif/plugin-not-found 3.2.10 (core)",
    "@oclif/plugin-plugins 5.3.4 (core)",
    "@oclif/plugin-search 1.2.2 (core)",
    "@oclif/plugin-update 4.4.7 (core)",
    "@oclif/plugin-version 2.2.6 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.8 (core)",
    "@oclif/plugin-which 3.2.6 (core)",
    "@salesforce/analytics 1.4.22 (user)",
    "@salesforce/cli 2.50.6 (core)",
    "apex 3.2.4 (core)",
    "auth 3.6.33 (core)",
    "data 3.5.5 (core)",
    "deploy-retrieve 3.9.13 (core)",
    "info 3.3.17 (core)",
    "limits 3.3.17 (core)",
    "marketplace 1.2.17 (core)",
    "org 4.3.4 (core)",
    "packaging 2.7.0 (core)",
    "schema 3.3.19 (core)",
    "settings 2.3.8 (core)",
    "sobject 1.4.19 (core)",
    "source 3.5.3 (core)",
    "telemetry 3.6.1 (core)",
    "templates 56.3.2 (core)",
    "trust 3.7.13 (core)",
    "user 3.5.17 (core)"
  ]
}

Additional information

@MarcDBehr MarcDBehr added the investigating We're actively investigating this issue label Jul 19, 2024
@github-actions github-actions bot added the validated Version information for this issue has been validated label Jul 19, 2024
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.

@MarcDBehr
Copy link
Author

If I try to deploy code with conflicts, I also get a similar error:

Error (1): SfError.wrap received type object but expects type Error or string

So the error may be in the error handler (SfError.wrap) code

@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label Jul 22, 2024
Copy link

git2gus bot commented Jul 22, 2024

This issue has been linked to a new work item: W-16297490

@mshanemc
Copy link
Contributor

good bug report, let's get that fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

2 participants