sfpowerkit:source:profile:reconcile -s fails with error: Cannot read property 'getUsername' of undefined

See original GitHub issue

Describe the bug sfdx sfpowerkit:source:profile:reconcile -s failing with error:

-------------------------------------------------------------------------------------------
sfpowerkit  -- The DX@Scale Developer Toolkit -Version:4.1.5 -Release:February 22
-------------------------------------------------------------------------------------------
INFO [2022-02-16 11:29:54.769 +0000] (sfpowerkit): Profiles Found in Entire Drirectory 24
INFO [2022-02-16 11:29:54.769 +0000] (sfpowerkit): Initiated Profile reconcile thread :1  with a chunk of 1 profiles
INFO [2022-02-16 11:29:54.769 +0000] (sfpowerkit): Profiles queued in thread :1 :
INFO [2022-02-16 11:29:54.769 +0000] (sfpowerkit): ["C:\\xx\\force-app\\main\\default\\profiles\\Admin.profile-meta.xml"]
ERROR [2022-02-16 11:29:54.770 +0000] (sfpowerkit): Cannot read property 'getUsername' of undefined
    err: {
      "type": "TypeError",
      "message": "Cannot read property 'getUsername' of undefined",
      "stack":
          TypeError: Cannot read property 'getUsername' of undefined
              at C:\Users\x\AppData\Local\sfdx\node_modules\sfpowerkit\src\impl\source\profiles\profileReconcile.ts:100:33
              at new Promise (<anonymous>)
              at ProfileReconcile.runWorkers (C:\Users\x\AppData\Local\sfdx\node_modules\sfpowerkit\src\impl\source\profiles\profileReconcile.ts:73:25)
              at ProfileReconcile.<anonymous> (C:\Users\x\AppData\Local\sfdx\node_modules\sfpowerkit\src\impl\source\profiles\profileReconcile.ts:58:18)
              at Generator.next (<anonymous>)
              at fulfilled (C:\Users\x\AppData\Local\sfdx\node_modules\sfpowerkit\lib\impl\source\profiles\profileReconcile.js:24:58)

Expected behavior Version 4.0.3 runs fine without any problems. 4.1.3 to 4.1.5 are having the error.

Desktop:

  • OS: Windows 10
  • Node Version 14.17.0; 14.18.2
  • Version of sfpowerkit 4.1.5
  • sfdx-cli/7.137.1 win32-x64 node-v14.18.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
azlam-abdulsalamcommented, Mar 5, 2022

@jonny-harte You can install it using sfdx plugins: install sfpowerkit@4.2.1. We will be promoting this next week

1reaction
sumanth-bolledla-acncommented, Feb 16, 2022

I’m able to reproduce the issue as well. Seems like the “-s” flag is expecting the target username value to be specified instead of skipping the condition. image

Read more comments on GitHub >

github_iconTop Results From Across the Web

force:org:list Cannot read property 'getUsername' of undefined
Summary force:org:list fails. $ sfdx force:org:list ERROR running force:org:list: Cannot read property 'getUsername' of undefined Steps To ...
Read more >
Error while Authorizing an ORG using VS Code Cannot read ...
Cannot read properties of undefined (reading 'setContentsFromObject'). This is most likely not an error with the Salesforce CLI.
Read more >
SFDX ERROR: Cannot read property 'fileName' of undefined.
I am getting an error when trying to do a sfdx retrieve: ERROR: Cannot read property 'fileName' of undefined. Here is the command...
Read more >
how to fix this TypeError: Cannot read property 'name' of null
Although Role is not null , The value of Role.name is null , meaning that it has no value assigned to it. That...
Read more >
Cannot read property "username" of null - YelpCamp 2021 ...
In this quick video I will show you how to fix a common bug when working on the YelpCamp project from Colt Steele's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found