Alexa-skills-kit-sdk-for-nodejs: ask init UnhandledPromiseRejectionWarning: Error: Exited with code 3

Created on 26 Jun 2018  路  12Comments  路  Source: alexa/alexa-skills-kit-sdk-for-nodejs

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior



Following https://developer.amazon.com/docs/smapi/quick-start-alexa-skills-kit-command-line-interface.html to get started. ask init should have initialized the cli, without errors.

Current Behavior





ask init just stays waiting, and if the user opens http://localhost:9090 in chrome the script crashes without proper error handling.

@Vanth:/mnt/c/temp/awsbutton/skill-sample-nodejs-buttons-colorchanger$ sudo ask init
? Please create a new profile or overwrite the existing profile.
 [default]                 "default"
-------------------- Initialize CLI --------------------
Setting up ask profile: [default]
? Please choose one from the following AWS profiles for skill's Lambda function
deployment.
 default
Switch to 'Login with Amazon' page...
  -  Listening on http://localhost:9090(node:471) UnhandledPromiseRejectionWarning: Error: Exited with code 3
    at ChildProcess.<anonymous> (/usr/lib/node_modules/ask-cli/node_modules/opn/index.js:83:13)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:557:12)
(node:471) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:471) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


Possible Solution

// Not required, but suggest a fix/reason for the bug,
// or ideas how to implement the addition or change

Steps to Reproduce (for bugs)

// Provide a self-contained, concise snippet of code
// For more complex issues provide a repo with the smallest sample that reproduces the bug
// Including business logic or unrelated code makes diagnosis more difficult

I just followed the instructions. The only difference was that the first time I tried it, I think something else failed and I had to rerun the init command

Context


Your Environment

  • ASK SDK for Node.js used: 1.4.0
  • Operating System and version: Ubuntu 16.04.4 LTS \n \l Linux 4.4.0-17134-Microsoft #112-Microsoft Thu Jun 07 22:57:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux

Node.js and NPM Info

  • Node.js version used for development: 8.11.3
  • NPM version used for development: 5.6.0

Most helpful comment

I have been faced same problem and solve with --no-browser option.

All 12 comments

Deployment seem to get stuck afterward as well. The step "Creating new skill" has been spinning for more than 15 min at this point.

@Vanth:/mnt/c/temp/awsbutton/skill-sample-nodejs-buttons-colorchanger$ ask deploy -p color-changer
-------------------- Create Skill Project --------------------
Profile for the deployment: [color-changer]
[Error]: cannot find vendor id associated with the current profile
  /  Creating new skill...

Hi @YasharF ,

Thanks for your feedback. This is a non-SDK issue. I've forwarded the issue to the service team. Stay tuned!

Regards

Hi @YasharF ,

First thank you for using CLI!
For your second question, can you check your profile setting for profile "color-changer"? It's located at $HOME/.ask/config. Check the vendorId under this profile, is it existing? If not I think it is only a bug that CLI is not terminated correctly when this error happens.

And for your first question, could you try with different version of node? Because we cannot reproduce with this one, it's really hard to see why "opn" cause this issue...

Thanks,
Ron

I have been faced same problem and solve with --no-browser option.

--no-browser seems to work as a workaround. It is probably a bug then.

Hi all,

It seems issue has been resolved. Closing the issue now. Please feel free to reopen if the problem persists

Regards

Was there a software patch to resolve this? Which version software resolved this?

A hacky workaround after struggling with the device for half a day due to its software bugs is not a resolution.

Hi @YasharF ,

This issue is not related to the ASK SDK. We would recommend to post your issues on Alexa Developer Forum (see here)to get more prompt responses from community.

Meanwhile, @RonWang is looking after this issue. In order to facilitate the issue investigation, could you provide answers to his questions above?

Regards

Closing this issue due to inactivity. Please feel free to reopen if problem persists.

I had the same exact problem on ask init.

The no-browser workaround worked for me too.

I had the similar problem on ask init with error code 1

The no-browser workaround worked for me too.

I had same issue; for some reason when using -o outputfile, the error disappeared; no-browser did not work for me

Was this page helpful?
0 / 5 - 0 ratings