Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Error after auth_web #43

Closed
thesingingmoose opened this issue Apr 3, 2016 · 10 comments
Closed

500 Error after auth_web #43

thesingingmoose opened this issue Apr 3, 2016 · 10 comments

Comments

@thesingingmoose
Copy link

After I run auth_web.py and try to access the socket (serverIP:5000/) I get a 500 error saying "amazon is working to fix this error". Error details "400 Bad Request
The redirect URI you provided has not been whitelisted for your application. Please add your redirect URI in the 'Allowed Return URLs' section under 'Web Settings' for your Security Profile on Amazon Developer Portal."

However, I have this address on the allowed origins and allowed return URLs (originally just on the origins but put it on the return to troubleshoot).

Has anyone had to deal with this?

@maso27
Copy link

maso27 commented Apr 4, 2016

I saw this error when I tried to use the built-in browser on the Raspbian desktop. Tried in Chrome on my Windows box and it worked with no issues.

@thesingingmoose
Copy link
Author

I had the error on the Raspbian browser as well as chrome on a Windows laptop. Could the browser matter?

@maso27
Copy link

maso27 commented Apr 4, 2016

Did you put all four of the addresses into developer.amazon.com?

http://localhost:5000
http://[ip_address]:5000

http://localhost:5000/code
http://[ip_address]:5000/code

And did your IP address change for your raspberry pi maybe?

@thesingingmoose
Copy link
Author

Yeah, had first 2 as origin and second 2 as return. I am sshing into the pi at the same time, so I dont think IP changed

@tdicola
Copy link

tdicola commented Apr 4, 2016

I just ran into this and what was happening was me accessing http://raspberrypi:5000/ and it trying to redirect to http://raspberrypi:5000/code without that URL being set in the security profile web settings. Make sure your security profile web settings have exactly the URL you're using to access the Pi. The instructions call for using localhost but it seems like that will only work if you're using the browser on the Pi itself to access localhost. Probably best to add http://raspberrypi:5000 and http://raspberrypi:5000/code so you can access under that URL from another machine.

@thesingingmoose
Copy link
Author

I have both localhost:5000 and RPi_IP:5000 added in the web settings (and /code for both for return).

I now get to the login screen, login, hit "OKAY" to access my device, and then hit the error.

@thesingingmoose thesingingmoose changed the title 400 Error after auth_web 500 Error after auth_web Apr 5, 2016
@thesingingmoose
Copy link
Author

There's also no longer a 500, just an error message and a link to Amazon home page

@burf2000
Copy link

burf2000 commented Apr 6, 2016

Has anyone found a fix for this?

@thesingingmoose
Copy link
Author

Worked when I made a new device in Amazon Dev Portal

@chimeranzl
Copy link

chimeranzl commented Oct 18, 2018

Has anyone found a fix for this?

Old post I know, but for anyone else... Delete the line refresh_token: "token_code"

and replace with...

refresh_token:

(no double quotes after it) then try again. It seems the internal error 500 is caused by the token line existing in the /etc/opt/Alexpi/config.yaml file. Also seems re-running setup.sh, doesn't actually replace with a fresh one when selecting the menu option, nor does it mention that the refresh token should be deleted. You don't need to create a new device or new security profile in AWS - just make sure everything matches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants