I'm getting ERROR: logger is not defined. error after issuing sfdx force:user:display command. What I'm trying to input is:

sfdx force:user:display
sfdx force:user:display -u username

It seems to work with --json parameter though.

What am I doing wrong? These commands are the same as examples in https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_user.htm#cli_reference_display

I'm running sfdx-cli/6.40.0-384e0c6cf2 version.

  • getting this as well on force:user:display
    – Eric
    Nov 19, 2018 at 13:50

5 Answers 5


This sounds like a bug in the CLI that you should report it via initiating the case .

You can see a better log in the logger file that will be stored in the $HOME/.sfdx/sfdx.log file .

The error that got generated is as below

"name": "sfdx",
"hostname": "Mohiths-MacBook-Air.local",
"pid": 16768,
"level": 50,
"msg": "[ false,\n  '{\"message\":\"logger is not defined\",\"status\":1,\"stack\":\"ReferenceError: logger is not defined\\\\n    at UserDisplayCommand.getHumanSuccessMessage (/Users/mohith/.local/share/sfdx/client/node_modules/salesforce-alm/dist/lib/user/userDisplayCommand.js:86:9)\\\\n    at _logSuccess (/Users/mohith/.local/share/sfdx/client/node_modules/salesforce-alm/dist/index.js:157:71)\\\\n    at _notifyUsageDataCollection.then.then.then.then.then.then.then (/Users/mohith/.local/share/sfdx/client/node_modules/salesforce-alm/dist/index.js:455:9)\\\\n    at tryCatcher (/Users/mohith/.local/share/sfdx/client/node_modules/bluebird/js/release/util.js:16:23)\\\\n    at Promise._settlePromiseFromHandler (/Users/mohith/.local/share/sfdx/client/node_modules/bluebird/js/release/promise.js:510:31)\\\\n    at Promise._settlePromise (/Users/mohith/.local/share/sfdx/client/node_modules/bluebird/js/release/promise.js:567:18)\\\\n    at Promise._settlePromise0 (/Users/mohith/.local/share/sfdx/client/node_modules/bluebird/js/release/promise.js:612:10)\\\\n    at Promise._settlePromises (/Users/mohith/.local/share/sfdx/client/node_modules/bluebird/js/release/promise.js:691:18)\\\\n    at Async._drainQueue (/Users/mohith/.local/share/sfdx/client/node_modules/bluebird/js/release/async.js:138:16)\\\\n    at Async._drainQueues (/Users/mohith/.local/share/sfdx/client/node_modules/bluebird/js/release/async.js:148:10)\\\\n    at Immediate.Async.drainQueues (/Users/mohith/.local/share/sfdx/client/node_modules/bluebird/js/release/async.js:17:14)\\\\n    at runCallback (timers.js:789:20)\\\\n    at tryOnImmediate (timers.js:751:5)\\\\n    at processImmediate [as _immediateCallback] (timers.js:722:5)\",\"name\":\"ReferenceError\",\"warnings\":[]}' ]",
"time": "2018-11-18T20:56:36.478Z",
"v": 0

looks like the 44.9.0 release that came in yesterday fix this .

  • I'd just like to add I'm getting this error also however cannot find an sfdx.log. Also works for me when using --json
    – Luke Bray
    Nov 19, 2018 at 13:00
  • 1
    Maybe someone with premier support can log a case? This appears to be DX wide but they will just close it and point me to the forums if I submit it....
    – Eric
    Nov 19, 2018 at 13:52
  • 1
    I've pinged Wade Wenger on Twitter. Will raise a case later if he doesn't respond. FWIW "Apex" isn't even a topic option when reporting a bug with premier these days :(
    – Matt Lacey
    Nov 20, 2018 at 0:44
  • 1
    Response from Wade: "Team will look into this tomorrow. Thanks for sharing." Fingers crossed!
    – Matt Lacey
    Nov 20, 2018 at 3:08

Thanks for reporting, I've filed a bug & we'll take a look. -Kate (CLI Team)

  • Thank you. Any advice on best route to submit outside of Salesforce support where they will just close the case. I would love to be able to report bugs and have them fixed
    – Eric
    Nov 20, 2018 at 5:39
  • 2
    A note for others seeing this in one of the review queues. Yes, it's technically not a stand-alone answer...but perhaps we can cut this employee of Salesforce a bit of slack.
    – Derek F
    Nov 20, 2018 at 12:41
  • @DerekF Agreed, there is no answer other than "this is a bug" so not sure what else could be added until there's a confirmed fix.
    – Matt Lacey
    Nov 25, 2018 at 23:27
  • 1
    The fix was identified & after QA will go out this Thursday 11/29.
    – kbierbaum
    Nov 26, 2018 at 17:17

We have filed it as a bug and today we received response that it was fixed in 6.41. However, we still encounter same error.


Today I had the same issue (version 6.41.1-44a593d6a3). But after I updated to 6.42.0-ae478b3cb8 that was release between yesterday and today, it worked (with and without --json)


I've received message from Salesforce support that this was a bug on their side and they have fixed it already, which I can confirm.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .