Skip to content

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

@lakshmi2506

Description

@lakshmi2506

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    more information requiredIssue requires more information or a response from the customervalidatedVersion information for this issue has been validated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions