stevenleeg / geemusic

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

Problem deploying to AWS #272

Closed RandyCupic closed 5 years ago

RandyCupic commented 5 years ago

Hi,

I'm having the same issues as here: https://github.com/stevenleeg/geemusic/issues/270

But the problem remained even after I tried to manually create the bucket in the S3 Management Console. I created the bucket by leaving all default options. Could you give me some help, since the author of the issue above just closed the issue without any further details how to fix it?

Note: I'm new to the AWS, Python etc. so I never heard before for terms such as zappa, bucket, AWS, S2 etc. :)

RandyCupic commented 5 years ago

Ok, the issue for this was my stupidity: I somehow missed the first s3_bucket parameter in the zappa_settings.json file; I've entered only the environment variables but this one remained default. Sorry :)

After I filled in all parameters successfully, this error disappeared but I was faced with tons of other errors. zappa tail command helped me a lot here. I had to install lot of required packages, such as flask, flask_ask, req, fuzzywuzzy and gmusicapi. I installed all of them with pip install [PACKAGE_NAME] but I was facing another issue while installing req. After I did some research on Google, I found the solution; I had to downgrade pip to 9.0.3.

Ultimately, I deployed the app successfully. But then again I was faced with a problem, due to instructions being a little bit unclear regarding the endpoint URL. I set up all the parameters prior to deploying, and I haven't known the endpoint URL so I thought that I can put whatever I want, and that it will be created automatically. After deploying, the Alexa skill was working but it was returning error when tried to play the music. So I went through the README again and found that this problem is mostly caused by endpoint URL being wrong. Then I noticed that I got a correct URL after deployment, so I updated it.

And then another problem! The skill was working now but there was no music. Again, zappa tail to the rescue! I've found the botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the PutObject operation: Access Denied error in the log. Google told me that I have to set up permissions for my newly created bucket. I went to the Permissions tab on the bucket page, and I've set all "block" statements to false.This was never mentioned in the README. Then I finally got the thing to play some music :)

But now I'm facing very poor overall performance, but I should probably open a new issue and provide some logs. For example, playlists are not working at all. When I ask it to list them, they're all there but I tried all of them and it says that this playlist was not found. Also, it can't recognize most of the tracks or artist that I ask it to play. And sometimes I'm playing artist A, and then I tell him to start playing artist B, and when I say next, it skipped to a song from artist A. Also, it often somehow misses the ask gee music part and tries to start Pandora/Amazon Music/TuneIn, instead of GeeMusic.

All in all, this is a great project and I'm so happy to finally be able to play Google Music on my Echo Dot. Thanks to all contributors and don't take my remarks for the bad. I just wanted to give a few propositions from a perspective of someone who is new in Python and AWS.

fergyfresh commented 5 years ago

Pull requests welcome ;)

fergyfresh commented 5 years ago

I tried to document as much as I could, but if you have any way of clarifying the README or anything else along the way feel free to help out! I'm an approver to I can get any thing submit approved if its warranted ;)