After updating sfdx to version 7.88.4-3b2e55c3f1 I can no longer use source push in one of my projects.
The same project, with no changes, could be deployed using 7.85.something

When deploying the same project without any changes, but using the vscode push command it worked.

I can deploy other projects using the terminal with no problem

So it is probably related to the metadata that I'm deploying. But why does it work when I run the vscode push command?
SFDX CLI Version(to find the version of the CLI engine run sfdx --version): 7.88.4-3b2e55c3f1
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)
PS C:\Users\oricil\workspace\scratch-org-communities-setup> sfdx plugins --core
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.5 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/lwc-dev-server 2.10.0
ββ @oclif/plugin-help 2.2.3
ββ @oclif/plugin-update 1.3.10
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.5 (core)
auth 1.4.8 (core)
config 1.2.4 (core)
generator 1.1.5 (core)
hpe-sfdx-plugins 0.3.2
salesforcedx 51.0.4 (core)
ββ limits 1.0.4 (core)
ββ schema 1.0.4 (core)
ββ user 1.1.2 (core)
ββ custom-metadata 1.0.11 (core)
ββ apex 0.1.4 (core)
ββ templates 51.2.0 (core)
ββ salesforce-alm 51.0.2 (core)
ββ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
sfdx-cli 7.88.4 (core)
sfdx-dependency-plugin 2.0.1
telemetry 1.1.1 (core)
OS and version: Windws 10
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.
Another project I can no longer deploy using the windows 10 terminal

But I can with the extension push command

It is actually not deploying anything, nor showing any error messages when using the extension.
So the extension is suppressing the error that I have when running in the terminal.


Look at the timestamps, there is no deploy tentative for the source push I tried with the extension. OBS: The errors that are there are for something else.

Hello !
I have exactly the same problem since yesterday and I believe it is also related to #881.
I searched some time and I realized I couldn't deploy / connect to my org due to some Oauth issues.
This is what I am using (in case it can help) :

I'm also receiving this issue since updating to sfdx 7.88.4 however, i've noticed it when using sfdx force:source:deploy. I dug into the local code and added some debug statements. the issue seems to stem from receiving this response from Salesforce:
<html>
<head><title>An internal server error has occurred</title></head>
<body>
<div style="display:none;" id="errorTitle">An internal server error has occurred</div>
<div style="display:none;" id="errorDesc">An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the
error, please contact <a href="https://help.salesforce.com/apex/hthome">Salesforce Support</a>. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. <br/><br/>Thank you again for your patience and assistance. And thanks for using salesforce.com!</div>
<table cellspacing=10>
<tr><td><span style="font-weight: bold; font-size: 12pt;">An internal server error has occurred</span></td></tr>
<tr><td>
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact <a href="https://help.salesforce.com/apex/hthome">Salesforce Support</a>. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. <br/><br/>Thank you again for your patience and assistance. And thanks for using salesforce.com!
<br><br>
Error ID: 1910852402-137678 (1534884652)
</td>
</tr>
<tr><td>
<br clear="all"><br><br>
</td></tr>
</table>
</td></tr>
</table>
</body>
</html>
Which is then trying to be parsed as a json response.
It could be a coincidence but I only started noticing the * Deploying with REST * statement this release but the sfdx force:source:deploy command does not provide a --soapdeploy flag such as the force:mdapi:deploy command does (even though under the hood the sfdx force:source:deploy uses the force:mdapi:deploy command) so perhaps a default has been changed?
As a temporary workaround you can use the mdapi commands directly with the --soapdeploy flag.
i.e.
# flags extended for readability
# first convert from source to mdapi format
sfdx force:source:convert --sourcepath .\force-app\main\default --outputdir .\deploy
# then use mdapi command to deploy using --soapdeploy flag
sfdx force:mdapi:deploy --deploydir .\deploy --wait 10 --soapdeploy
To solve my problem, I uninstalled v7.88.4 and installed version v7.85.1
npm i [email protected] -g
This might help someone, but I had to downgrade the salesforcedx plugin after reinstalling the plugin.
I'm using Windows 10, the CLI download from the website and set this plugin version to v51.0.2
sfdx plugins:install [email protected]
related #870
To solve my problem, I uninstalled v7.88.4 and installed version v7.85.1
npm i [email protected] -g
This solution works for me.
I had the latest version v7.9x.x and got the error.
sfdx force:mdapi:deploy -u user -d .\delta\src -c --json --apiversion=50.0 results in a post to https://regions--uat.my.salesforce.com/services/data/v50.0/metadata/deployRequest returning
<html>
<body>
<table cellspacing=10>
<tr>
<td><span style="font-weight: bold; font-size: 12pt;">Illegal Request</span></td>
</tr>
<tr>
<td>You have sent us an Illegal URL or an improperly formatted request.
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
<!-- Body events -->
<script type="text/javascript">function bodyOnLoad(){if(window.PreferenceBits){window.PreferenceBits.prototype.csrfToken="null";};}function bodyOnBeforeUnload(){}function bodyOnFocus(){}function bodyOnUnload(){}</script>
</body>
</html>
<!--
...................................................................................................
...................................................................................................
...................................................................................................
...................................................................................................
-->
This is happening randomly. I believe this is a Salesforce problem rather than an SFDX problem.
Not to lump on, but I'm seeing the same thing even after updating the CLI to 7.89.2-d1d2614d02:
SyntaxError: Unexpected token < in JSON at position 1
at JSON.parse (<anonymous>)
at Request._callback (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\salesforce-alm\dist\lib\core\force.js:583:25)
at Request.self.callback (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:185:22)
at Request.emit (events.js:315:20)
at Request.<anonymous> (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:1154:10)
at Request.emit (events.js:315:20)
at IncomingMessage.<anonymous> (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)SyntaxError: Unexpected token < in JSON at position 1
at JSON.parse (<anonymous>)
at Request._callback (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\salesforce-alm\dist\lib\core\force.js:583:25)
at Request.self.callback (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:185:22)
at Request.emit (events.js:315:20)
at Request.<anonymous> (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:1154:10)
at Request.emit (events.js:315:20)
at IncomingMessage.<anonymous> (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)SyntaxError: Unexpected token < in JSON at position 1
at JSON.parse (<anonymous>)
at Request._callback (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\salesforce-alm\dist\lib\core\force.js:583:25)
at Request.self.callback (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:185:22)
at Request.emit (events.js:315:20)
at Request.<anonymous> (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:1154:10)
at Request.emit (events.js:315:20)
at IncomingMessage.<anonymous> (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)SyntaxError: Unexpected token < in JSON at position 1
at JSON.parse (<anonymous>)
at Request._callback (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\salesforce-alm\dist\lib\core\force.js:583:25)
at Request.self.callback (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:185:22)
at Request.emit (events.js:315:20)
at Request.<anonymous> (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:1154:10)
at Request.emit (events.js:315:20)
at IncomingMessage.<anonymous> (C:\Users\Scott\AppData\Local\sfdx\client\7.88.4-3b2e55c3f1\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Same issue on a push with 7.89.2. I uninstalled and re-installed the CLI which took me back to 7.81.0 and no longer see the issue.
I have the same with force:source:push --json : no error thrown, exit code 0 .... but no deployment done
and --soapdeploy is not an available option for force:source:push !!
Is there some workaround to force it ?
I have the same with force:source:push --json : no error thrown, exit code 0 .... but no deployment done
and --soapdeploy is not an available option for force:source:push !!
Is there some workaround to force it ?
@nvuillam downgrade your sfdx to 7.85.1 and it should work as before
That's what i did, but i hope this bug will be solved soon :/
This is a duplicate of #860. I am fixing the issue and will post specifics in 860. Will go into the latest-rc release being built soon and will be promoted to latest this Thursday.
This issue has been linked to a new work item: W-8952401
This issue was resolved in the latest version of the CLI 7.89.2-d1d2614d02. Please update your CLI to the latest version.
Use "sfdx update" command to update your CLI version.
@shetzel @chintan9033 Thank you
I'm also still seeing this or a related issue on the latest build:
$ sfdx update
sfdx-cli: Updating CLI... already on latest version: 7.89.2-d1d2614d02
$ sfdx force:source:push
*** Deploying with REST ***
SyntaxError: Unexpected token < in JSON at position 1
at JSON.parse (<anonymous>)
at Request._callback (C:\Users\oscar\AppData\Local\sfdx\client\7.89.2-d1d2614d02\node_modules\salesforce-alm\dist\lib\core\force.js:583:25)
at Request.self.callback (C:\Users\oscar\AppData\Local\sfdx\client\7.89.2-d1d2614d02\node_modules\request\request.js:185:22)
at Request.emit (events.js:315:20)
at Request.<anonymous> (C:\Users\oscar\AppData\Local\sfdx\client\7.89.2-d1d2614d02\node_modules\request\request.js:1154:10)
at Request.emit (events.js:315:20)
at IncomingMessage.<anonymous> (C:\Users\oscar\AppData\Local\sfdx\client\7.89.2-d1d2614d02\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
However, after fully removing, reinstalling, and updating the cli to the latest version, the push command works fine on the latest cli version.
I am using the latest version of CLI(7.89.2-d1d2614d02). I am seeing the same error when trying to create a scratch org using the below command :
sfdx force:org:create -f config/project-scratch-def.json -a sourcescratchorg
I am using the latest version of CLI(7.89.2-d1d2614d02).
Also Receiving the same issue,
This Seems To be a timing issue.
When I Reviewed The Code in C:\Users\?????\AppData\Localsfdx\node_modules\salesforce-alm\dist\lib\coreforce.js:583:25
I have Debugged this File
I have Managed to Get everything Working fine When I have a Timeout just after the headers = this.setRestHeaders(connection); variable assignment
and the issue seem to have been resolved
SyntaxError: Unexpected token < in JSON at position 1
at JSON.parse (<anonymous>)
at Request._callback (C:\Users\?????\AppData\Local\sfdx\node_modules\salesforce-alm\dist\lib\core\force.js:583:25)
at Request.self.callback (C:\Users\?????\AppData\Local\sfdx\node_modules\request\request.js:185:22)
at Request.emit (events.js:315:20)
at Request.<anonymous> (C:\Users\?????\AppData\Local\sfdx\node_modules\request\request.js:1154:10)
at Request.emit (events.js:315:20)
at IncomingMessage.<anonymous> (C:\Users\?????\AppData\Local\sfdx\node_modules\request\request.js:1076:12)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Hope this Helps With a Speedy Resolution
Hi @theunisj,
Can you elaborate on the change you made to force.js (ideally provide actual code)?
Thanks.
@gsbasso sure
added a wait Function As I could not find one
Force.prototype.wait = function(ms){
var start = new Date().getTime();
var end = start;
while(end < start + ms) {
end = new Date().getTime();
}
}
and then in the Force.prototype.mdapiRestDeploy method
I added
this.wait(1000);
after the headers = this.setRestHeaders(connection); variable Assignment

I suspect this is a related issue, so posting here:
Running sfdx force:org:create is working successfully in that an org is created, but the org is not assigned the alias specified with --setalias. The command exits with code 0, but this error is displayed in the output:
SyntaxError: Unexpected token < in JSON at position 6
at JSON.parse (<anonymous>)
at Request._callback (/usr/local/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/lib/core/force.js:583:25)
at Request.self.callback (/usr/local/lib/node_modules/sfdx-cli/node_modules/request/request.js:185:22)
at Request.emit (node:events:378:20)
at Request.<anonymous> (/usr/local/lib/node_modules/sfdx-cli/node_modules/request/request.js:1154:10)
at Request.emit (node:events:378:20)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/sfdx-cli/node_modules/request/request.js:1076:12)
at Object.onceWrapper (node:events:484:28)
at IncomingMessage.emit (node:events:390:22)
at endReadableNT (node:internal/streams/readable:1307:12)
at processTicksAndRejections (node:internal/process/task_queues:81:21)
Rolling back the salesforcedx version sfdx plugins:install [email protected] resolves the issue.
sfdx-cli/7.89.2 linux-x64 node-v15.10.0
You acknowledge and agree that the CLI tool may collect usage information, user environment, and crash reports for the purposes of providing services or functions that are relevant to use of the CLI tool and product improvements.
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.2 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.10.0 (core)
@oclif/plugin-update 1.4.0-2 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.7 (core)
auth 1.4.9 (core)
config 1.2.5 (core)
generator 1.1.5 (core)
salesforcedx 51.1.1 (core)
ββ schema 1.0.4 (core)
ββ limits 1.0.4 (core)
ββ user 1.1.2 (core)
ββ apex 0.1.4 (core)
ββ custom-metadata 1.0.11 (core)
ββ templates 51.3.0 (core)
ββ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
ββ salesforce-alm 51.1.1 (core)
sfdx-cli 7.89.2 (core)
telemetry 1.1.1 (core)
Hi π
When do you think this fix will be available on the npm version of the CLI? Due to some restrictions I have, I can only use that version
I have exactly the same problem as @jamesmelville. I'm working from a fresh install and a new computer, did all rollbacks that people listed as workarounds with no success, my core list matches @jamesmelville
Same here, it was the force:source:push which was also crashing... I still have to downgrade sfdx-cli
Maybe add --soapdeploy argument for all related commands until the REST deployment is stable ?
force:org:create uses the metadata api to deploy settings to the scratch org, so it subject to some of the same issues as the deploy commands wrt the REST API. To workaround the issue you can use the restDeploy config variable to switch to SOAP if you're using the latest-rc version of the CLI. The current latest-rc is scheduled to be promoted to latest tomorrow morning PST. There are still bugs with using the REST API in both the CLI and core app and fixes are coming soon. There are multiple issues reported and fix details are spread between them. I.e., #860 and #884
Thanks @shetzel.
I'm not sure if it was a fluke I reported earlier but moving the plugin version to sfdx plugins:install [email protected] didn't seem to fix it after all, and neither did running against latest-rc (assume I needed to flip something with the restDeploy config variable). I rolled back my whole CLI to [email protected] and this is back to normal for the moment.
@jamesmelville The most recent salesforcedx@latest-rc is 51.2.2 (npm view salesforcedx) so that is the version you'll want to get and then set the restDeploy config var either by doing sfdx config:set restDeploy=false or setting the equivalent environment variable, SFDX_REST_DEPLOY=false
There are more fixes coming in the next latest-rc release that will improve the reliability of using REST with CLI deployments. Check out the release notes when they are published (in this repo).
Pulled down the latest version, set the flag correctly. This is still occurring on 7.90.2-b8f9206a5c win32-x64 node-v14.15.4.
I've given up waiting for a solution and modified the force.js above to add the wait command. Works brilliantly. Thank you @theunisj .
@CrownSeven , @shetzel
I have Tested the new Version, and Still Experiencing the same issues,
I have tested the Wait Function again, and with 200 ms, and it still works Great, I have asked our Entire Team To do this until a resolution is in Place
Unfortunately they need to do this every time there is a new update
@gsbasso sure
added a wait Function As I could not find one
Force.prototype.wait = function(ms){ var start = new Date().getTime(); var end = start; while(end < start + ms) { end = new Date().getTime(); } }and then in the Force.prototype.mdapiRestDeploy method
I addedthis.wait(1000);after the
headers = this.setRestHeaders(connection);variable Assignment
Well I give up...
Have upgraded to the 7.90.2 build, tried setting environment variable SFDX_REST_DEPLOY=false or config:set restDeploy=falseand it still shows *** Deploying with REST *** (and fails, obviously).
Even the hack to force.js does not work for me. I keep getting INVALID_SESSION_ID: Session expired or invalid
It's fortunate automatic updates on our Jenkins server have mysteriously stopped working. Otherwise we'd be dead in the water with this issue.
Not sure how/why this could have been released, never mind allowed to drag on for days.
@gsbasso just re authorize the org you are deploying to that will take care of the invalid session id error.
@CrownSeven Re-authorizing worked - thanks so much for the suggestion.
Still showing *** Deploying with REST *** (with restDeploy set to false). Seems to be ignoring the config setting, unless the message is misleading (?).
Yes it does seem to be ignoring the flag. Fortunately with the wait hack, and reauthorizing weβre still able to deploy for now.
From: gsbassonotifications@github.com
Sent: Friday, March 5, 2021 4:37 PM
To: forcedotcom/clicli@noreply.github.com
Cc: CrownSevenv6er@hotmail.com; Mentionmention@noreply.github.com
Subject: Re: [forcedotcom/cli] SyntaxError: Unexpected token < in JSON at position 1 (#884)
@CrownSevenhttps://github.com/CrownSeven Re-authorizing worked - thanks so much for the suggestion.
Still showing * Deploying with REST * (with restDeploy set to false). Seems to be ignoring the config setting, unless the message is misleading (?).
β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/forcedotcom/cli/issues/884#issuecomment-791765149, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA5LEB22D5LLTP7FLDO4523TCFMMBANCNFSM4YGKQL6A.
Looking at the status page for the cli it looks like the build is failing for the cli repo, so that may be why the latest build hasn't helped / is ignoring flags etc.
@gsbasso @CrownSeven If you've specifically installed a different version of the salesforcedx plugin then you won't get the update. If you run sfdx plugins --core and it doesn't have this as part of the output then that's why the config variable isn't working.
salesforcedx 51.2.2 (core)
ββ limits 1.0.4 (core)
ββ schema 1.0.4 (core)
ββ user 1.1.2 (core)
ββ apex 0.1.4 (core)
ββ custom-metadata 1.0.11 (core)
ββ templates 51.3.0 (core)
ββ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
ββ salesforce-alm 51.2.1 (core)
To go back to the core version of salesforcedx (i.e., the version bundled with the CLI) run sfdx plugins:uninstall salesforcedx. It will then go back to the core version.
Alternatively you can try using the latest-rc version of the CLI since there were a few fixes made for REST in that version. E.g., npm install sfdx-cli@latest-rc -g for an npm install.
The below is my version list in my local. They are all (core) version, but the below error has been caused.
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.2 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.10.0 (core)
@oclif/plugin-update 1.4.0-2 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.8 (core)
auth 1.4.10 (core)
config 1.2.6 (core)
generator 1.1.5 (core)
salesforcedx 51.1.1 (core)
ββ user 1.1.2 (core)
ββ schema 1.0.4 (core)
ββ limits 1.0.4 (core)
ββ custom-metadata 1.0.11 (core)
ββ apex 0.1.4 (core)
ββ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
ββ templates 51.3.0 (core)
ββ salesforce-alm 51.1.1 (core)
sfdx-cli 7.90.2 (core)
telemetry 1.1.1 (core)
(node:4768) Warning: The .forceignore file doesn't adhere to .gitignore format which will be the default behavior starting in Spring '21 release. More information on .gitignore format here: https://git-scm.com/docs/gitignore. Fix the following lines in your .forceignore and add '# .forceignore v2' to your .forceignore file to switch to the new behavior.
(Use node --trace-warnings ... to show where the warning was created)
(node:4768) Warning: Admin.profile-meta.xml
* Deploying with REST *
SyntaxError: Unexpected token < in JSON at position 1
at JSON.parse (
at Request._callback (C:\Users\hts20\AppData\Localsfdx\client7.90.2-b8f9206a5c\node_modules\salesforce-alm\dist\lib\coreforce.js:583:25)
@shetzel My output for sfdx plugins --core is the same as for @hts-zhangdong. And I did not install a specific version of salesforcedx (this always fails for me due to some cert issue, but that's a whole other matter). How do I get to the 51.2.2 version you are showing?
I just did: npm install sfdx-cli -g
Output of sfdx plugins --core is:
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.2 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.10.0 (core)
@oclif/plugin-update 1.4.0-2 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.8 (core)
auth 1.4.10 (core)
config 1.2.6 (core)
generator 1.1.5 (core)
salesforcedx 51.2.2 (core)
ββ limits 1.0.4 (core)
ββ schema 1.0.4 (core)
ββ user 1.1.2 (core)
ββ custom-metadata 1.0.11 (core)
ββ templates 51.3.0 (core)
ββ apex 0.1.4 (core)
ββ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
ββ salesforce-alm 51.2.1 (core)
sfdx-cli 7.90.2 (core)
telemetry 1.1.1 (core)
And for latest-rc: npm install sfdx-cli@latest-rc -g
Output of sfdx plugins --core is:
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.2 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.10.0 (core)
@oclif/plugin-update 1.4.0-2 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.8 (core)
auth 1.4.10 (core)
config 1.2.6 (core)
generator 1.1.5 (core)
salesforcedx 51.3.0 (core)
ββ limits 1.0.4 (core)
ββ schema 1.0.4 (core)
ββ user 1.1.2 (core)
ββ custom-metadata 1.0.11 (core)
ββ templates 51.3.0 (core)
ββ apex 0.1.4 (core)
ββ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
ββ salesforce-alm 51.3.0 (core)
sfdx-cli 7.91.0 (core)
telemetry 1.1.1 (core)
I also had this problem when using SFDX-CLI on CircleCI (clean install) - To resolve this issue, I simply specified the version I wanted to install to 7.85.1
Command used on CircleCI for a specific version:
npm install --global [email protected]
I did all the uninstalling and reinstalling of SFDX 7.85.1 version but when I run sfdx --version....I still get this : sfdx-cli/7.90.2-b8f9206a5c win32-x64 node-v14.15.4
I guess I cannot go back to 7.85 to do my deployments
I did all the uninstalling and reinstalling of SFDX 7.85.1 version but when I run sfdx --version....I still get this : sfdx-cli/7.90.2-b8f9206a5c win32-x64 node-v14.15.4
I guess I cannot go back to 7.85 to do my deployments
@ksingh-btig clear every node module you have on your computer. And do a clean installation. I'm sure that 7.85.1 is stable as I've been using for a few weeks already. You just need to make sure you dont have anything linked to old dependencies.
@shetzel npm has never worked for me either. I tried installing the long-term support version of Node.js but that failed. Understand I have limited privileges on my company workstation. But why are we having to go through all these hoops to resolve this issue? Up until now I have managed with the regular/periodic updates to sfdx (either automatically downloaded or by running the sfdx update command). Something seems to be broken with the standard update process.
@gsbasso Pretty sure I was just answering your question of "How do I get to the 51.2.2 version you are showing?" There's more than one way to install the CLI and plugins and there's more than one way to update. That was one example. Running sfdx update is another, which uses the tar files rather than npm for the update. In fact I just did that too (sfdx update) and I was updated to the CLI version just published, 7.91.0 with salesforcedx plugin version 51.1.1.
@shetzel As have I (just) upgraded to the 7.91.0 release and it seems to be honouring the sfdx config setting (so is now showing SOAP as the protocol when running force:source:deploy). I haven't tested with the environment variable, nor tried using REST to see if that issue has been sorted. Thanks.
These bugs are getting out of control!
This error is mostly a problem when deploying to Production. because it is when running tests and deploying code.
LETS GO!
When I add (apex and/or triggers), this:
<types>
<members>xyzsomecode</members>
<name>ApexClass</name>
</types>
<types>
<members>xyzsometrigger</members>
<name>ApexTrigger</name>
</types>
to my package.xml
and I run this command
$ sfdx force:source:deploy --manifest "manifest\package.xml" --json --loglevel fatal -l RunLocalTests --verbose
I get the above titled error:
here are my versions:
$ sfdx plugins --core
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.2 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.10.0 (core)
@oclif/plugin-update 1.4.0-2 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.8 (core)
auth 1.4.10 (core)
config 1.2.6 (core)
generator 1.1.5 (core)
salesforcedx 51.2.2 (core)
ββ limits 1.0.4 (core)
ββ schema 1.0.4 (core)
ββ user 1.1.2 (core)
ββ custom-metadata 1.0.11 (core)
ββ apex 0.1.4 (core)
ββ templates 51.3.0 (core)
ββ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
ββ salesforce-alm 51.2.1 (core)
sfdx-cli 7.90.2 (core)
telemetry 1.1.1 (core)
I have upgraded, I really hope no bugs introduced again. Because this is driving me INSANE!
This is my latest version:
$ sfdx plugins --core
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.2 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.10.0 (core)
@oclif/plugin-update 1.4.0-2 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.8 (core)
auth 1.4.10 (core)
config 1.2.6 (core)
generator 1.1.5 (core)
salesforcedx 51.3.0 (core)
ββ limits 1.0.4 (core)
ββ schema 1.0.4 (core)
ββ user 1.1.2 (core)
ββ custom-metadata 1.0.11 (core)
ββ apex 0.1.4 (core)
ββ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
ββ templates 51.3.0 (core)
ββ salesforce-alm 51.3.0 (core)
sfdx-cli 7.91.0 (core)
telemetry 1.1.1 (core)
Closing this issue to reduce noise since it is a duplicate of https://github.com/forcedotcom/cli/issues/860 and the original problem with parsing JSON has now been resolved as well as providing a workaround by setting the SFDX_REST_DEPLOY environment variable to false as described in the 51.2.2 release notes.
Please follow along on https://github.com/forcedotcom/cli/issues/860 for further updates related to REST API issues.
Most helpful comment
To solve my problem, I uninstalled v7.88.4 and installed version v7.85.1
npm i [email protected] -g