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

fix(mobile): verbose logging of full sync asset loading #9980

Closed
wants to merge 1 commit into from

Conversation

fyfrey
Copy link
Contributor

@fyfrey fyfrey commented Jun 4, 2024

adds more logging to the asset loading part of the full sync.

this PR targets v1.105 (not main!)

@fyfrey
Copy link
Contributor Author

fyfrey commented Jun 5, 2024

@Deathproof76 could you test this PR to provide further logging information for #9534 ?

I hope this time, the automatically build APKs from Github can be directly used:
https://github.com/immich-app/immich/actions/runs/9366884542/artifacts/1566661455

@Deathproof76
Copy link

Deathproof76 commented Jun 5, 2024

@fyfrey I think you've done it, everything works just as before, thank you!😁👍 still don't know why there's an almost empty chunk problem with my user, but the infinite syncing stops, I can refresh like usual and new photos are added instantly. Invalid user token or user not found in store problems are gone too.

2024-06-05 09:50:40.820034 | INFO     | SyncService          | Upserted 29 assets into the DB |
2024-06-05 09:50:40.657838 | INFO     | SyncService          | Upserted 14 assets into the DB |
2024-06-05 09:50:40.483690 | INFO     | SyncService          | Upserted 1 assets into the DB |
2024-06-05 09:50:40.033277 | INFO     | SyncService          | Upserted 1018 assets into the DB |
2024-06-05 09:50:39.526082 | INFO     | SyncService          | Upserted 4 assets into the DB |
2024-06-05 09:50:39.260989 | INFO     | SyncService          | Upserted 126 assets into the DB |
2024-06-05 09:50:38.922633 | INFO     | SyncService          | Upserted 14 assets into the DB |
2024-06-05 09:50:38.869779 | INFO     | AssetNotifier        | Load assets: 6446ms |
2024-06-05 09:50:38.867232 | INFO     | SyncService          | Upserted 46692 assets into the DB |
2024-06-05 09:50:38.384784 | SEVERE   | AssetService         | getRemoteAssets received too many almost empty chunks, stopping. Not all remote assets could be fetched from the server for user Mr Anonymous. |
2024-06-05 09:50:38.384737 | FINE     | AssetService         | Received 1 assets ranging from (1601-01-01 00:07:28.000Z,1ba5d7e2-38cc-4ce1-b4d8-d7c0f21d66cd) to (1601-01-01 00:07:28.000Z,1ba5d7e2-38cc-4ce1-b4d8-d7c0f21d66cd) |
2024-06-05 09:50:38.376009 | FINE     | AssetService         | Requesting assets older than (1601-01-01 00:07:28.000Z,1ba5d7e2-38cc-4ce1-b4d8-d7c0f21d66cd) |
2024-06-05 09:50:38.375971 | FINE     | AssetService         | Received 1 assets ranging from (1601-01-01 00:07:28.000Z,1ba5d7e2-38cc-4ce1-b4d8-d7c0f21d66cd) to (1601-01-01 00:07:28.000Z,1ba5d7e2-38cc-4ce1-b4d8-d7c0f21d66cd) |
2024-06-05 09:50:38.367915 | FINE     | AssetService         | Requesting assets older than (1601-01-01 00:07:28.000Z,1ba5d7e2-38cc-4ce1-b4d8-d7c0f21d66cd) |

full log
Immich_log_2024-06-05T09_58_48.053521.log

@fyfrey
Copy link
Contributor Author

fyfrey commented Jun 5, 2024

@Deathproof76 thank you for testing providing the log. Very helpful!. It seems there is an asset with bad metadata: one file with id 1ba5d7e2-38cc-4ce1-b4d8-d7c0f21d66cd has the date 1601-01-01. This probably messes with javascript or postgres DB and it indefinitely returns that one asset as being older than 1601-01-01.

@Deathproof76
Copy link

Deathproof76 commented Jun 5, 2024

That was it! removed it via db query DELETE FROM assets WHERE id = '1ba5d7e2-38cc-4ce1-b4d8-d7c0f21d66cd' -> cleared logs ->logged out of app -> rebooted phone -> logged back into immich app -> et voilà absolutely zero errors in the logs. Will try the standard playstore apk next.

@Deathproof76
Copy link

I can confirm that the standard Playstore v1.105 is working fully without any errors in the logs now🙌 it really has been only due to this one single asset with bad metadata. What an absolute ride, seriously, thank you!

@alextran1502
Copy link
Contributor

@fyfrey is da man!!!

@alextran1502
Copy link
Contributor

solved with #10019

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.

None yet

3 participants