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

UNSUPPORTED_API_VERSION: Retrieving from Sandbox #836

Closed
borkya opened this issue Dec 19, 2018 · 10 comments
Closed

UNSUPPORTED_API_VERSION: Retrieving from Sandbox #836

borkya opened this issue Dec 19, 2018 · 10 comments

Comments

@borkya
Copy link

borkya commented Dec 19, 2018

Using instruction from this guide to setup VS Code with a Sandbox Org.

https://github.com/forcedotcom/salesforcedx-vscode/wiki/Develop-Against-Any-Org-in-Visual-Studio-Code#getting-started

Steps To Reproduce:

Created a project
Authorized the Org
When tried to Retrieve metadata from Org using SFDX: Retrieve Source from Org
Getting error :
15:14:32.122 sfdx force:source:retrieve --manifest c:\VSCODE\RDev\RDEV1\manifest\package.xml
ERROR: UNSUPPORTED_API_VERSION: Invalid Api version specified on URL.
15:14:38.163 sfdx force:source:retrieve --manifest c:\VSCODE\RDev\RDEV1\manifest\package.xml ended with exit code 1

Additional Info:
Version details :
sfdc-project.json
"sourceApiVersion": "44.0"
package.xml
44.0

Tried using 43.0 and 42.0 as well with same results.

VS Code Version:
image

SFDX CLI Version:
44.11.0
OS and version:
Windows 10, Version 10.0.17134 Build 17134

@lcampos
Copy link
Contributor

lcampos commented Dec 20, 2018

Hi @borkya, can you confirm you do not have the pre-release version of the sfdx cli installed by running sfdx plugins? The pre-release version of the cli by default uses the next version of the api so you either need to use it for orgs that are already in Spring 19 or set the cli to use api version 44.

@borkya
Copy link
Author

borkya commented Dec 20, 2018

Hi @lcampos
I followed instructions on the url, https://github.com/forcedotcom/salesforcedx-vscode/wiki/Getting-Started-with-Visual-Studio-Code-for-Salesforce-Developers to install the sfdx cli . the version is 44.11.0 .
1.How can I find if I have pre - release version of the sfdx cli ? I tried running sfdx plugins , but its not a valid command. I tried other commands , none are working for me.
sfdx --version // CLI version
sfdx plugins // SalesforceDX plugin version
sfdx force --version // Salesforce API version used by the CLI

  1. How can I set the cli to use api version to 44 ?

@borkya
Copy link
Author

borkya commented Dec 20, 2018

@lcampos
Do I need to Enable Dev Hub in my Prod Org , for this to work?

@vmarasow
Copy link

vmarasow commented Dec 26, 2018

@borkya you can find the api version by going to the sfdx-project.json in the root of your project directory, it should look something like this: { "packageDirectories": [ { "path": "force-app", "default": true } ], "namespace": "", "sfdcLoginUrl": "https://login.salesforce.com", "sourceApiVersion": "45.0" }
Update the sourceApiVersion to "44.0" to fix the issue.
And No, you don't need to enable devhub for this to work.

@borkya
Copy link
Author

borkya commented Dec 26, 2018 via email

@BoonPlus
Copy link

BoonPlus commented Dec 29, 2018

I ran into the same error, see below for how I resolved the problem...
1. Check if you're running the pre-release Cli
PS C:\Users\BoonPlus\Documents\SFDX Projects\DX> sfdx plugins
salesforcedx 45.0.12 (pre-release)
2. Downgrade to the latest release
PS C:\Users\BoonPlus\Documents\SFDX Projects\DX> sfdx plugins:install salesforcedx@latest
Installing plugin salesforcedx...
Installing plugin salesforcedx... Checking for digital signature.
Successfully validated digital signature for salesforcedx.
Finished digital signature check. Installing... done
PS C:\Users\BoonPlus\Documents\SFDX Projects\DX> sfdx plugins
salesforcedx 44.11.0
3. SFDX: Retrieve Source in Manifest from Org
Starting SFDX: Retrieve Source from Org

15:04:52.978 sfdx force:source:retrieve --manifest c:\Users\BoonPlus\Documents\SFDX Projects\DX\manifest\package.xml
=== Retrieved Source
FULL NAME....

@borkya
Copy link
Author

borkya commented Dec 30, 2018

Hi @BoonPlus

That fixed it , thanks for your help!

@BoonPlus
Copy link

@borkya Glad that it worked for you.

@lcampos
Copy link
Contributor

lcampos commented Jan 8, 2019

I'm closing this since the configuration changes addressed the original issue/question.

@lcampos lcampos closed this as completed Jan 8, 2019
@vijaykumar96
Copy link

Hi @BoonPlus
It worked for me as well
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants