-
Notifications
You must be signed in to change notification settings - Fork 78
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
sfdx force:source:deploy:report is throwing The org cannot be found #1713
Comments
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. |
We are seeing exactly the same, there doesn't seem to be any pattern to this, it makes our deployment pipelines fail from time to time. |
We also see the 'org cannot be found error' message since a couple of weeks. We see it with the sfdx force:source:deploy command. sfdx sfdx-cli/7.156.1 (linux) and sfdx-cli/7.167.2 win32-x64. error: ERROR running force:source:deploy: Metadata API request failed: The org cannot be found |
We are now also seeing this on other commands; we use the sfpowerkit plugin to create a pool of scratch orgs and our pipeline throws this error intermittendly:
This is on CLI 7.163.0:
|
The same issue happens from time to time with command force:mdapi:deploy after upgrade from 7.129.0 to 7.164.2: |
Hi @mshanemc: is this something you can help with? I see this error at least daily in our CI pipeline |
This error is being thrown from here: https://github.com/forcedotcom/sfdx-core/blob/main/src/org/connection.ts#L265 When instantiating this class it tries to get the API version to use in requests from a local config value (sfdx config:set apiVersion=55.0 --global) or env var (SFDX_API_VERSION=55.0 sfdx force:org:create -). Workaround: skip the DNS check by setting We will require some logs of a deployment without setting the API version to see what URL the dns resolver is getting. To enable debug mode just set the env var
This might be related to this ongoing issue: https://status.salesforce.com/generalmessages/994 |
@cristiand391 thanks for the solution. We are not receiving the error anymore. Should this be documented somewhere? Looks like Do you think of any issue if we leave this setting |
Seeing the same problem with sfdx:source:deploy. we run 7.174 on Ubuntu (Github Action). No apparent pattern with when it happens, but it has happened more often recently with multiple sandboxes on different instances (all EU at this point) |
Multiple projects and environments experiencing this issue. Can someone confirm that |
@slaght yes, the method that does the dns lookup checks if it's set here: If you run |
Same issue with force:source:deploy (sfdx-cli/7.177.1, GitHub action). Happens sporadically, no apparent pattern. |
I just got a stack trace on this, waiting for a deployment to complete. Super weird that this is happening during deployment when it has been successfully interacting with this org for an extended time. This one failed 24 minutes into a 60 minute wait timeout. I have not applied the
A little behind on versions:
|
We are affected by this too. A complete waste of CI/CD pipeline resources. |
Edit 2: It seemed to make it a bit better, but not solved the issue entirely Edit: with We're experiencing this issue as well: Tried Until three days ago, it only happened occasionally, now it happens almost every time. |
|
Thank you very much @cristiand391 !!!! Workaround works in my pipeline
|
Still encountering the issue on any of my connected orgs. It is also incredibly frequent for me. From 10 deployments maybe around 2 even start and none can keep the connection till the end. Issue occurs with all source commands: retrieve, deploy, push, pull I set the recommended vars and running the recommended LTS node version. |
Same here. |
I have this error |
Azure Devops Pipelines with Hosted Agent (ubuntu-latest)? |
I'm looking at this, in the screenshot @HerrX2000 posted above I see the err is coming from the deploy library so it might be skipping the env var. Can someone post the full debug of a |
I resolved the problem (at least, for the moment) using older versions from Node JS and Salesforce CLI, 18.12.1 and 7.155.1, and it seems that works, 3 of 3 deployments without errors. I use the SFDX_DISABLE_DNS_CHECK=true but 'm not sure if it do something. |
@cristiand391 thanks for pointing out that it might be skipping the env var. Indeed my .bashrc was wrong. It set the var for the bash environment, instead of as global env var. It now works, thank you very much. Wrong .bashrc:
Correct .bashrc line:
The export is mandatory, otherwise the variable is not available within the context of sfdx. |
This issue has been linked to a new work item: W-12129008 |
Following. We are also getting the same error and unfortunately I am still getting the same after adding |
Unfortunately, this doesn't remediate. |
To double check if the variable is exported correctly, you can run |
@cristiand391 thanks that looks like it worked for me. |
do you have any fix to |
shoud we try to use |
or is there any different command which works fine, like |
@bdovh yes, I mentioned it here: that env var should work for all commands as the domain resolver is the same. To confirm that the check is being skipped you can enable the debug output, see #1713 (comment) |
@bdovh yes that is what worked for me. We are using Azure pipelines. |
I am using Github Action CI pipelines and it still doesn't help. Well, it randomly fails, not every time, but once per two tries |
So far this has been working for me in GitHub Actions
|
Still experience issues with network connection during the long deployment. After adding export SFDX_DISABLE_DNS_CHECK=true in the pipeline we don have "The org cannot be found" error, but there is another one
|
let me try that one |
This is what Salesforce support has confirmed as official workaround. |
FYI: sfdx v7.180.0 (latest-rc) includes a fix for this, see rel notes:
@steals that's a different network error, if you can please open a new GH issue and provide a debug log of the CLI. |
Hi @cristiand391 Do you know if the fix will also apply to |
@nickytorstensson the fix was done on the sfdx-core library: forcedotcom/sfdx-core#712 The fix should apply to all commands that interact with an org as the connections to it are done using sfdx-core. As I mentioned in the comment below, the fix is included in the current release candidate, not in latest stable (the one most people use). If you are still getting the |
🚀 sfdx 7.180.0 is now stable/GA with fixes for this issue. If you had been holding off installing during the RC period, you can now upgrade! |
I have a question, does it fix also the |
@bdovh yes, it should. |
is 7.180 GA? Why when I try to execute the script node --version it installs the version Version of SFDX CLI is: sfdx-cli/7.179.0 linux-x64 node-v16.18.1 |
@bdovh yes, you can see the
|
Summary
sfdx force:source:deploy:report sometimes fail with this error:
ERROR running force:source:deploy:report: Metadata API request failed: The org cannot be found
This started to happen after we upgrade to version 7.165 from version 7.140
Steps To Reproduce:
run sfdx force:source:deploy:report
System Information
› Warning: sfdx-cli update available from 7.165.0 to 7.166.1.
{
"cliVersion": "sfdx-cli/7.165.0",
"architecture": "linux-x64",
"nodeVersion": "node-v16.17.0",
"pluginVersions": [
"@jayree/sfdx-plugin-manifest 2.2.10 (user)",
"@jayree/sfdx-plugin-prettier 1.1.7 (user)",
"@oclif/plugin-autocomplete 1.3.0 (core)",
"@oclif/plugin-commands 2.2.0 (core)",
"@oclif/plugin-help 5.1.12 (core)",
"@oclif/plugin-not-found 2.3.1 (core)",
"@oclif/plugin-plugins 2.1.0 (core)",
"@oclif/plugin-update 3.0.0 (core)",
"@oclif/plugin-version 1.1.2 (core)",
"@oclif/plugin-warn-if-update-available 2.0.4 (core)",
"@oclif/plugin-which 2.1.0 (core)",
"alias 2.1.0 (core)",
"apex 1.2.0 (core)",
"auth 2.2.3 (core)",
"community 2.0.0 (core)",
"config 1.4.17 (core)",
"custom-metadata 2.0.0 (core)",
"data 2.1.2 (core)",
"generator 2.0.2 (core)",
"info 2.0.1 (core)",
"limits 2.0.1 (core)",
"org 2.2.0 (core)",
"schema 2.1.1 (core)",
"signups 1.2.0 (core)",
"source 2.0.12 (core)",
"telemetry 2.0.0 (core)",
"templates 55.1.0 (core)",
"trust 2.0.3 (core)",
"user 2.1.0 (core)",
"@salesforce/sfdx-plugin-lwc-test 1.0.0 (core)",
"salesforce-alm 54.8.1 (core)",
"sfdx-git-delta 5.0.7 (user)",
"sfdx-jayree 4.3.4 (user)",
"sfpowerkit 5.0.0 (user)"
],
"osVersion": "Linux 5.10.60.1-microsoft-standard-WSL2",
"shell": "bash",
"rootPath": "/usr/local/lib/node_modules/sfdx-cli"
}
Additional information
The text was updated successfully, but these errors were encountered: