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

Error while executing get realms list with empty list #507

Open
imollm opened this issue Aug 31, 2023 · 0 comments
Open

Error while executing get realms list with empty list #507

imollm opened this issue Aug 31, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@imollm
Copy link

imollm commented Aug 31, 2023

sfcc-ci Version

2.11.0

NodeJS Version

v18.17.1

sfcc-ci Path

/Users/***/Library/Caches/fnm_multishells/4561_1693479051367/bin/sfcc-ci

Host OS Details

image

image

Description

There's an error while we are executing the command sfcc-ci sandbox:realm:list when the list comes empty, maybe you should change this line:

if (list.length === 0) {

For this one:

if (typeof list === 'object' && list.length === 0) {

Relevant log output

/Users/ivanpersonal/Library/Application Support/fnm/node-versions/v18.17.1/installation/lib/node_modules/sfcc-ci/lib/sandbox.js:908
                if (list.length === 0) {
                         ^

TypeError: Cannot read properties of undefined (reading 'length')
    at /Users/ivanpersonal/Library/Application Support/fnm/node-versions/v18.17.1/installation/lib/node_modules/sfcc-ci/lib/sandbox.js:908:26
    at /Users/ivanpersonal/Library/Application Support/fnm/node-versions/v18.17.1/installation/lib/node_modules/sfcc-ci/lib/sandbox.js:371:13
    at ensureValidToken (/Users/ivanpersonal/Library/Application Support/fnm/node-versions/v18.17.1/installation/lib/node_modules/sfcc-ci/lib/ocapi.js:94:9)
    at Request._callback (/Users/ivanpersonal/Library/Application Support/fnm/node-versions/v18.17.1/installation/lib/node_modules/sfcc-ci/lib/ocapi.js:148:9)
    at self.callback (/Users/ivanpersonal/Library/Application Support/fnm/node-versions/v18.17.1/installation/lib/node_modules/sfcc-ci/node_modules/request/request.js:185:22)
    at Request.emit (node:events:514:28)
    at Request.<anonymous> (/Users/ivanpersonal/Library/Application Support/fnm/node-versions/v18.17.1/installation/lib/node_modules/sfcc-ci/node_modules/request/request.js:1154:10)
    at Request.emit (node:events:514:28)
    at IncomingMessage.<anonymous> (/Users/ivanpersonal/Library/Application Support/fnm/node-versions/v18.17.1/installation/lib/node_modules/sfcc-ci/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (node:events:628:28)

Node.js v18.17.1
``
@imollm imollm added the bug Something isn't working label Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant