Skip to content

Conversation

@shenlong-tanwen
Copy link
Member

@shenlong-tanwen shenlong-tanwen commented Sep 10, 2025

Fixes #21643

@shenlong-tanwen shenlong-tanwen marked this pull request as ready for review September 10, 2025 22:36
@jrasm91 jrasm91 removed this from Issue Tracker Sep 11, 2025
@alextran1502
Copy link
Member

alextran1502 commented Sep 11, 2025

This doesn't conform with video/photo cellular requirement, correct? What happens if the server is unreachable?

@shenlong-tanwen
Copy link
Member Author

This doesn't conform with video/photo cellular requirement, correct? What happens if the server is unreachable?

Handled both of the cases now. We make a ping to the server before starting the backup routine. If the server is not reachable, the backup is skipped.


const ServerInfoService(this._apiService);

Future<bool> ping() async {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably shouldn't need to ping, I am unsure of the exact logic here for the entire flow, but before any background uploads happen we should be doing a remote sync, so we can probably just use that as our "ping".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be ideal, yes! But our isolates do not propagate the errors back to the calling isolate and If we change it to do it now, I’m not entirely sure what chaos that’ll unleash elsewhere

@alextran1502 alextran1502 merged commit 722a464 into main Sep 11, 2025
49 checks passed
@alextran1502 alextran1502 deleted the fix/android-bg-backups branch September 11, 2025 17:01
jochbru pushed a commit to pixelunioneu/immich that referenced this pull request Sep 16, 2025
* upload using dart client

* add connectivity api

* respect backup network setting

* comment as to why we need to wait for setForegroundAsync call

* log assets skipped due to network constraint

* dynamic spawning -> false

---------

Co-authored-by: shenlong-tanwen <[email protected]>
Co-authored-by: Alex <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Beta] background Backup does not work on android

4 participants