Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"I already have a profile" > "Paste from Clipboard" hangs at "Add as Second Device" popup #4171

Open
ell1e opened this issue Oct 3, 2024 · 14 comments
Labels
bug Something isn't working

Comments

@ell1e
Copy link

ell1e commented Oct 3, 2024

When I choose "I already have a profile" > "Paste from Clipboard", then I get an "Add as Second Device" popup with an empty progress bar and nothing happens even after hours of waiting.

  • Operating System (Linux/Mac/Windows/iOS/Android):
  • Delta Chat Version: Desktop 1.46.8 Core v1.142.12 SQLite 3.45.3 electron 30.3.1 node 20.15.1
  • Expected behavior: it works
  • Actual behavior: it seems to get stuck
  • Steps to reproduce the problem: "Paste from Clipboard" on the 2nd device will show some "Scanned QR Code text: ..." popup and then press "OK"
  • Screenshots:
  • Logs:
    2024-10-03-05-14-30.log
@WofWca
Copy link
Collaborator

WofWca commented Oct 3, 2024

The fact that you get the "Scanned QR Code text: ..." indicates that whatever is in the clipboard is not a good QR code for transferring an account. But I am not sure why you still get a popup with a progress bar.

valid.QR.mp4
invalid.QR.mp4

@WofWca
Copy link
Collaborator

WofWca commented Oct 3, 2024

BTW thanks for reporting all the issues!

@ell1e
Copy link
Author

ell1e commented Oct 3, 2024

The fact that you get the "Scanned QR Code text: ..." indicates

I copied it without whitespace now, so that popup is no longer showing! So the code might be correct at this point. Sadly, I'm pretty good at accidentally triggering corner cases that weren't tested before 😂

(About the issues: Delta Chat looks really promising, so I'm giving whatever feedback I can that might be useful)

@ell1e
Copy link
Author

ell1e commented Oct 4, 2024

Is there more log detail that I could possibly enable? It seems like the default log is somewhat bare, so if there's an option to add details so you can figure out the problem, maybe I should give that a try.

@Simon-Laux
Copy link
Member

Simon-Laux commented Oct 4, 2024

You may start deltachat with --devmode (see docs/CLI_FLAGS.md) to get also debug log messages in the log.

Also if you want you can also try to build from source, that way you could test if the current version on the main branch has already solved the issues.
The next version will still take a while because we did recently some big changes like switching to pnpm and it is quite a challenge to get the flathub release process working again, among other things. So I estimate it will still take 1-2 months until the next release. Hopefully the next test release will be done sooner though, let's see.

@ell1e
Copy link
Author

ell1e commented Oct 4, 2024

I tried flatpak run chat.delta.desktop --devmode but no dev tools window opened, and the log looks about the same:
2024-10-05-00-21-09.log So I feel like it probably didn't work...

Is there some potential workaround to device linking getting stuck like this? I would like to use Delta Chat more during the day since it seems promising, but since I can't currently access it on my portable devices I'm held back for now.

@link2xt
Copy link
Collaborator

link2xt commented Oct 4, 2024

Is there some potential workaround to device linking getting stuck like this? I would like to use Delta Chat more during the day since it seems promising, but since I can't currently access it on my portable devices I'm held back for now.

Workaround is to get to "Chats and Media", then "Export Backup". Then transfer backup over USB to the phone and import it. Make sure to delete the backup file as it contains the key and login and password.

@Simon-Laux
Copy link
Member

flatpak run chat.delta.desktop -- --devmode (note the added --)

@link2xt
Copy link
Collaborator

link2xt commented Oct 5, 2024

I just tested v1.46.8 installed from flathub. Started flatpak run chat.delta.desktop and transferred a new backup into it from my development version of Delta Chat Android (core 1.147.0) by showing a QR code. Backup transferred successfully, the only problem is that flatpak version is old so I had to rerun configuration by going into Advanced -> Password and Account and clicking OK.

@link2xt
Copy link
Collaborator

link2xt commented Oct 5, 2024

We just merged fixes that make backup transfer progress bar more smooth (not jumping every time database or a blob is transferred, but continuously updating it every time there is a read/write call): deltachat/deltachat-core-rust#6027
This will go into core 1.147.0 and the next release.

Could be just waiting a bit more is sufficient. On my current account it took around 2 minutes until progress bar starts moving, but that is an old and large account with 600 M database.

@ell1e
Copy link
Author

ell1e commented Oct 5, 2024

I let it sit for hours, so I don't think efficiency is the fundamental problem.

@link2xt
Copy link
Collaborator

link2xt commented Oct 6, 2024

@ell1e Do you by chance have some VPN or firewall enabled on mobile and/or phone? See similar #4179 issue.

I think we need to improve the text "Make sure both devices are on the same Wi-Fi or network" to say that you also need to disable VPN and firewall. Users who have a VPN not necessarily know it prevents local connections in a LAN.

Another related usability problem is that users expect to "log in" (like e.g. in a website or typical "cloud" messenger such as discord, slack or telegram) on a new device without even having the old device around, but when they click "I already have a profile" -> "Add as second device", they only get a QR code scanner and a very brief instruction.

@link2xt
Copy link
Collaborator

link2xt commented Oct 6, 2024

flatpak run chat.delta.desktop -- --devmode (note the added --)

The logs, at least on the 1.46.8 version currently in flatpak, are not very useful. Normally log looks like this:

121.4s [i]core/event: 4 src/imex/transfer.rs:320: Sending backup authentication token.
121.4s [i]core/event: 4 src/imex/transfer.rs:324: Starting to read backup from the stream.
121.4s [D]core/event: ImexProgress 4 { kind: 'ImexProgress', progress: 720 }
121.5s [D]core/event: ImexProgress 4 { kind: 'ImexProgress', progress: 726 }
121.5s [D]core/event: ImexProgress 4 { kind: 'ImexProgress', progress: 989 }
121.5s [D]core/event: ImexProgress 4 { kind: 'ImexProgress', progress: 998 }
121.5s [D]core/event: ImexProgress 4 { kind: 'ImexProgress', progress: 999 }
121.5s [i]core/event: 4 src/sql/migrations.rs:986: Database version: v121.
121.5s [i]core/event: 4 src/imex/transfer.rs:332: Finished importing backup from the stream.
121.5s [D]core/event: ImexProgress 4 { kind: 'ImexProgress', progress: 1000 }
121.5s [i]core/event: 4 src/imex/transfer.rs:339: Sent backup reception acknowledgment.
121.6s [i]core/event: 4 src/scheduler.rs:66: starting IO

But if connection is not established, then even "Sending backup authentication token." is not there.

@ell1e
Copy link
Author

ell1e commented Oct 11, 2024

Update: thi time it's actually a different problem and the backup restore always worked, I just didn't see: #4214

I tried restore from backup on a 3rd device yesterday and the UI just froze, very apparent when resizing the window:

20241010_23h37m09s_grim

20241010_23h37m30s_grim

@WofWca WofWca added the bug Something isn't working label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants