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

alexa auth command not working #24

Open
goldytech opened this issue Nov 20, 2018 · 8 comments
Open

alexa auth command not working #24

goldytech opened this issue Nov 20, 2018 · 8 comments

Comments

@goldytech
Copy link

Hi,
In AWS Security profile following are my settings

Allowed Origins  
http://127.0.0.1:9000/
Allowed Return URLs  
http://127.0.0.1:9000/cb

now when I run the command sls alexa auth. I don't see any listener process / webserver getting started which listens on 9000 port.

Hence after the Amazon consent screen The redirect uri not working in browser.
I've been following this link https://medium.com/@rupakg/how-to-build-a-serverless-alexa-skill-51d8479e0432
to build my custom skill.

Please help

@brunotag
Copy link

+1 same problem

@brunotag
Copy link

brunotag commented Nov 23, 2018

@goldytech it must be related with the versions 1.33.x of the serverless package: they must have changed the way they load/unload the plugins, or something like that - basically the command is terminated and the server is killed too early.

Workaround: npm install -g [email protected]

that should make sls alexa auth work afterwards (at least, it worked for me, node version 8.10).

@brunotag
Copy link

brunotag commented Nov 23, 2018

ok, my guess is that this fix
serverless/serverless#5349
is actually breaking the sls alexa auth command for serverless 1.33.x.

Ironic :)

@brunotag
Copy link

Yup, locally tested.
If you wanna give it a shot, install serverless 1.33.x, open the node_modules/serverless/bin/serverless file, delete this line
https://github.com/serverless/serverless/blob/master/bin/serverless#L45
and you'll see sls alexa auth waiting for the connection.

@dschep
Copy link

dschep commented Nov 23, 2018

@marcy-terui, to fix this, make the command that's getting killed return a promise that doesn't resolve until the work is done. See serverless/serverless#5503 for how I fixed sls log being broken by the same change.

@brunotag
Copy link

An imperfect but easy to implement fix could be adding a .delay(someTensOfSeconds) at the end of this chain of then's.
https://github.com/marcy-terui/serverless-alexa-skills/blob/master/index.js#L152

@Stackclash
Copy link

Stackclash commented Feb 19, 2019

Any update to this? I'm still seeing the issue with the latest version of serverless. @dschep I tried your fix by trying to install the fix, but the branch has been deleted.

@zaunermax
Copy link

+1 same problem

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

5 participants