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

Backup never completes. #3

Closed
fmc000 opened this issue Oct 21, 2023 · 32 comments
Closed

Backup never completes. #3

fmc000 opened this issue Oct 21, 2023 · 32 comments
Labels
bug Something isn't working

Comments

@fmc000
Copy link

fmc000 commented Oct 21, 2023

I started using iBackep today -under Fedora 39 ( usbmuxd-1.1.1^20230720git61b99ab-1.fc39.x86_64 - libimobiledevice-1.3.0^20230705git6fc41f5-1.fc39.x86_64 - libimobiledevice-utils-1.3.0^20230705git6fc41f5-1.fc39.x86_64 ). My device is an iPhone SE 2020 running iOS 17.0.3 .

The device is recognized, the backup starts and runs for a while then stops with:

Exception in thread Thread-26 (do_backup):
Traceback (most recent call last):
File "threading.py", line 1016, in _bootstrap_inner
File "threading.py", line 953, in run
File "ui/app.py", line 130, in do_backup
File "ui/operations.py", line 51, in backup
File "flet/control.py", line 259, in update
File "flet/page.py", line 197, in update
File "flet/page.py", line 213, in __update
File "flet/connection.py", line 104, in send_commands
File "flet/connection.py", line 119, in _send_message_with_result
File "flet/reconnecting_websocket.py", line 73, in send
File "websocket/_app.py", line 234, in send
File "websocket/_core.py", line 283, in send
File "websocket/_core.py", line 311, in send_frame
File "websocket/_core.py", line 525, in _send
File "websocket/_socket.py", line 170, in send
File "websocket/_socket.py", line 147, in _send
ConnectionResetError: [Errno 104] Connection reset by peer

After the crash the spinning icon on the iPhone is still there and disappears only when I disconnect the cable.

Relevant dmesg entries:

[20800.694028] usb 3-1: new high-speed USB device number 10 using xhci_hcd
[20800.823710] usb 3-1: New USB device found, idVendor=05ac, idProduct=12a8, bcdDevice=12.08
[20800.823720] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[20800.823723] usb 3-1: Product: iPhone
[20800.823725] usb 3-1: Manufacturer: Apple Inc.
[20800.823728] usb 3-1: SerialNumber:
[20800.907026] ipheth 3-1:4.2: ipheth_enable_ncm: usb_control_msg: 0
[20800.907473] ipheth 3-1:4.2: Apple iPhone USB Ethernet device attached
[20800.909977] ipheth 3-1:4.2 enp0s20f0u1c4i2: renamed from eth0
[21268.793928] apple-mfi-fastcharge 3-1: USB disconnect, device number 10
[21268.804899] ipheth 3-1:4.2: Apple iPhone USB Ethernet now disconnected

Please let me know how to help debug this issue, thank you.

@redromnon
Copy link
Owner

Although I cannot replicate the exact same error, I am experiencing a similar issue myself. I too own an iPhone SE 2020 running on iOS 17.0.3.

The progress bar keeps getting stuck at 97% after which my iPhone doesn't show the spinning icon anymore. Maybe it was successfully completed? If I use idevicebackup2 via the command-line, it works just fine.

I will need to look into this.

@redromnon redromnon added the bug Something isn't working label Oct 22, 2023
@redromnon
Copy link
Owner

Moreover, the log that you've pasted tells me that there is an issue with how Flet is handling the backup process. Nothing wrong with libimobiledevice

@fmc000
Copy link
Author

fmc000 commented Oct 22, 2023

Indeed the backup works fine with the command line utilities, that's what I normally use. I was just trying this GUI but it looks like I'm not the only one with this problem.

@redromnon
Copy link
Owner

The new release should solve this issue.

@fmc000
Copy link
Author

fmc000 commented May 12, 2024

Unfortunately the new release doesn't even start as it needs libmpv.so.1 which is obsolete as now mpv provides libmpv.so.2 .

 ⤷ $ ./ibackep 
[obscured $HOME]/.flet/bin/flet-0.21.2/flet/flet: error while loading shared libraries: libmpv.so.1: cannot open shared object file: No such file or directory

@redromnon
Copy link
Owner

Hmmm, looks like that's a dependency required by Flet. I've got to downgrade the Flet version.

@fmc000
Copy link
Author

fmc000 commented May 12, 2024

Yes, it's strange that it depends on an obsolete version of mpv.

@redromnon
Copy link
Owner

I'm use Pop OS 22.04 so I don't encounter this error. Maybe newer releases don't use mpv 1

@redromnon
Copy link
Owner

Hopefully, the new fix I've released should work on all distros. Downgraded Flet to 0.0.19, because the newer ones have a Video controller that needs libmpv.

@fmc000
Copy link
Author

fmc000 commented May 13, 2024

Now the app starts but it's still not working. Pressing the folder icon does nothing here.

On the terminal there are a few error messages:

 ⤷ $ ./ibackep 

(flet:2672): Gdk-CRITICAL **: 08:03:49.223: gdk_window_get_state: assertion 'GDK_IS_WINDOW (window)' failed

** (flet:2672): CRITICAL **: 08:03:49.278: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

** (flet:2672): CRITICAL **: 08:03:49.278: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

** (flet:2672): CRITICAL **: 08:03:49.279: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

** (flet:2672): CRITICAL **: 08:03:49.279: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

** (flet:2672): CRITICAL **: 08:03:49.279: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

I use KDE Plasma 6.0.4 on Archlinux. I also found these errors in the journal:

mag 13 08:10:19 tu45b-arch xdg-desktop-portal-kde[1696]: xdp-kde-settings: Namespace  "org.gnome.desktop.interface"  is not supported
mag 13 08:10:19 tu45b-arch xdg-desktop-portal-kde[1696]: xdp-kde-settings: Namespace  "org.gnome.desktop.interface"  is not supported
mag 13 08:10:19 tu45b-arch xdg-desktop-portal-kde[1696]: xdp-kde-settings: Namespace  "org.gnome.desktop.interface"  is not supported
mag 13 08:10:19 tu45b-arch xdg-desktop-portal-kde[1696]: xdp-kde-settings: Namespace  "org.gnome.desktop.a11y.interface"  is not supported
mag 13 08:10:19 tu45b-arch xdg-desktop-portal-kde[1696]: xdp-kde-settings: Namespace  "org.gnome.desktop.interface"  is not supported
mag 13 08:10:19 tu45b-arch kwin_wayland[1462]: kwin_core: Cannot grant a token to KWin::ClientConnection(0x63127f429d50)

@redromnon
Copy link
Owner

redromnon commented May 13, 2024

It works fine on Ubuntu 24 and Pop OS 22 GNOME. Is it a desktop environment specific-issue? You're not alone, as indicated in this issue: flet-dev/flet#1134

@fmc000
Copy link
Author

fmc000 commented May 13, 2024

Maybe something like this?

synfig/synfig@8415dcc

My system has 3.24 so maybe it is something that started with 3.22 .

@redromnon
Copy link
Owner

Didn't you try this program on Fedora? Do you still have access to it to check if this issue occurs there too?

@fmc000
Copy link
Author

fmc000 commented May 13, 2024 via email

@redromnon
Copy link
Owner

So, I don't know if the newer version of Flet (GUI framework used) solves this issue. What's more surprising is that it's using flet-0.21.2 instead of flet-0.19.0 which I downgraded it to.

@fmc000
Copy link
Author

fmc000 commented May 13, 2024

Sorry, I had to be more clear. I'm trying both releases and I found that the 0.19 is not running with the current GTK3 release and 0.21 is not running with the current mpv release.

@redromnon
Copy link
Owner

At this point, I'm unsure what to do.

@fmc000
Copy link
Author

fmc000 commented May 13, 2024

I'd just close this issue as in your case the backup ends correctly. As for me I'm trying pymobiledevice3 directly. Thanks for your help anyways.

@redromnon
Copy link
Owner

Much appreciated.

@redromnon
Copy link
Owner

So I tried replicating this issue on my Kubuntu VM and yeah, I get the same issue and error: xdp-kde-settings: Namespace "org.gnome.desktop.interface" is not supported.
I also installed zenity since it is pre-requisite for Flet on Linux.

Is Flet trying to open GNOME's file picker?

@fmc000
Copy link
Author

fmc000 commented May 14, 2024

I simply don't know. I tried stracing the process but I got an 11MB file just to press the button and flet forks 54 processes just to start your app so I really don't know what to do.

The only thing I can say for sure is that this "flet" thing is not really designed to be DE-agnostic as your test proved that this is not a KDE failure (Kubuntu ships with Plasma 5 and Arch rolls Plasma 6 - flet does not work with any of them).

@redromnon
Copy link
Owner

I'll try to create an issue on the Flet repo. Let's wait and see.

redromnon added a commit that referenced this issue May 19, 2024
Should solve #3 provided that zenity is installed
@redromnon
Copy link
Owner

I'm now using zenity to handle the backup folder selection. Tested it on both Kubuntu and PopOS.
Hopefully this irritating issue gets resolved for all users.

@fmc000
Copy link
Author

fmc000 commented May 19, 2024

I'm sorry to report that it still doesn't work on Arch. I get the message:

Looks like Zenity is not installed

even if it actually is:

 ⤷ $ pacman -Q zenity
zenity 4.0.1-1

@redromnon
Copy link
Owner

Can you run zenity --version and check?

@fmc000
Copy link
Author

fmc000 commented May 19, 2024

It should have been clear from my previous message:

 ⤷ $ zenity --version
4.0.1

@redromnon
Copy link
Owner

I just wanted to double-check by running zenity --version directly rather than pacman -Q zenity
Because ibackep runs the above command to verify if zenity is installed.

@redromnon
Copy link
Owner

Ugh, I really need to set up GitHub actions now to automate builds for changes.
Anyway, I've replaced the v2.0.2's executable with a new one. I've now used is returncode = 0 as a more robust checking method. Has to work now.

@fmc000
Copy link
Author

fmc000 commented May 19, 2024

Sorry, no changes.

@redromnon
Copy link
Owner

I need to dig deeper. Need to test it on an Arch VM.

@fmc000
Copy link
Author

fmc000 commented May 19, 2024

If you need a tester, I'm here. Anyways, this strace output may help:

[pid 5767] writev(2, [{iov_base="/bin/sh", iov_len=7}, {iov_base=": ", iov_len=2}, {iov_base="symbol lookup error", iov_len=19}, {iov_base=": ", iov_len=2}, {iov_base="/bin/sh", iov_len=7}, {iov_base=": ", iov_len=2}, {iov_base="undefined symbol: rl_trim_arg_fr"..., iov_len=41}, {iov_base="", iov_len=0}, {iov_base="", iov_len=0}, {iov_base="\n", iov_len=1}], 10) = 81

PID 5767 is forked by ibackup when running

/bin/sh -c "zenity --version"

relevant bugs on github:

https://github.com/conda-forge/readline-feedstock/issues/28
https://github.com/badabing2005/PixelFlasher/issues/130

 ⤷ $ bash --version|head -1
GNU bash, version 5.2.26(1)-release (x86_64-pc-linux-gnu)

I can confirm that the readline library included in ibackep does not contain that symbol:

 ⤷ $ strings /tmp/_MEITpHJIQ/libreadline.so.8 |grep rl-trim_arg
 ⤷ $ 

whilst the Arch-provided does:

 ⤷ $ strings /usr/lib/libreadline.so|grep rl_trim_arg
rl_trim_arg_from_keyseq
 ⤷ $ 

@redromnon
Copy link
Owner

I'm closing this issue in favour of #6
Let's continue this discussion there.

@redromnon redromnon closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 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

2 participants