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.request does not seem to get session data. #11

Closed
whazlewo opened this issue Jul 2, 2015 · 2 comments
Closed

alexa.request does not seem to get session data. #11

whazlewo opened this issue Jul 2, 2015 · 2 comments

Comments

@whazlewo
Copy link

whazlewo commented Jul 2, 2015

Hello,

I'm trying to get alexa-app 2.0 working, and I'm stuck at just getting the launch event to fire. The error I'm getting is below. So far I just have a basic alexa-app and on app.launch i'm just console logging a SUCCESS.

It seems that alexa.request is getting json that does NOT contain any session information.

Any ideas on what to try?

Unhandled rejection TypeError: Cannot read property 'new' of undefined
    at new alexa.request (/Users/hazlewoo/Repos/quincy-echo/node_modules/alexa-app/index.js:66:26)
    at /Users/hazlewoo/Repos/quincy-echo/node_modules/alexa-app/index.js:124:18
    at request (/Users/hazlewoo/Repos/quincy-echo/node_modules/alexa-app/index.js:123:10)
    at callbacks (/Users/hazlewoo/Repos/quincy-echo/node_modules/express/lib/router/index.js:164:37)
    at param (/Users/hazlewoo/Repos/quincy-echo/node_modules/express/lib/router/index.js:138:11)
    at pass (/Users/hazlewoo/Repos/quincy-echo/node_modules/express/lib/router/index.js:145:5)
    at Router._dispatch (/Users/hazlewoo/Repos/quincy-echo/node_modules/express/lib/router/index.js:173:5)
    at Object.router (/Users/hazlewoo/Repos/quincy-echo/node_modules/express/lib/router/index.js:33:10)
    at next (/Users/hazlewoo/Repos/quincy-echo/node_modules/express/node_modules/connect/lib/proto.js:194:15)
    at Object.staticMiddleware [as handle] (/Users/hazlewoo/Repos/quincy-echo/node_modules/express/node_modules/connect/node_modules/serve-static/index.js:67:61)
    at next (/Users/hazlewoo/Repos/quincy-echo/node_modules/express/node_modules/connect/lib/proto.js:194:15)
    at cors (/Users/hazlewoo/Repos/quincy-echo/node_modules/cors/lib/index.js:122:7)
    at /Users/hazlewoo/Repos/quincy-echo/node_modules/cors/lib/index.js:177:17
@matt-kruse
Copy link
Collaborator

Can you post the code of your app? Or capture the full JSON of the request? From what I understand, the session object should always exist in the request.

Another thought - Are you hooking your app into express? If so, have you included bodyParser? If not, the JSON body will not be passed on from express in the request.

@matt-kruse
Copy link
Collaborator

Any followup?

This issue was closed.
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

2 participants