-
Notifications
You must be signed in to change notification settings - Fork 79
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
Displaying the navigation URL outputs a superfluous error #2208
Comments
@callietoothman we are unable to reproduce in the current CLI, can you update your CLI and try again |
@clairebianchi Updated sfdx, same issue: SFDX CLI Version: sfdx-cli/7.33.2 darwin-x64 node-v10.16.0 SFDX plugin Version: salesforcedx 47.6.2 (core) OS and version: macOS Mojave (10.14.6) |
FYI: I experienced the same issue after setting the environment variable for nodejs DEBUG=app |
Ahhh! Thanks! I didn't have |
@clairebianchi You should be able to run the following to reproduce the error: SFDX_LOG_LEVEL=debug sfdx force:org:open --urlonly --json |
Summary
Using the URL Only and JSON output options for the
force:org:open
command appends an additional error with no explanation.Steps To Reproduce:
This error did not show up until I upgraded my Node.js version and installed sfdx-cli via
npm
for that version.nvm
or uninstalling and reinstalling).npm
for the newly installed Node.js version.SFDX_LOG_LEVEL
environment variable is set todebug
.sfdx force:org:open --urlonly --json -u <IDENTIFIED_ORG_USERNAME>
Expected result
The command should display a JSON only output that can easily be consumed by JSON accepting scripts.
Actual result
The JSON output does display, but a random error is printed underneath which seems unrelated.
Additional information
This issue currently causes automated scripts to fail that assume only JSON will be output from this command.
The issue seems be due to logger.ts. The Regex pattern
sid=(.*)
seems to be replacing the rest of the JSON string with a<HIDDEN>
string for the log. When the logger tries to parse the JSON, the JSON string is invalid.While the JSON logged should look like this:
it actually ends up being this:
My current workaround is to overwrite the local file logger.js in the @salesforce/core/lib directory to use a different regex pattern that does not match to the end of the string:
SFDX CLI Version: sfdx-cli/7.14.0 darwin-x64 node-v10.16.0
SFDX plugin Version: salesforcedx 46.4.0 (core)
OS and version: macOS Mojave (10.14.5)
The text was updated successfully, but these errors were encountered: