-
Notifications
You must be signed in to change notification settings - Fork 78
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
Could not verify OAuth request. #41
Comments
Bummer, what was the URL of that error page? If you manually go to the setup page again (raspberypi.local:3000/setup), are the OAuth values pre-populated at the bottom of the page? The 400 error seems to indicate something is wrong with the request itself. |
Yes, the values are there. The URL is http://192.168.2.130:3000/auth/bitbucket |
No, an IP address should be fine, and that does look good for the callback. I automatically detect what the valid hostname should be based on your first request to the editor. Can you try creating a new key and secret, and update with those new keys? It seems like bitbucket is complaining about bad data for some reason. I'm trying to reproduce this on my end as well. |
Same one with new keys
|
What distro are you using, and what browser are you using? I did most of my development with chrome, firefox, and Occidentalis. Are you behind a proxy or firewall? It appears you're making it to bitbucket, but they're responding that you have something wrong with the request. If all else fails, maybe do a full uninstall, and then a re-install. It will remember your bitbucket values, so it's just a matter of waiting for it to complete: |
It's the official Raspbian Wheezy. There is a Router to connect all machines to the Internet but there are no firewall rules set. I forwarding Port 3000 or setting up the DMZ doesn't have any effect. |
Does it need Bonjour? |
It shouldn't need Bonjour, as I do all of my development using various hostnames, such as 127.0.0.1, localhost, or my external IP...they all seem to work. The key here is that you're on Raspbian. Unfortunately, I haven't done much testing with Raspbian, so it could have different settings than Occidentalis 0.2. What version of node are you on? node -v Currently, it's targeted for node -v 0.6.x, as that's what typically is pre-installed in the debian repo. |
pi@raspberrypi ~ $ node -v |
tried to uninstall and got an error
Could this be the problem? |
I don't think that would be an issue. The only reason that failed is you haven't gotten far enough in the process to create your bitbucket ssh keys. |
I am getting the same issue . I tried reimaging the card and reinstalling . Created a different bitbucket account. Still the same. I am going through a DMZ on the network . Using Occidentalis v0.2 |
Is your Pi able to ping bitbucket.org? Also, do you get the status: 400 data: Could not verify OAuth request.? |
Yes can ping from Pi to bitbucket.org. Yes on status: 400 data: Could not verify OAuth request. |
failed to obtain request token (status: 400 data: Could not verify OAuth request.) |
I'm also getting an error when trying to login, but only when i try and connect from my computer. If i use the brower on the pi it works fine. Here is the error: Error: failed to find request token in session |
ianauch what is the URL for that error? Did you use a different hostname for the attempts from the Pi (localhost, vs an IP, for example)? If you restart the editor, and try first from your computer, it should work (try clearing the cookies too): Takes about 20-30 seconds to start up: |
Still cannot get past this stage of install. Have taken Pi to 3 different networks, all with different ISPs. Have reinstall Occidentalis v0.2 twice , changed SD cards. Still nothing. Anything else to try? |
Also got this error: failed to obtain request token (Error: getaddrinfo ENOENT) |
The latest error you posted appears to be a dns lookup failure of sorts. From your Pi, if you run the following command: Do you see the valid consumer_key, and consumer_secret (no need to paste these here :))? Also, if you run 'df' from the command line, do you have anything "Use%' at 100%? Also, are you using a 4GB SD card? Do you get a valid time and date back: You can try seeing if the linked in oauth test console will work for your key and secret, just need to add: The 400 bad request error likely means that a required parameter is missing: In the editor/server.js file on the Pi, you can add logging right at the beginning of the setup_passport (around lines 50-60), to see if all three parameters are set correctly: After entering that, restart the server Wait 20-30 seconds until it's started up. Let me know if any of this helps! |
I was seeing the exact same issue with not being able to authenticate to Bitbucket, Justin's comment about the date triggered the fix for me - I never realized that neither NTP nor Chrony were running, so my Pi's clock was very out of date. I fixed the date and everything is working as it should. |
Great! The date is used to create an OAuth timestamp, so if the Pi has the wrong date or time set, Bitbucket will reject it with that 400 error (for those that didn't know the nasty inner workings of OAuth). ;) |
My time and date is correct. I'm a little lost on the rest. |
I'm having the same problem! I've tried all the trouble shooting listed above, still getting the same error. :-| |
I am using Occidentalis 0.2....... |
Please try the latest version, and we can start from there with this OAuth issue. Here are the upgrade instructions: |
Well, after uninstalling my system time was reset to a time in the future! :-( It should say 10:21AM but it's now stuck at Thur Oct 18 12:45PM! :-| What the script do to my Pi? Date command won't reset the time. |
The script is quite simple, you can review it in this repository, and it doesn't execute any date or time commands, unless 'apt-get update' updates the time. What is the timezone on your Pi? Does the latest version fix your OAuth issue? Type 'date' on the command line to get the date, including the timezone. You can change the timezone in raspi-config: |
reset time zone, rebooted, set time. So now the WebIDE gets to logging on github. However, now NoScript is blocking the callbacks because the website is requesting lan resources "ABE". Any thoughts? |
You'll need to disable NoScript for the editor (lots of javascript). NoScript won't like the call from localhost to bitbucket for the OAuth request, which is what I'm sure it's complaining about with the ABE error. |
Two problems there. 1. disabling NoScript requires a browser restart. 2. once disabled, it is disable for EVERY website. Not a good thing! Is there an exception that I can set just for butbucket and WebIDE sites? Not sure how I would do that since I usually block these kinds of website requests. |
You can unblock it for just the WebIDE, unfortunately I'm not sure how, as I don't often use NoScript. May need to Google that one. |
I rebuilt my 8 gb card with Occidentalis 0.2. Ran the new 0.2 installer script. No installation errors like before, using my home network. Still getting: failed to obtain request token (Error: getaddrinfo ENOENT). I will check it on another network tomorrow but not having any DNS problems on network or the Pi. Thank you for your hard work developing this, cant wait to try it out after getting this issue resolved. |
@bwsparxz Everything I've searched for on that error makes it appear as though you're going through a firewall, or have DNS issues. Does that error also have the '400' 'bad request' in it? You've posted two errors in this thread, and just want to make sure we're working on the same one. :) |
Still getting this error: failed to obtain request token (Error: getaddrinfo ENOENT) |
EUREKA, I finally got the WebIDE working. Turns out it was a DNS resolution issue. Had tried changing nameserver to google dns with no luck. Tonight I realized I had not tried OpenDNS. That worked, as well as my issue with git clone. Had to set my Pi to static ip from dhcp so when I reboot the resolv.conf wasn't changed back to router gateway ip address, no big deal to me. Guess my ISP dns doesn't like git or bitbucket. But I guess that is the same for google dns as well. Makes no sense but its working. Thanks for putting me on the right path. |
Great news! I'm glad it's working for you. I'll leave this issue open for a while to help others that run into this issue. |
I got the 400 error too. All I did was executing "/etc/init.d/ntp force-reload". My time was way off. |
I've created an FAQ page for this issue on the Adafruit Learning System. If we're missing anything, feel free to add to this issue. All known cases of this so far have been unrelated to any code. |
Installation was fine, but after setup and clicking "Click here to log in to your Bitbucket Account"
i get the following Error in my Browser.
'failed to obtain request token (status: 400 data: Could not verify OAuth request.)
at /home/pi/Adafruit/WebIDE/editor/node_modules/passport-bitbucket/node_modules/passport-oauth/lib/passport-oauth/strategies/oauth.js:183:36
at /home/pi/Adafruit/WebIDE/editor/node_modules/passport-bitbucket/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:512:17
at passBackControl (/home/pi/Adafruit/WebIDE/editor/node_modules/passport-bitbucket/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:368:13)
at IncomingMessage. (/home/pi/Adafruit/WebIDE/editor/node_modules/passport-bitbucket/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:380:9)
at IncomingMessage.emit (events.js:88:20)
at HTTPParser.parserOnMessageComplete as onMessageComplete
at CleartextStream.socketOnData as ondata
at CleartextStream._push (tls.js:375:27)
at SecurePair.cycle (tls.js:734:20)
at EncryptedStream.write (tls.js:130:13)
'
The text was updated successfully, but these errors were encountered: