dmhacker / alexa-youtube-skill

Allows Alexa to play audio from YouTube videos
MIT License
243 stars 109 forks source link

Unhandled rejection Error: Invalid application #5

Closed sam170582 closed 7 years ago

sam170582 commented 7 years ago

I just took the recent code from master. When testing lamda function, I am getting this error:

Unhandled rejection Error: Invalid application
 at Object.ensureErrorObject (/var/task/node_modules/bluebird/js/main/util.js:261:20)
    at Promise._rejectCallback (/var/task/node_modules/bluebird/js/main/promise.js:472:22)
    at Promise._settlePromiseFromHandler (/var/task/node_modules/bluebird/js/main/promise.js:516:17)
    at Promise._settlePromiseAt (/var/task/node_modules/bluebird/js/main/promise.js:584:18)
    at Promise._settlePromiseAtPostResolution (/var/task/node_modules/bluebird/js/main/promise.js:248:10)
    at Async._drainQueue (/var/task/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (/var/task/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues (/var/task/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
andrewdavisdev commented 7 years ago

@dmhacker I am also getting this error message on the Lambda Function.

dmhacker commented 7 years ago

@sam170582 @andrewdavisdev Can you guys try downloading the latest file from this link and uploading that (rather than compiling it yourselves)? Also, make sure your environment variables are set up properly.

andrewdavisdev commented 7 years ago

@dmhacker I tried the latest zip and was still getting the error. See my PR for my fix that got it working.

Firni95 commented 7 years ago

I set up everything with the new zip and now the skill found a song, but isn't able to play it. Maybe its becouse of my location (Germany) and Lambda doesn't allow alexa skills from germany so I used Ireland instead?!

Do you still need an S3 bucket?

Log: START RequestId: 07da3085-768f-11e7-a843-c7fba42a9edb Version: $LATEST 2017-08-01T07:57:14.497Z 07da3085-768f-11e7-a843-c7fba42a9edb Searching ... maffay 2017-08-01T07:57:15.699Z 07da3085-768f-11e7-a843-c7fba42a9edb Found ... Peter Maffay - Wenn Der Himmel Weint (Offizielles Video) 2017-08-01T07:57:16.358Z 07da3085-768f-11e7-a843-c7fba42a9edb Processed. 2017-08-01T07:57:16.754Z 07da3085-768f-11e7-a843-c7fba42a9edb Stored @ undefined END RequestId: 07da3085-768f-11e7-a843-c7fba42a9edb REPORT RequestId: 07da3085-768f-11e7-a843-c7fba42a9edb Duration: 2462.19 ms Billed Duration: 2500 ms Memory Size: 128 MB Max Memory Used: 40 MB

Also there are timeout-errors after 3 seconds such as: START RequestId: 0c0287ce-7690-11e7-9f33-cda3468a1dd1 Version: $LATEST 2017-08-01T08:04:30.899Z 0c0287ce-7690-11e7-9f33-cda3468a1dd1 Searching ... believer 2017-08-01T08:04:31.596Z 0c0287ce-7690-11e7-9f33-cda3468a1dd1 Found ... Imagine Dragons - Believer 2017-08-01T08:04:32.727Z 0c0287ce-7690-11e7-9f33-cda3468a1dd1 Processed. END RequestId: 0c0287ce-7690-11e7-9f33-cda3468a1dd1 REPORT RequestId: 0c0287ce-7690-11e7-9f33-cda3468a1dd1 Duration: 3003.96 ms Billed Duration: 3000 ms Memory Size: 128 MB Max Memory Used: 39 MB 2017-08-01T08:04:33.747Z 0c0287ce-7690-11e7-9f33-cda3468a1dd1 Task timed out after 3.00 seconds START RequestId: 0ddf8561-7690-11e7-95a7-178bc076b68b Version: $LATEST

dmhacker commented 7 years ago

@Firni95 You shouldn't need an S3 bucket. That is handled by my server. What's happening is you are timing out. Under Advanced Settings on your lambda machine, increase the timeout to >= 1 minute.

http://i.imgur.com/BKEJKdt.png

dmhacker commented 7 years ago

Closing this issue because everything seems to have been fixed here.