elk-zone / elk

A nimble Mastodon web client
https://elk.zone
MIT License
5.34k stars 553 forks source link

Login doesn't work with Pleroma #934

Open vibragiel opened 1 year ago

vibragiel commented 1 year ago

I can't login into my Pleroma instance just after Elk was updated to v0.3.0. It was working fine in earlier versions. The backend is Pleroma version 2.4.55-921-g20790c1d-develop.

While being redirected back to elk.zone for the OAuth callback (URL https://elk.zone/signin/callback?server=gabi.is&token=...&vapid_key=...), this is what the Console is showing:

image

mkhl commented 1 year ago

@vibragiel if #1021 is a duplicate then this is unrelated to pleroma you may also want to include the error message as text here so other people can find it

sxzz commented 1 year ago

Could you please provide a public server where I register an account and test it?

vibragiel commented 1 year ago

Just an update, with elk v0.5.0 this is what I now get: image

vibragiel commented 1 year ago

Funnily enough, it works with Firefox in Android, but not in the desktop (tried with v0.6.0).

sxzz commented 1 year ago

@vibragiel It works on my side. Could you please provide more information about the issue?

nemesio65 commented 1 year ago

To add to the discussion, it works on Chrome in Windows, but doesn't work on Firefox in Windows I receive the same statusCode:422 in the screenshot posted by vibragiel.

sxzz commented 1 year ago

Still cannot reproduce it

Firefox: 109.0 (64-bit) Elk: 0.6.1

vibragiel commented 1 year ago

Ok I was able to log in successfully by putting Firefox in Safe Mode, so it must be some extension or configuration that's causing trouble. I'll try to pinpoint exactly what.

Sevichecc commented 1 year ago

I get this problem when I am already logged in to the Pleroma instance in the same browser, but when I am logged out everything is fine.

edimitchel commented 1 year ago

I got the same issue by trying to login on an non-mastodon instance (Akkoma) https://github.com/BDX-town/Akkoma/issues/33

wakest commented 1 year ago

@sxzz do you want the login to my test account https://fe.disroot.org/@wakest (its running Akkoma, the fork of Pleroma that is petty popular lately) happy to let you use the account if you need one for testing with...

Fell commented 1 year ago

Looks like this issue has been fixed in canary? I was just able to log in successfully using https://main.elk.zone/ @ bc78b50

My instance is Akkoma 3.5.0-0-gd9508474b. I could log in using Firefox 109 on Windows 10 x64 as well as Iceraven (forked Firefox 108) on Android 13. In both cases, I was still logged into the Akkoma instance.

Sevichecc commented 1 year ago

Looks like this issue has been fixed in canary? I was just able to log in successfully using https://main.elk.zone/ @ bc78b50

My instance is Akkoma 3.5.0-0-gd9508474b. I could log in using Firefox 109 on Windows 10 x64 as well as Iceraven (forked Firefox 108) on Android 13. In both cases, I was still logged into the Akkoma instance.

Still don't work for me, my instance is Pleroma (2.5.0)

I'am using Brave(v1.47.171) & FireFox Developer Edition (v110.0b5 64-bit)

image image
wakest commented 1 year ago

still broken on newest canary build for me image

running Pleroma fork (Akkoma and Mangane) BDX-town/Mangane (vnomadic-hermit-crab-f7f5408).

UPDATE:

I just tried in Chrome and the whole login flow works fine! so its a Firefox specific bug!

vibragiel commented 1 year ago

Ok I was able to log in successfully by putting Firefox in Safe Mode, so it must be some extension or configuration that's causing trouble. I'll try to pinpoint exactly what.

I has nothing to do with the extensions. But when I tried deleting all the elk related storage from my Firefox (not just cookies but also Indexed DB and Local Storage entries), then it started working. And it works too with a fresh Firefox install, so from my side this issue could be closed.

Can everyone else having issues try to remove cookies, Indexed DB and Local Storage for the elk domain?

image

wakest commented 1 year ago

@vibragiel wonderful! I just deleted cookies only and that did it!

boehs commented 1 year ago

Closing because it seems this was resolved?

floogulinc commented 1 year ago

It still doesn't work for me. Still get

{"url":"/api/DOMAIN/oauth/https%3A%2F%2Fmain.elk.zone","statusCode":422,"statusMessage":"Missing authentication code.","message":"Missing authentication code.","stack":""}
Bunny-Head commented 1 year ago

Same error here using Phoronix (Firefox) and even after deleting everything elk related from all the possible cache:

image

Retidurc commented 1 year ago

What an infuriating Heisenbug this is..

Using the exact same version of Akkoma and Elk as my prod configuration, everything works on the test instances. But as soon as I try to use Elk on my main instance, it doesn't. I'll try to increase the log levels on the prod akkoma instance to see what the heck is going on.

I

roseyhead commented 1 year ago

Just chipping in here in case this helps anyone. Note that i'd previously tested Elk on a Mastodon server, now running my own Akkoma instance. Tried to log into Elk a couple of times over the past few weeks, always got that "missing authentication code" message. Tried to log in just now, same error. Cleared Elk-related files in my cache and tried again, same message. Logged out of Akkoma, tried logging into Elk, success! Firefox 110.0.1 on Windows 11.

Same situation with Firefox on Android, I received errors logging in while I was logged into Akkoma (haven't recorded them sorry). Went to my home domain, logged out, went to elk.zone, logged in and it just worked.

gBasil commented 1 year ago

Can confirm, logging out of the Akkoma/Pleroma instance and then trying to log in with Elk is the only way I could find to log in.

edimitchel commented 1 year ago

I can confirm it works fine now! @vibragiel you can close if you confirm?

vibragiel commented 1 year ago

Thanks!

If anyone encounters this even after removing cookies and all associated local storage and Indexed DB data, please reopen or create a new issue.

floogulinc commented 1 year ago

I don't think this should be closed as it not working while signed in is still an issue.

ymollard commented 1 year ago

I met that issue until February 2023 approximately, then it fixed it by itself and worked so far until yesterday night. I am now getting the HTTP 422 shown by @wakest above.

I tested on 2 web browsers (Firefox and Chromium), and both in normal and private navigation too, with the same result every time.

The admin of the Akkoma instance (bdx.town) reports that no update on the server has been made the last days, and Elk does not seem to have been updated either because the front says "last compiled the last month v0.9.7".

If you want to reproduce @sxzz @vibragiel try creating an account on https://bdx.town and login with Elk, I expect the issue to appear.

paulo-roger commented 3 weeks ago

I don't think this should be closed as it not working while signed in is still an issue.

Exactly, the issue still persists, there is workaround, but still annoying.