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

Intermittent "401 Client Error: Unauthorized for url..." issue #117

Open
tamakisquare opened this issue Dec 27, 2016 · 11 comments
Open

Intermittent "401 Client Error: Unauthorized for url..." issue #117

tamakisquare opened this issue Dec 27, 2016 · 11 comments
Labels

Comments

@tamakisquare
Copy link

First of all, I want to be clear that, IMO, this issue isn't caused by Pyrebase but lies with one of Pyrebase's dependencies, oauth2client. I have already filed an issue with oauth2client's github. I am also reporting it here as it also impacts the Pyrebase project, like in my case.

@thisbejim, any thoughts on this issue? Is there a way to get around it in Pyrebase?

Python version: 3.4.3
Pyrebase version: 3.0.25
Service account is used

@thisbejim
Copy link
Owner

Thanks for opening this issue @tamakisquare! This is a great find and the issue you filed on the oauth2client repo is really nicely detailed about what is actually happening here. I don't have any insights into this at the moment but will take a look when I get the time.

Oh and have a happy new year!

@tamakisquare
Copy link
Author

Thanks, @thisbejim.

I have applied a fix to my local copy of the oauth2client library. It's been running fine for several days. Trying to put the fix in as a pull request to the oauth2client project but I am having trouble passing the existing set of tests of the project prior to applying the fix, so that task is on a pause for now.

Meanwhile, I believe the issue will likely trigger people reporting random 401 errors symptom to the Pyrebase project, so I want to make sure you and the other Pyrebase users are aware of this issue.

Thanks for your new year wishes, my friend. Wish you a journey full of joy in the new year. And thank you for the great work on Pyrebase. It has saved me a great deal of time trying to integrate my system with Firebase. Cheers.

@thisbejim thisbejim added the bug label Jan 6, 2017
@theacodes
Copy link

theacodes commented Jan 31, 2017

Heads up, we're actively working to replace oauth2client with google-auth. Switching would allow this library to also move away from httplib2.

Are y'all open to moving to a new auth library? If so, can you let me know if google-auth is missing any specific features you need?

@tamakisquare
Copy link
Author

@jonparrott, the link to google-auth in your message is not accessible. I tried to search for it on Github but couldn't find it. Is google-auth the name of the repo?

I have not been involved in the development of Pyrebase, so @thisbejim would be the one to answer your questions.

@theacodes
Copy link

@tamakisquare my apologies, it's https://google-auth.readthedocs.io

@arpwal
Copy link

arpwal commented Jul 24, 2017

This is another reason why the path to oauth2client isn't working out for you @tamakisquare
https://google-auth.readthedocs.io/en/latest/oauth2client-deprecation.html

@arpwal
Copy link

arpwal commented Jul 26, 2017

@thisbejim any updates yet on making the transition to google-auth?

@heston
Copy link

heston commented Mar 29, 2018

I know this issue is a little old, but I was running into the same thing, and thought I would try upgrading the oauth2client dependency to google-auth.

Here's the PR: #249

As far as I can tell, everything works (unit tests, plus manual QA on other untested methods).

I'd appreciate a review from @thisbejim, or another maintainer. Thanks!

@theacodes
Copy link

I'm also happy to take a look (as the author of both of those auth libraries)

@heston
Copy link

heston commented Mar 29, 2018

Update on #249: I left a db stream running overnight, with the google-auth changes. I see that the stream successfully refreshed the oauth2 token several times without encountering a 401 response. Very encouraging!

@rawmean
Copy link

rawmean commented May 7, 2018

Please consider merging with master. This is a big problem and you seem to have the solution.

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

No branches or pull requests

6 participants