Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

TooManyRedirects on login #217

Closed
simon-weber opened this issue Feb 24, 2014 · 13 comments
Closed

TooManyRedirects on login #217

simon-weber opened this issue Feb 24, 2014 · 13 comments

Comments

@simon-weber
Copy link
Owner

I got a report through email that running login on Google App Engine results in a redirect loop:

    res = ClientLogin.perform(self, True, email, password)
  File "gmusicapi/protocol/shared.py", line 208, in perform
    response = session.send(req_kwargs, cls.required_auth)
  File "gmusicapi/session.py", line 74, in send
    res = self._send_without_auth(req_kwargs, new_session)
  File "gmusicapi/session.py", line 41, in _send_without_auth
    return rsession.request(**req_kwargs)
  File "requests/sessions.py", line 383, in request
    resp = self.send(prep, **send_kwargs)
  File "requests/sessions.py", line 506, in send
    history = [resp for resp in gen] if allow_redirects else []
  File "requests/sessions.py", line 99, in resolve_redirects
    raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects)
TooManyRedirects: Exceeded 30 redirects.
@simon-weber
Copy link
Owner Author

Everything works fine locally. Perhaps this is https://github.com/kennethreitz/requests/issues/1805?

@simon-weber
Copy link
Owner Author

I wasn't able to recreate this with requests 2.1.0.

@manatlan
Copy link

I wasn't able to recreate this with requests 2.1.0.

damn, you're right ...
the error exists for requests 2.2.1 (latest stable) & 2.3.0

BTW : I'm really happy : it just works

Reply to this email directly or view it on GitHubhttps://github.com//issues/217#issuecomment-35975024
.

@simon-weber
Copy link
Owner Author

Oh, good to hear =)

I'll leave this open for now -- I should blacklist the bad versions in my setup.py.

@simon-weber
Copy link
Owner Author

I can't recreate this with 2.2.1 or 2.3.0, so I'm hesitant to blacklist them. @manatlan, can you double check this for me?

@manatlan
Copy link

Sorry for the late answer ...

I was "away from keyboard" ...
I tested with 3.1.1 dev (yesterday night), and it works like a charm now
....

Do you want i still double check the "requests bug" ?

I can't recreate this with 2.2.1 or 2.3.0, so I'm hesitant to blacklist

them. @manatlan https://github.com/manatlan, can you double check this
for me?

Reply to this email directly or view it on GitHubhttps://github.com//issues/217#issuecomment-36418023
.

@simon-weber
Copy link
Owner Author

No problem! And, yeah, it'd be great if you could try to recreate the requests bug.

@manatlan
Copy link

I can reconfirm ...

I've got this error:
File "vk/requests/sessions.py", line 99, in resolve_redirects
raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects)
TooManyRedirects: Exceeded 30 redirects.

with requests 2.2.1 and 2.3.0 (dev) ... and not with 2.1.0 !

"Oui, oui."
-- Shakespeare (Richard III, Acte I, Scène IV)

On Mon, Mar 10, 2014 at 3:20 PM, Simon Weber notifications@github.comwrote:

No problem! And, yeah, it'd be great if you could try to recreate the
requests bug.

Reply to this email directly or view it on GitHubhttps://github.com//issues/217#issuecomment-37186599
.

@simon-weber
Copy link
Owner Author

Fair enough, I'll blacklist those versions. Thanks for checking!

@simon-weber
Copy link
Owner Author

Also, check 1.2.0 for this issue: hechtus/squeezebox-googlemusic#34 (comment).

@simon-weber
Copy link
Owner Author

Yes, 1.2.0 will need to be blacklisted as well.

@jodal
Copy link
Contributor

jodal commented May 11, 2014

I see that kennethreitz/requests#1805 was fixed in 2.2.0, so that doesn't look like the culprit.

Was this bug reported upstream to requests, or does one have to assume that all future versions of requests is bust until someone else stumbles over the same bug and reports it?

@simon-weber
Copy link
Owner Author

@jodal good point. I haven't been able to reproduce, so I didn't think to open an issue. I believe @manatlan is the only one to see it so far?

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

No branches or pull requests

3 participants