sfdx-isv / sfdx-falcon

A Salesforce CLI Plugin that enables and enhances implementation of the SFDX-Falcon family of projects, including the AppExchange Demo Kit (ADK) and AppExchange Package Kit (APK)
https://sfdx-isv.github.io/sfdx-falcon/
38 stars 6 forks source link

EXECUTOR:hybrid:configureUser throws error when run on other systems #16

Open VivekMChawla opened 5 years ago

VivekMChawla commented 5 years ago

Got this error when running the basic demo install process during execution of the "configure-admin-user" Action.

I'm not sure why this is happening on other systems and not on mine.

COMMAND_RESULT_DEBUG:
Result Type:       COMMAND
Result Name:       falcon:demo:install
Result Status:     ERROR
Result Start Time: 1535122260763 (UTC)
Result End Time:   1535122581368 (UTC)
Result Duration:   320.605 seconds
Result Error:      SfdxFalconError (FIELD_INTEGRITY_EXCEPTION)
Message:           This user is a portal administrator and must have a profile with the "Edit Self-Service Users" permission.: __MISSING_LABEL_FOR_common.udd.impl.UddInfoImpl@754f2a08
Exit Code:         1
Stack: SfdxFalconError (FIELD_INTEGRITY_EXCEPTION): This user is a portal administrator and must have a profile with the "Edit Self-Service Users" permission.: __MISSING_LABEL_FOR_common.udd.impl.UddInfoImpl@754f2a08
    at Function.wrap (/Users/jrattanpal/.local/share/sfdx/plugins/node_modules/sfdx-falcon/lib/modules/sfdx-falcon-error/index.js:193:27)
    at SfdxFalconResult.error (/Users/jrattanpal/.local/share/sfdx/plugins/node_modules/sfdx-falcon/lib/modules/sfdx-falcon-result/index.js:243:63)
    at SfdxFalconResult.throw (/Users/jrattanpal/.local/share/sfdx/plugins/node_modules/sfdx-falcon/lib/modules/sfdx-falcon-result/index.js:605:14)
    at jsforce_6.restApiRequest.catch.error (/Users/jrattanpal/.local/share/sfdx/plugins/node_modules/sfdx-falcon/lib/modules/sfdx-falcon-recipe/executors/hybrid.js:191:47)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
Falcon Stack: SfdxFalconError (FIELD_INTEGRITY_EXCEPTION): This user is a portal administrator and must have a profile with the "Edit Self-Service Users" permission.: __MISSING_LABEL_FOR_common.udd.impl.UddInfoImpl@754f2a08
    at Result 'hybrid:configureUser' of type 'EXECUTOR' at duration 1917
    at Result 'executeAction:configure-admin-user' of type 'ACTION' at duration 1957
    at Result 'appx:demo-config:FSC-DriveWealth Demo' of type 'ENGINE' at duration 238416
    at Result 'FSC-DriveWealth Demo' of type 'RECIPE' at duration 0
    at Result 'falcon:demo:install' of type 'COMMAND' at duration 320605
Actions:   
Falcon Data (Depth=4): {}
Data (Depth=4):        {}
Cause (Depth=4):       {}
Result Detail: (Depth=4) { commandName: 'falcon:demo:install',
  commandType: 'APPX_DEMO',
  commandFlags: 
   { falcondebugerr: true,
     projectdir: '.',
     extendedoptions: '{}',
     falcondebugdepth: 2 },
  commandArgs: {},
  commandExitCode: 1,
  enabledDebuggers: [ 'FALCON_ERR' ] }
Number of Children: 1
Child Results: (Depth=2)
[ SfdxFalconResult {
    name: 'FSC-DriveWealth Demo',
    type: 'RECIPE',
    detail: {},
    errObj: 
     { SfdxFalconError (FIELD_INTEGRITY_EXCEPTION): This user is a portal administrator and must have a profile with the "Edit Self-Service Users" permission.: __MISSING_LABEL_FOR_common.udd.impl.UddInfoImpl@754f2a08
    at Function.wrap (/Users/jrattanpal/.local/share/sfdx/plugins/node_modules/sfdx-falcon/lib/modules/sfdx-falcon-error/index.js:193:27)
    at SfdxFalconResult.error (/Users/jrattanpal/.local/share/sfdx/plugins/node_modules/sfdx-falcon/lib/modules/sfdx-falcon-result/index.js:243:63)
    at SfdxFalconResult.throw (/Users/jrattanpal/.local/share/sfdx/plugins/node_modules/sfdx-falcon/lib/modules/sfdx-falcon-result/index.js:605:14)
    at jsforce_6.restApiRequest.catch.error (/Users/jrattanpal/.local/share/sfdx/plugins/node_modules/sfdx-falcon/lib/modules/sfdx-falcon-recipe/executors/hybrid.js:191:47)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
       cause: {},
       name: 'SfdxFalconError (FIELD_INTEGRITY_EXCEPTION)',
       actions: [],
       exitCode: 1,
       _falconStack: 'SfdxFalconError (FIELD_INTEGRITY_EXCEPTION): This user is a portal administrator and must have a profile with the "Edit Self-Service Users" permission.: __MISSING_LABEL_FOR_common.udd.impl.UddInfoImpl@754f2a08\n    at Result \'hybrid:configureUser\' of type \'EXECUTOR\' at duration 1917\n    at Result \'executeAction:configure-admin-user\' of type \'ACTION\' at duration 1957\n    at Result \'appx:demo-config:FSC-DriveWealth Demo\' of type \'ENGINE\' at duration 238416\n    at Result \'FSC-DriveWealth Demo\' of type \'RECIPE\' at duration 0\n    at Result \'falcon:demo:install\' of type \'COMMAND\' at duration 320605',
       _falconData: {},
       data: {} },
    children: [ [Object] ],
    _status: 'ERROR',
    _startTime: 1535122581368,
    _endTime: 1535122581368,
    _bubbleError: true,
    _bubbleFailure: true } ]

CLI_ERROR_DEBUG:
Error Name:    SfdxFalconError (FIELD_INTEGRITY_EXCEPTION)
Error Message: This user is a portal administrator and must have a profile with the "Edit Self-Service Users" permission.: __MISSING_LABEL_FOR_common.udd.impl.UddInfoImpl@754f2a08
Error Stack:   SfdxFalconError (FIELD_INTEGRITY_EXCEPTION): This user is a portal administrator and must have a profile with the "Edit Self-Service Users" permission.: __MISSING_LABEL_FOR_common.udd.impl.UddInfoImpl@754f2a08
    at Function.wrap (/Users/jrattanpal/.local/share/sfdx/plugins/node_modules/sfdx-falcon/lib/modules/sfdx-falcon-error/index.js:193:27)
    at SfdxFalconResult.error (/Users/jrattanpal/.local/share/sfdx/plugins/node_modules/sfdx-falcon/lib/modules/sfdx-falcon-result/index.js:243:63)
    at SfdxFalconResult.throw (/Users/jrattanpal/.local/share/sfdx/plugins/node_modules/sfdx-falcon/lib/modules/sfdx-falcon-result/index.js:605:14)
    at jsforce_6.restApiRequest.catch.error (/Users/jrattanpal/.local/share/sfdx/plugins/node_modules/sfdx-falcon/lib/modules/sfdx-falcon-recipe/executors/hybrid.js:191:47)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
SfdxError Data (Depth 2):
{}
SfdxError Cause (Depth 2):
{}
Falcon Stack:
SfdxFalconError (FIELD_INTEGRITY_EXCEPTION): This user is a portal administrator and must have a profile with the "Edit Self-Service Users" permission.: __MISSING_LABEL_FOR_common.udd.impl.UddInfoImpl@754f2a08
    at Result 'hybrid:configureUser' of type 'EXECUTOR' at duration 1917
    at Result 'executeAction:configure-admin-user' of type 'ACTION' at duration 1957
    at Result 'appx:demo-config:FSC-DriveWealth Demo' of type 'ENGINE' at duration 238416
    at Result 'FSC-DriveWealth Demo' of type 'RECIPE' at duration 0
    at Result 'falcon:demo:install' of type 'COMMAND' at duration 320605
Falcon Data (Depth 2):
{}
VivekMChawla commented 5 years ago

Looks like this is a bug with the Enterprise Edition scratch org template.

https://salesforce.stackexchange.com/questions/224658/salesforce-dx-portal-administrator-issue-on-user-after-creating-scratch-org

Conversation with the Salesforce Product Manager confirms that this behavior (not being able to change user details for the Admin User) can occur randomly when using Enterprise scratch orgs. The short-term workaround is to use Developer Edition instead.

Keeping this issue open for now but lowering its priority.