Closed chris-thorn closed 6 years ago
Not sure if this will fix your issue, but these are the steps that work for me using a free ngrok account:
./ngrok http 5000
source .venv/bin/activate
foreman start
. I don't specify a port for it to run on.From developer.amazon.com, under Alexa Skills --> (your skill) --> Configuration, ensure the URL is the same as those above while including the /alexa portion (https://3w89f8p7.ngrok.io/alexa in my case)
Save, and navigate to the Test section. Ensure the skill is set to Enabled, and enter test text into the Service Simulator. I used "play Radiohead", and upon clicking the Ask button, I receive an error in the Service Response side: "There was an error calling the remote endpoint, which returned HTTP 500 : INTERNAL SERVER ERROR"
This is a different error than the one you're receiving, but since it's working on my end, yours could be a setup hiccup (or router port/firewall/desktop firewall/SSL cert issue).
Regardless, with this setup, I was able to copy all the code from the Service Request section, click the JSON tab, and paste into the Json Request box. When I clicked the Ask button again, I saw a valid Service Response on the right side. The Echo Show Render Response displays the text "Playing Creep by Radiohead" and an image of the Pablo Honey album art when it's successful.
I should have specified this earlier, but I would recommend trying the JSON tab to test like that first, just to see if it's a testing output issue. Hopefully your setup works fine with this!
Yaayy I see the Pablo Honey album artwork too now! Thanks so much for your help!
Unfortunately I can't test for a few hours as I'm away from home, but I'm pretty hopeful!
Now that it appears to be working on ngrok, I'll see if I can get it to work with my own domain. I think, as you say, it was most likely down to incorrect URLs/ports.
Thanks again,
Chris
Glad it's working now! I just got a new domain so I have yet to test it with an SSL cert, but I'll comment any changes or issues I run into here if you don't beat me to it first :P
The annoying thing I've found with this ngrok setup (for the free version anyway) is that it seems like it might be a hassle to do after every reboot. I use a Raspberry Pi as my server and it's not the greatest of hardware, so if something crashes I have to run through the process again and grab a new ngrok ID... hence having these shorter instructions handy. You might be able to automate it with a Selenium script and grab the random URL on reboot, but still seems like a lot of hoops to jump through.
tl;dr: Having your own domain and cert seems preferable and I hope both of us can get it working. :D
This hasn't seen any recent activity and will therefore be closed. Feel free to comment or file a new issue if you're still having trouble.
Edit: I Fixed the initial issue of the wrong (?) port being used by foreman by using
foreman start -p 4000
, but I still get the errorThe remote endpoint could not be called, or the response it returned was invalid.
when I test things in the dev console.I'm running GeeMusic on an Ubuntu 16.04 server in a Python 3 virtualenv. Following the setup instructions I find that instead of GeeMusic running on port 4000, foreman reports it's running on port 5000:
20:04:53 web.1 | * Running on https://0.0.0.0:5000/ (Press CTRL+C to quit)
netstat shows python3 listening on 0.0.0.0:5000.
Have I missed something?
I've actually gone through the whole set of instructions a couple of times, and spent a few hours scratching my head on this one. I've tried a Let's Encrypt cert as well as a self-signed cert, and I've tried it with an Nginx reverse proxy and without, but I feel like I've lost track of what's going on now.
I've got the Alexa skill set up, and if I type "play music by radiohead" the Service Request JSON appears to work OK:
but I only get
The remote endpoint could not be called, or the response it returned was invalid.
in the Service Response box.
So is there any issue that's causing a different port to be displayed by foreman, compared with that shown in the instructions?
Thanks so much!
Chris