uber / uber-ios-sdk

Uber iOS SDK (beta)
https://developer.uber.com/docs
MIT License
375 stars 125 forks source link

"too many http redirects " #169

Closed vriznychok closed 7 years ago

vriznychok commented 7 years ago

I use latest version of rides sdk in my iOS app. When I try to Authorize customer using Uber Rides SDK and Login Manager type == .authorizationCode I receive an error in process of redirecting. Error occurred in WebView, opened by rides sdk. It doesn't appear always, it depends on internet connection I guess. This issue doesn't allow customer to finish authorization process. Is there something I can do to fix this?

Logs: NSErrorFailingURLKey = "https://login.uber.com/oauth/v2/authorize?scope=request%20profile%20request_receipt&client_id=kr_FY1h1pQEzg1srUxSfjqDY_fRPtvgh&redirect_uri=qorum%3A%2F%2Fuber_redirect&signup_params=eyJyZWRpcmVjdF90b19sb2dpbiI6dHJ1ZX0%3D&response_type=code&state=XeK12SwO3kbPw41uLEY6FF7h5tGMaQbJnktMpxpSUUY%3D&wstate=1HwGHM9moBHa0AXnVDWQuxImvqxLC__nB3lTrbrog1g%3D#_"; NSErrorFailingURLStringKey = "https://login.uber.com/oauth/v2/authorize?scope=request%20profile%20request_receipt&client_id=kr_FY1h1pQEzg1srUxSfjqDY_fRPtvgh&redirect_uri=qorum%3A%2F%2Fuber_redirect&signup_params=eyJyZWRpcmVjdF90b19sb2dpbiI6dHJ1ZX0%3D&response_type=code&state=XeK12SwO3kbPw41uLEY6FF7h5tGMaQbJnktMpxpSUUY%3D&wstate=1HwGHM9moBHa0AXnVDWQuxImvqxLC__nB3lTrbrog1g%3D#_"; NSLocalizedDescription = "too many HTTP redirects"; NSUnderlyingError = "Error Domain=kCFErrorDomainCFNetwork Code=-1007 \"(null)\""; "_WKRecoveryAttempterErrorKey" = "<WKReloadFrameErrorRecoveryAttempter: 0x170a20760>";

edjiang commented 7 years ago

Thanks for reporting this. I'm not able to directly reproduce this, but there are some leads that we can pursue. Does this happen more often on a specific network or device? If it's a specific network, can you tell me more about how the network is configured?

vriznychok commented 7 years ago

What info about network do you need? This issue appears while using different Wi-Fi connections, even in different countries. I tried on different devices and it appears on iPhone 5, 6 and doesn't appear on iPhone 7, but it could be one time case. All devices are running on iOS 10.3

edjiang commented 7 years ago

OK thanks, I will take a further look into this!

edjiang commented 7 years ago

Hey @vriznychok, I'm still unable to reproduce this error. Have you tried using the implicit flow instead; does that work?

If you're able to upload something that reproduces the problem, let me know and I'd be happy to take a look!