alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.13k stars 737 forks source link

WebSocket error from ask-sdk-local-debug with EU region #716

Open javierAlo opened 2 years ago

javierAlo commented 2 years ago

I'm submitting a...


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

Expected Behavior

Configuring EU as region in launch.json and on start debugging, a debug session should start (for one hour period).

Current Behavior

The debug session only starts if region in launch.json is NA. With EU as region an error occurs. Region chosen: EU lambda/node_modules/ask-sdk-local-debug/dist/builder/WebSocketClientConfigBuilder.js:32 WebSocket error: Unexpected server response: 500 lambda/node_modules/ask-sdk-local-debug/dist/client/LocalDebugClient.js:58 WebSocket is closed: CloseEvent {target: WebSocket, type: 'close', wasClean: false, reason: '', code: 1006}

Possible Solution

Steps to Reproduce (for bugs)

Download an Alexa Skill from Amazon Developer Console to VSCode with ASK Toolkit. Install ask-sdk-model@^1.29.0 and ask-sdk-local-debug from lambda project directory Create launch.json and setup region as EU.

"version": "0.2.0", "configurations": [ { "name": "Debug Alexa Skill (Node.js)", "type": "pwa-node", "request": "launch", "program": "${command:ask.debugAdapterPath}", "args": [ "--accessToken", "${command:ask.accessToken}", "--skillId", "${command:ask.skillIdFromWorkspace}", "--handlerName", "handler", "--skillEntryFile", "${workspaceFolder}/lambda/index.js", "--region", "EU" ], "cwd": "${workspaceFolder}/lambda" } ] }

'Start Debugging' from VSCode Run menu.

Context

I'm trying to debug an Alexa skill from VSCode.

Your Environment

Node.js and NPM Info

javierAlo commented 2 years ago

It seems that this problem has been solved.

Betatester777 commented 2 years ago

In my case debugging DOESN'T work in EU and NA regions.

Betatester777 commented 2 years ago

https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/issues/718

ankitrex31 commented 2 months ago

I am facing the same issue, Does anyone know how to fix this..? i am using the EU region.