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

ECONNRESET error when running force:data:soql:query from bash script #1350

Closed
jamangini opened this issue Jan 7, 2022 · 5 comments
Closed
Labels
area:jsforce bug Issue or pull request that identifies or fixes a bug

Comments

@jamangini
Copy link

Summary

I'm running a query that stores a large amount of FederationId values (read: email addresses) into a bash script variable, and then executes a subsequent query with that data as an IN filter, and receive the following error.

Error: read ECONNRESET at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20) { errno: -54, code: 'ECONNRESET', syscall: 'read' }

Steps To Reproduce:

  1. create a new text file on your local computer
  2. add this to the new text file
  3. 'sam@salesforce.com',
    'ken@salesforce.com',
    'roger@salesforce.com',
    'danny@salesforce.com'
  4. save that text file as contact_data.txt
  5. create a new bash file
  6. add this in
#!/bin/bash
cleanSupportforceData=$(cat contact_data.txt)

sfdx force:data:soql:query -q "SELECT Id, Name, Email, FederationIdentifier, IsActive, Username FROM User WHERE FederationIdentifier IN ($cleanSupportforceData)"
  1. save that file as bashQuery.sh
  2. run that shell script
  3. receive an error

Expected result

My naive expectation is for this to run, as it's <100,000 SOQL character limit

Actual result

The error denoted above:

Error: read ECONNRESET
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:220:20) {
  errno: -54,
  code: 'ECONNRESET',
  syscall: 'read'
}

System Information

  • Paste the output here
{
	"cliVersion": "sfdx-cli/7.132.0",
	"architecture": "darwin-x64",
	"nodeVersion": "node-v17.0.1",
	"pluginVersions": [
		"@oclif/plugin-autocomplete 0.3.0 (core)",
		"@oclif/plugin-commands 1.3.0 (core)",
		"@oclif/plugin-help 3.3.1 (core)",
		"@oclif/plugin-not-found 1.2.6 (core)",
		"@oclif/plugin-plugins 1.10.11 (core)",
		"@oclif/plugin-update 1.5.0 (core)",
		"@oclif/plugin-warn-if-update-available 1.7.3 (core)",
		"@oclif/plugin-which 1.0.4 (core)",
		"@salesforce/sfdx-plugin-lwc-test 0.1.7 (core)",
		"alias 1.2.0 (core)",
		"apex 0.7.0 (core)",
		"auth 1.8.0 (core)",
		"config 1.3.2 (core)",
		"custom-metadata 1.0.12 (core)",
		"data 0.6.6 (core)",
		"generator 1.2.1 (core)",
		"info 1.1.4 (core)",
		"limits 1.3.0 (core)",
		"org 1.11.0 (core)",
		"salesforce-alm 53.7.0 (core)",
		"schema 1.1.0 (core)",
		"sfdx-cli 7.132.0 (core)",
		"source 1.6.2 (core)",
		"telemetry 1.4.0 (core)",
		"templates 52.7.0 (core)",
		"trust 1.1.0 (core)",
		"user 1.7.0 (core)"
	],
	"osVersion": "Darwin 19.6.0"
}

Additional information

Feel free to attach a screenshot.

@jamangini jamangini added the investigating We're actively investigating this issue label Jan 7, 2022
@github-actions
Copy link

github-actions bot commented Jan 7, 2022

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.

@maggiben
Copy link
Contributor

Hi, can you upload a demo org that we can use to perform the force:data:soql:query ? maybe dreamhowse-lwc

@jamangini
Copy link
Author

Hey @maggiben I'm fairly certain that this can be done without any demo org at all - you just need Step 3 to have a large amount of values (~1,000), and they don't need to be unique.

@maggiben maggiben added the bug Issue or pull request that identifies or fixes a bug label Jan 12, 2022
@uip-robot-zz
Copy link

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

@maggiben
Copy link
Contributor

I tried +2500 items in the query and it failed as you described, It might not be a bug in the CLI itself but even if that's not the case a more descriptive error message would be nice to have.

image

@mshanemc mshanemc added area:jsforce and removed investigating We're actively investigating this issue labels Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:jsforce bug Issue or pull request that identifies or fixes a bug
Projects
None yet
Development

No branches or pull requests

4 participants