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

Photos: Desktop client can't complete machine learning, but Android client can #4087

Open
taivlam opened this issue Nov 18, 2024 · 5 comments
Labels
- photos Relates to the Ente Photos

Comments

@taivlam
Copy link

taivlam commented Nov 18, 2024

Description

  1. Attempt to turn on machine learning on Ente Photos Desktop.
    • UX path: Open Ente Photos Desktop > Click on hamburger menu > Click on "Machine learning", under "Labs" > Toggle switch to "Enabled" for machine learning
  2. Try to leave the desktop client open, only for it to stay on 0 out of total number of items.
  3. Open Ente Photos on Android and navigate to the machine learning settings to turn machine learning on.
    • UX path: Open Ente Photos Android > Tap on hamburger menu > Tap on "General" > Tap on "Advanced" > Tap on "Machine learning" > Find both the "Enabled" and "Local indexing" switches toggled on already.
  4. Observe Ente Photos Android get past 0 items completed and the whole initialization of machine learning come to an end.

This is despite the warning in the Ente Photos mobile apps that it's better to use desktop to initialize machine learning, instead of the mobile app. (For this, I plugged in my Android device and used Wi-Fi during this process.)

I'm not sure why the desktop client got hung up when initializing machine learning, while the Android client was fine.

System info

Both clients were on Mullvad VPN and for some reason (not sure if this is related, but) the DAITA only servers are very much more likely to cause webpages to receive Cloudflare ray captchas than running Mullvad using default settings.

  • Ente Photos on Android
    • GrapheneOS release 2024101200
    • Pixel 5a (barbet)
    • Ente Photos 0.9.58 from F-Droid
    • Logs: 2024-11-18.log
  • Ente Photos on Linux

Other details

On desktop, the settings are rather sparse:
screenshot1

while the settings on Android are more detailed (once the local models have been downloaded):
screenshot2

Version

1.7.6-1

What product are you using?

Ente Photos

What platform are you using?

Desktop - Linux

@taivlam taivlam added the triage label Nov 18, 2024
@taivlam taivlam changed the title Photos: Desktop client Photos: Desktop client can't complete machine learning, but Android client can Nov 18, 2024
@mnvr
Copy link
Member

mnvr commented Nov 19, 2024

This seems like a network issue in the routing between the ISP and Cloudflare (we use Cloudflare for proxying downloads), because the logs show that the desktop client is not able to download the images for indexing (no errors, the download just stalls until the app got restarted). The mobile client likely used a different (e.g. 5G) connection, so the download happened via a different network route.

Meanwhile, a workaround if you hit this issue again is to temporarily switch to a VPN or a different network where the desktop app is running.

@mnvr mnvr added - photos Relates to the Ente Photos and removed triage labels Nov 19, 2024
@mnvr
Copy link
Member

mnvr commented Nov 19, 2024

Also, if it happens again, it would be helpful to have a traceroute to see if there is some issue that can be spotted there

traceroute files.ente.io

@stevs84
Copy link

stevs84 commented Nov 25, 2024

I have the same issue, but the Indexing / Machine Learning is successful on the Desktop App (Mac).
On my Mobile Phone (Android App) and Tablet (Android App) the process is not starting and all my elements have the status "pending".

I get also some strange error in my log:
WARN[20109]main.go:984 urlSanitizer Unknown API: /files/data/status-diff INFO[20109]request_logger.go:116 func5 outgoing client_ip=xxx.xxx.xxx.xxx client_pkg=io.ente.photos client_version=0.9.58 h_latency=218.317µs latency_time=218.317µs query= req_body= req_id=b6eb4ed5-ae9a-4775-9b79-4e8c4d0b5ae1 req_method=POST req_uri=/files/data/status-diff status_code=404 ua=Ente Photos/0.9.58 (Android 15; Pixel 9 Pro XL; komodo; arm64-v8a) user_id=0

@taivlam
Copy link
Author

taivlam commented Nov 25, 2024

@mnvr I forgot to mention, but I forgot to state originally that both clients were connected to Mullvad VPN. For some reason (not sure if this is related, but), the DAITA-only servers are very much more likely to cause webpages to receive Cloudflare ray captchas than running Mullvad using default settings.

Also, I'll try using traceroute the next time this happens.

@iadaz
Copy link

iadaz commented Dec 7, 2024

I am using the latest Windows desktop. I left it running overnight to perform the machine learning. Looks like it stopped at about 30%. Last thing in log:

[2024-12-07T03:59:46+00:00] [rndr] [info] download attempted for file id 75803122
[2024-12-07T03:59:58+00:00] [rndr] [info] download attempted for file id 75803069
[2024-12-07T04:00:17+00:00] [rndr] [info] download attempted for file id 75803058
[2024-12-07T04:00:17+00:00] [rndr] [info] download attempted for file id 75803046
[2024-12-07T04:00:46+00:00] [rndr] [error] Unhandled promise rejection: TypeError: Failed to fetch
    at w (ente://app/_next/static/chunks/pages/_app-bef3745976cbf66f.js:2:341836)
    at async j (ente://app/_next/static/chunks/pages/_app-bef3745976cbf66f.js:2:344209)
    at async eW (ente://app/_next/static/chunks/pages/_app-bef3745976cbf66f.js:2:352514)
    at async eZ (ente://app/_next/static/chunks/pages/_app-bef3745976cbf66f.js:2:352431)

My router reboots at 04:00 daily so it looks like the process has no retry mechanism for a network interruption. Closing the app completely and starting again allowed it to carry on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- photos Relates to the Ente Photos
Projects
None yet
Development

No branches or pull requests

4 participants