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

Javascript API: Code Version activation not triggering #161

Open
dmersiowsky opened this issue Jun 12, 2020 · 5 comments
Open

Javascript API: Code Version activation not triggering #161

dmersiowsky opened this issue Jun 12, 2020 · 5 comments

Comments

@dmersiowsky
Copy link
Member

Code activation through the Javascript API does not seem to trigger while the callback doesn't get an error.

Calling this API:

let codeApi = require('sfcc-ci').code;
codeApi.activate(instance, version, token, function (error) { /*error is empty*/ });
@dmersiowsky
Copy link
Member Author

Looks like sfcc-ci is throwing an error itself:

Error: null
    at XXXX/node_modules/sfcc-ci/lib/code.js:425:26
    at Object.ensureValidToken (XXXX/node_modules/sfcc-ci/lib/ocapi.js:94:9)
    at Request._callback (/Users/dmersiowsky/source/build-suite-dev/build/node_modules/sfcc-ci/lib/code.js:414:19)
    at Request.self.callback (XXXX/node_modules/request/request.js:185:22)
    at Request.emit (events.js:198:13)
    at Request.<anonymous> (XXXX/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:198:13)
    at IncomingMessage.<anonymous> (XXXX/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:286:20)
    at IncomingMessage.emit (events.js:203:15)

@tobiaslohr
Copy link
Contributor

while the callback doesn't get an error.

@dmersiowsky can you verify, if you are running into either https://github.com/SalesforceCommerceCloud/sfcc-ci/blob/master/lib/code.js#L415 or https://github.com/SalesforceCommerceCloud/sfcc-ci/blob/master/lib/code.js#L419 condition? In that case, the callback does not get an Error passed

@dmersiowsky
Copy link
Member Author

dmersiowsky commented Jun 30, 2020

Didn't debug through that yet but I can confirm that the code version is not yet active and it doesn't get activated either.
Instead I can see the stack trace posted above. I already triple-checked the function parameters and they are definitely valid (including the token).

@dmersiowsky
Copy link
Member Author

Looks like we're calling new Error(null) in https://github.com/SalesforceCommerceCloud/sfcc-ci/blob/master/lib/code.js#L425.

I'll investigate.

@C-Lacerda
Copy link

H @dmersiowsky have you solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants