RedReader icon indicating copy to clipboard operation
RedReader copied to clipboard

Unable to login due to not redirecting from browser

Open ynakao opened this issue 2 years ago • 11 comments

I upgraded RedReader v1.21.1 on f-droid yesterday and the app prompted re-authentication, so I tried re-login but re-auth process stalled without redirecting to the app after login from the internal web browser.

I found related discussions on /r/redreader subreddit [1], [2] and the issue tracker. @QuantumBadger said the issue was fixed in those threads, but it still affects me.

Deleting cache and reinstalling RedReader and revoking the app permission on my reddit preference don't work. Any suggestions? I'm using Android 7.1.2.

ynakao avatar Jul 09 '23 04:07 ynakao

Having the same issue (or at least I think so). I log in on using the app's internal browser, it logs in, then says "Error fetching oauth client" when redirecting. I'm on the most recent android version for my device (much higher than 4.x) and tried the workaround from the closed issue, so none of the links in the OP apply to my situation. That being said, I did build the app from source, so it's possible that I did something wrong. (I did set my API key at build time!)

Blizihguh avatar Jul 09 '23 11:07 Blizihguh

@ynakao Thanks for the report. There's a limited amount I can do because Reddit handles the login flow on their site, however I can report to Reddit that the issue is still occurring. Would it be possible to send a video of the issue please, starting at the point after you've typed in your password?

@Blizihguh That sounds like a different issue -- you may be using an invalid API key, or it might be in the wrong place. You could try setting it in Settings > Network > Reddit client ID override instead.

QuantumBadger avatar Jul 09 '23 19:07 QuantumBadger

Yep, can confirm it was an issue on my end. Specifically, I was able to fix it by setting the correct redirect URI for my token ("redreader://rr_oauth_redir"). Thanks for pointing me in the right direction! I think that info should probably be added to CONTRIBUTING.md, since it took some digging to find the root cause and the correct URI to supply.

Blizihguh avatar Jul 10 '23 05:07 Blizihguh

@QuantumBadger Here you are. About 1min 2MB clip.

I expected redirection occurred after I accepted the app permission, but nothing happened. Instead, Sign Up or Log In message in a blue banner appeared at around 15s in video. Tapped the button to continue, but it only led to the Reddit web view in the internal browser, and my account was not listed on the RedReader accounts list.

https://github.com/QuantumBadger/RedReader/assets/6405335/3078d64d-1d28-4238-a402-2f3806c90e1f

ynakao avatar Jul 10 '23 05:07 ynakao

Thanks both!

@ynakao I've passed this video on to Reddit, they've been looking into it for a while but no results yet.

In the meantime, @nascentt suggested trying to upgrade your system WebView:

https://old.reddit.com/r/RedReader/comments/14z8ear/unable_to_connect_account/

QuantumBadger avatar Jul 14 '23 17:07 QuantumBadger

As a workaround, I downgraded RedReader to v1.20 and re-authenticated successfully in the external browser(fennec) following the reddit comment.

ynakao avatar Jul 31 '23 00:07 ynakao

Installing a recent android system webview did the trick for me. However I had to go to developer options to switch to it, otherwise it was stuck to the one that shipped with the ROM.

Helyos96 avatar Jul 31 '23 06:07 Helyos96

Oh, nice catch! I had installed Chrome from Aurora Store, so switched WebView implementation value from AOSP WebView to Chrome Stable in Developer options. Then I upgraded RedReader v1.22 and tried to re-auth by internal browser, and login was successful!

So, does this issue stem from the old WebView implementation? Can this be resolved by either RedReader side or Reddit?

ynakao avatar Jul 31 '23 12:07 ynakao

Likewise, updating Android Webview fixed it for me. Perhaps RedReader could allow users to choose their own browser in future for the authing? I think Firefox offers a webview alternative.

SpitFire-666 avatar Aug 01 '23 10:08 SpitFire-666

So, does this issue stem from the old WebView implementation? Can this be resolved by either RedReader side or Reddit?

I think this is reddit's login site which is no longer compatible with older browsers. Not much RR can do imho.

Helyos96 avatar Aug 15 '23 11:08 Helyos96