AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[Bug] Log in with Firefox

Open annieappflowy opened this issue 1 year ago • 7 comments

Bug Description

Hello! Congratulations for the hard work! I am trying to login to my cloud account from the AppImage app on Ubuntu. When clicking the magic link, Firefox sends it to System Handler and then nothing happens (same behaviour if the AppImage is already open or not). Do you know a way to debug what's going on? Can I copy/paste the magic link somewhere if direct click does not work?

How to Reproduce

Known issue

Expected Behavior

Should be able to log in without isssues

Operating System

Linux

AppFlowy Version(s)

v0.6.1

Screenshots

No response

Additional Context

No response

annieappflowy avatar Jun 28 '24 02:06 annieappflowy

This is happening to me as well with AppImage AppFlowy-0.6.2-linux-x86_64.AppImage on Ubuntu 22.04 with Chrome. I click on the magic link, the tab closes but the app is stuck on loading.

gorghino avatar Jul 03 '24 07:07 gorghino

I'm also experiencing this with the appimage versions (versions 6.4 - 6.6) on fedora desktop (KDE plasma) while attempting to login via the magic link sent from my self hosted server. I do not have this problem when I use the flatpack versions of the AppFlowy desktop app (the magic links with flatpack work as expected and I am able to login).

While using the appimage, when I open the magic link with Firefox, Firefox gives me the following error: "The address wasn’t understood Firefox doesn’t know how to open this address, because one of the following protocols (http) isn’t associated with any program or is not allowed in this context. You might need to install other software to open this address."

While using the appimage when I open the magic link with Chrome, a dialogue box opens asking permission to open "xdg-open". I agree to open it but nothing happens.

In the short term, would love to know if there is a work-around to login with the appimage version of AppFlowy.

Thanks for any help you can provide, and thank you for your ongoing work on this amazing project!

MagicDM avatar Jul 31 '24 17:07 MagicDM

I'm still experiencing this with v0.6.9 (not sure if this ended up in the completed bug fixes for 0.6.7 - but wanted to mention it just in case). Thanks, again : )

MagicDM avatar Sep 21 '24 13:09 MagicDM

it would redirect to the app, yes, though it would stay there with the loading bar unless i had to wait more than 15 minutes them it didn't work https://discord.com/channels/903549834160635914/903553722804748309/1287794992424681542

annieappflowy avatar Sep 24 '24 05:09 annieappflowy

@gorghino @MagicDM

Here is a quick workaround that you could do while we are fixing the issue:

  • When you get the email link, copy the link (right click, copy link)
  • Open a new tab, right click, then click inspect, go to the network tab
  • Paste the link into the address bar and press enter
  • You should see a response in one of the item, right click -> copy value
  • Open AppFlowy
  • Open a terminal, find the path to AppFlowy binary, execute it with the value that you have copied
<path/to/appflowy> 'appflowy-flutter://#access_token=eyJh....'

image

speed2exe avatar Sep 24 '24 09:09 speed2exe

./AppFlowy-0.7.1-linux-x86_64.AppImage 'appflowy-flutter://#access_token=... type=magiclink'
*** buffer overflow detected ***: terminated
[1]    10073 IOT instruction (core dumped)  ./AppFlowy-0.7.1-linux-x86_64.AppImage 

That's my result.

ewrvp7lv7 avatar Oct 16 '24 10:10 ewrvp7lv7

./AppFlowy-0.7.1-linux-x86_64.AppImage 'appflowy-flutter://#access_token=... type=magiclink'
*** buffer overflow detected ***: terminated
[1]    10073 IOT instruction (core dumped)  ./AppFlowy-0.7.1-linux-x86_64.AppImage 

That's my result.

Delete &expires_at=XXXXXXXX&expires_in=XXXXXXXXXX . It should work.

Main issue might be related to my system or AppFlowy's AppImage. it seems that the access token is larger than what the memory buffer can handle. This might be related to either encoding where & and = are encoded or maybe the access tokens just got bigger.

Perhaps a wrapper with sed -E 's/&expires_at=[^&]*&expires_in=[^&]*//' might be useful as a hacky solution for magic links.

Logic-gate avatar Oct 19 '24 09:10 Logic-gate

We have supported two alternative ways to sign in:

  1. login with OTP
  2. paste the magic link into your browser to redirect

annieappflowy avatar Apr 18 '25 04:04 annieappflowy