stevenleeg / geemusic

A bridge between Google Music and Amazon's Alexa
GNU General Public License v3.0
662 stars 178 forks source link

Can't get Heroku to work #233

Closed trashcanpatrol closed 6 years ago

trashcanpatrol commented 6 years ago

Hi, I haven't used Heroku before, so please excuse my lack of knowledge... I followed the instructions to create a new Heroku instance, and set the variables as needed from command-line: heroku config:set GOOGLE_EMAIL=blablabla heroku config:set GOOGLE_PASSWORD= etc.

I can verify from Heroku's end that the variables are all in place and are correct. I also double-checked to be sure that my app password was correct, and that I had less than ten devices authorized to use this Google Music account.

From Amazon Developer's end, I changed my endpoint to: https://[my-heroku-app].herokuapp.com/alexa

When I try testing this from Amazon Developer, I get: "There was a problem with the requested skill's response". This is the output I see (device ID, skill ID, etc redacted): { "version": "1.0", "session": { "new": true, "sessionId": "redacted", "application": { "applicationId": "redacted" }, "user": { "userId": "redacted" } }, "context": { "AudioPlayer": { "playerActivity": "IDLE" }, "Display": {}, "System": { "application": { "applicationId": "redacted" }, "user": { "userId": "redacted" }, "device": { "deviceId": "redacted", "supportedInterfaces": { "AudioPlayer": {}, "Display": { "templateVersion": "1.0", "markupVersion": "1.0" } } }, "apiEndpoint": "https://api.amazonalexa.com", "apiAccessToken": "redacted" } }, "request": { "type": "IntentRequest", "requestId": "redacted", "timestamp": "2018-06-05T12:44:30Z", "locale": "en-US", "intent": { "name": "GeeMusicPlaySongIntent", "confirmationStatus": "NONE", "slots": { "artist_name": { "name": "artist_name", "confirmationStatus": "NONE" }, "song_name": { "name": "song_name", "value": "Radiohead", "confirmationStatus": "NONE" } } } } }

I thought maybe I would need to try running, from my server, "python3 server.py", but when I try that, I receive the following error: Traceback (most recent call last): File "server.py", line 1, in from geemusic import app File "/home/user/projects/geemusic/geemusic/init.py", line 26, in api = GMusicWrapper.generate_api(logger=app.logger) File "/home/user/projects/geemusic/geemusic/utils/music.py", line 266, in generate_api return cls(environ['GOOGLE_EMAIL'], environ['GOOGLE_PASSWORD'], File "/usr/lib/python3.5/os.py", line 725, in getitem raise KeyError(key) from None KeyError: 'GOOGLE_EMAIL'

I have tried using DEBUG_MODE as TRUE and as FALSE, which I've seen recommended from other issue threads, but have the same problem...

Is there a way I can get this to work with Heroku? Am I doing something wrong? The endpoint URL is accessible from both its direct path (https://[my-heroku-app].herokuapp.com) and from appending /alexa to the end (https://[my-heroku-app].herokuapp.com/alexa). I have also tried using Kaffeine to send pings so the server should not be sleeping/idle when this happens, but still no dice :(

fergyfresh commented 6 years ago

You don't have GOOGLE_EMAIL environment variable set. GOOGLE_EMAIL="myemail@email.email"

trashcanpatrol commented 6 years ago

Thanks @fergyfresh ! I double-checked my server configs and saw that it was still set on Heroku's end, but that led me to finding out I simply hadn't deployed to Heroku yet. Problem was all on my end :) it looks like things should be good now!

Cheers!