cjlee112 / spnet

selected papers network web engine
http://thinking.bioinformatics.ucla.edu/2011/07/02/open-peer-review-by-a-selected-papers-network/
GNU General Public License v2.0
40 stars 11 forks source link

signing in using Google - a bug #113

Closed johncarlosbaez closed 10 years ago

johncarlosbaez commented 10 years ago

When I click on 'sign in using Google' I get this message:

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last): File "/home/spnet/webapps/spnet/lib/python2.7/CherryPy-3.2.0-py2.7.egg/cherrypy/_cprequest.py", line 645, in respond response.body = self.handler() File "/home/spnet/webapps/spnet/lib/python2.7/CherryPy-3.2.0-py2.7.egg/cherrypy/lib/encoding.py", line 188, in call self.body = self.oldhandler(_args, _kwargs) File "/home/spnet/webapps/spnet/lib/python2.7/CherryPy-3.2.0-py2.7.egg/cherrypy/_cpdispatch.py", line 29, in call return self.callable(_self.args, _self.kwargs) File "/home/spnet/webapps/spnet/spnet/spnet/web.py", line 73, in oauth2callback oauth = get_session()['gplus_oauth'] File "/home/spnet/webapps/spnet/lib/python2.7/CherryPy-3.2.0-py2.7.egg/cherrypy/init.py", line 226, in getitem return child[key] File "/home/spnet/webapps/spnet/lib/python2.7/CherryPy-3.2.0-py2.7.egg/cherrypy/lib/sessions.py", line 255, in getitem return self._data[key] KeyError: 'gplus_oauth'

cjlee112 commented 10 years ago

I've tried reproducing this on both Firefox and Safari, and the login process worked fine on both. If this problem is reproducible for you, we can test some ways of trying to handle this case better.

johncarlosbaez commented 10 years ago

It always happens for me, now. Perhaps it's because I'm already logged in to G+ when I'm doing this? If I'm not supposed to click that button when I'm already logged in to G+, there should be some kind of "idiot alert" to tell me that. But it seems I'm not signed into spnetwork, since my name does not appear at the top of the page.

I'm trying to get some of my G+ posts containing "#spnetwork" to appear, so I'm trying to follow these directions:

and I'm failing at the first step.

cjlee112 commented 10 years ago

Being signed in to Google+ before visiting selectedpapers.net is perfectly fine; in that case ciicking sign-in on selectedpapers.net will just authenticate immediately without asking you for a password. I just retested this on firefox and safari with no problems. Could you provide details about what OS, browser, browser version etc. you're using? Also, please try deleting cookies from selectedpapers.net in your web browser and see if that helps. If not, then try clearing your cache of webpages from selectedpapers.net, and see if that helps. Finally, try logging out from Google+, and see if that helps.

johncarlosbaez commented 10 years ago

Hi -

Okay, I think the problem was that I'd deleted something on my browser saying I would allow cookies from spnetwork. When I fixed that, it seemed to work. But now, going to

https://selectedpapers.net/

gives me the repeated message

Restarting site ...click here https://selectedpapers.net/

I hope this is an unrelated problem... we've seen it before.

(For what it's worth, I'm using an up-to-date Firefox browser on a Windows laptop.)

Best, jb

cjlee112 commented 10 years ago

OK, thanks John. If you think we need to add something to the docs / website about this issue, let me know.

cjlee112 commented 10 years ago

Hi John, I added an informative error message for this situation, that tells the user they need to make sure their browser accepts cookies from selectedpapers.net. I'd be much obliged if you could repeat whatever you were doing that caused the problem before, to see if the server now gives you the informative message.

cjlee112 commented 10 years ago

Hi John, it would be nice if you could test a fix I added for this. Please see the issue report on github for details. Thanks!!

-- Chris

----- Original Message ----- From: "johncarlosbaez" notifications@github.com To: "cjlee112/spnet" spnet@noreply.github.com Cc: "cjlee112" leec@chem.ucla.edu Sent: Monday, September 1, 2014 1:55:47 AM Subject: Re: [spnet] signing in using Google - a bug (#113)

Hi -

Okay, I think the problem was that I'd deleted something on my browser saying I would allow cookies from spnetwork. When I fixed that, it seemed to work. But now, going to

https://selectedpapers.net/

gives me the repeated message

Restarting site ...click here https://selectedpapers.net/

I hope this is an unrelated problem.

(For what it's worth, I'm using an up-to-date Firefox browser on a Windows laptop.)

Best, jb

— Reply to this email directly or view it on GitHub .

johncarlosbaez commented 10 years ago

Chris wrote:

I added an informative error message for this situation, that tells the user they need to make sure their browser accepts cookies from selectedpapers.net. I'd be much obliged if you could repeat whatever you were doing that caused the problem before, to see if the server now gives you the informative message.

Yes, it does now. Thanks, that's much clearer!

cjlee112 commented 10 years ago

great, thanks!