rgraciano / echo-sonos

Amazon Echo integration with Sonos
Other
713 stars 235 forks source link

New Lampda sonosProxy breaks advanced mode #133

Closed GregRocket closed 7 years ago

GregRocket commented 7 years ago

All I did was zip up the latest lampda src files and included the new directory and files in sonosProxy. I uploaded the new src.zip and ran the test, which passed.

I can play presets, pause, change volume without problems. But advanced mode features stopped working. I can not change room or change service type.

I went back to the last version without the sonosProxy directory and advance mode works again.

GregRocket commented 7 years ago

I aksed sonos to change music to library. This is the lampda error log.

00:28:38 START RequestId: xxxxxx Version: $LATEST 00:28:38 2017-02-22T00:28:38.966Z xxxxxx session applicationId: xxxxxx 00:28:38 2017-02-22T00:28:38.966Z xxxxxx dispatch intent = ChangeServiceIntent 00:28:38 2017-02-22T00:28:38.966Z xxxxxx ChangeServiceIntent received 00:28:38 2017-02-22T00:28:38.967Z xxxxxx Unexpected exception ReferenceError: AWS is not defined 00:28:38 2017-02-22T00:28:38.969Z xxxxxx {"errorMessage":"AWS is not defined","errorType":"ReferenceError","stackTrace":["changeCurrent (/var/task/index.js:494:33)","EchoSonos.intentHandlers.ChangeServiceIntent (/var/task/index.js:142:13)","AlexaSkill.eventHandlers.onIntent (/var/task/AlexaSkill.js:65:27)","AlexaSkill.requestHandlers.IntentRequest (/var/task/AlexaSkill.js:28:3 00:28:39 END RequestId: xxxxxx

GregRocket commented 7 years ago

@pheintzelman My problem is similar to issue #123 but not exactly the same.

Lastest build of echo-sonos installed.

I have a DEFAULTROOM and a DEFAULT_MUSIC_SERVICE set using Environment variables. As i stated above play, volume, presets all work, just not advanced mode features.

pheintzelman commented 7 years ago

How is it different from 123?

GregRocket commented 7 years ago

@pheintzelman The errors message are different. On 123 the log shows: room=extension newRoom= service=undefined newService=

I'm getting an error: Unexpected exception ReferenceError: AWS is not defined

pheintzelman commented 7 years ago

Thanks @GregRocket I found that issue. You can fix it by adding

var AWS = require('aws-sdk');

Near the top of index. I will put in a fix for this. Thanks for the helpful details. Also I don't think this fix will fix #123

GregRocket commented 7 years ago

@pheintzelman Thank you for the quick fix. That seems to have fixed things.

pheintzelman commented 7 years ago

@GregRocket :)