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

No prompt is not working for sf org login access-token command #3143

Closed
lakshmi2506 opened this issue Dec 10, 2024 · 4 comments
Closed

No prompt is not working for sf org login access-token command #3143

lakshmi2506 opened this issue Dec 10, 2024 · 4 comments
Labels
more information required Issue requires more information or a response from the customer validated Version information for this issue has been validated

Comments

@lakshmi2506
Copy link

lakshmi2506 commented Dec 10, 2024

No prompt is not working the sf org login access-token with the sf cli

(node:2048) Warning: Deprecated environment variable: SFDX_ACCESS_TOKEN. Please use SF_ACCESS_TOKEN instead.

(Use `node --trace-warnings ...` to show where the warning was created)
 ›   Warning: force auth accesstoken store is not a sf command.
 Did you mean force auth accesstoken store? (Y/n)
 ›   Error: Run sf help for a list of available commands.
[12/10/24 11:43:33] Running command: vlocity packExport -job job.yaml -sfdx.username 'cci-vbt-target'                                                                                  
=============================================
simple-git has supported promises / async await since version 2.6.0.
 Importing from 'simple-git/promise' has been deprecated and will
 report this error until the next major release of version 4.

To upgrade, change all 'simple-git/promise' imports to just 'simple-git'
=============================================
  Vlocity Build v1.17.6-alpha.1  
  Org >> cci-vbt-target  
  Using SFDX >> cci-vbt-target  
  Refreshing SFDX Session >> cci-vbt-target  
  Command to be executed is  >> sf org display --target-org "cci-vbt-target"  --verbose --json  
  SFDX Login Error >> TypeError: Cannot read properties of undefined (reading 'username')
    at UtilityService.sfdxLogin (/app/node_modules/vlocity/lib/utilityservice.js:347:72)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async UtilityService.checkLogin (/app/node_modules/vlocity/lib/utilityservice.js:384:13)
    at async Vlocity.checkLogin (/app/node_modules/vlocity/lib/vlocity.js:1037:12)
    at async Vlocity.runDataPacksCommand (/app/node_modules/vlocity/lib/vlocity.js:167:26)
    at async VlocityCLI.runJob (/app/node_modules/vlocity/lib/vlocitycli.js:729:12)
    at async VlocityCLI.runCommands (/app/node_modules/vlocity/lib/vlocitycli.js:616:23)
    at async VlocityCLI.runCLI (/app/node_modules/vlocity/lib/vlocitycli.js:418:22)
    at async /app/node_modules/vlocity/lib/vlocitybuild.js:7:9 
    
For the sf org login access-token command even after using --no-prompt it still asks for yes or no. This was working fine with old sfdx command `force:auth:accesstoken:store`. Can you please help me with this.

sf version --verbose

CLI Version:
        @salesforce/cli/2.68.6

 Architecture:
        linux-arm64

 Node Version:
        node-v18.20.4

 Plugin Version:
        @oclif/plugin-autocomplete 3.2.10 (core)
        @oclif/plugin-commands 4.1.10 (core)
        @oclif/plugin-help 6.2.18 (core)
        @oclif/plugin-not-found 3.2.28 (core)
        @oclif/plugin-plugins 5.4.17 (core)
        @oclif/plugin-search 1.2.16 (core)
        @oclif/plugin-update 4.6.13 (core)
        @oclif/plugin-version 2.2.16 (core)
        @oclif/plugin-warn-if-update-available 3.1.23 (core)
        @oclif/plugin-which 3.2.19 (core)
        @salesforce/cli 2.68.6 (core)
        apex 3.6.3 (core)
        api 1.3.2 (core)
        auth 3.6.75 (core)
        data 3.11.4 (core)
        deploy-retrieve 3.15.13 (core)
        info 3.4.21 (core)
        limits 3.3.40 (core)
        marketplace 1.3.6 (core)
        org 5.2.4 (core)
        packaging 2.9.3 (core)
        schema 3.3.42 (core)
        settings 2.4.6 (core)
        sobject 1.4.46 (core)
        telemetry 3.6.23 (core)
        templates 56.3.30 (core)
        trust 3.7.43 (core)
        user 3.6.3 (core)

 OS and Version:
        Linux 6.10.4-linuxkit

 Shell:
        bash

 Root Path:
        /app/node_modules/@salesforce/cli

Terminal

sh-5.1$ echo $SHELL
/bin/bash
@lakshmi2506 lakshmi2506 added the investigating We're actively investigating this issue label Dec 10, 2024
Copy link

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.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Dec 10, 2024
@mdonnalley
Copy link
Contributor

@lakshmi2506 The --no-prompt flag is working as expected from my testing. Can you provide more clear reproduction steps - thanks!

@mdonnalley mdonnalley added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Dec 10, 2024
@lakshmi2506
Copy link
Author

@mdonnalley I am facing issue this issue in our falcon service docker image while retrieving the omnistudio components using Vlocity CLI and CCI (https://github.com/SFDO-Tooling/CumulusCI/blob/main/cumulusci/tasks/vlocity/vlocity.py). I am unable to reproduce this in local. It is coming only in the docker image.

@mdonnalley
Copy link
Contributor

mdonnalley commented Dec 10, 2024

@lakshmi2506 I'm not sure there's anything we can do to help if you can't provide steps to reproduce

The only thing I can see in your original error message is that it looks like the prompt is coming from the "did you mean" hook - not from the sf org login access token. Maybe you're attempting to execute the wrong command?

 ›   Warning: force auth accesstoken store is not a sf command.
 Did you mean force auth accesstoken store? (Y/n)
 ›   Error: Run sf help for a list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more information required Issue requires more information or a response from the customer validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

2 participants