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 too many calendars on Android #2503

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

gnunicorn
Copy link
Contributor

The logs of https://github.com/acterglobal/a3-meta/issues/709 showed that despite our local cached info being retrieved properly, the calendars were not found and instead a new one was created:

[2025-01-15][14:39:47.711234][a3::calendar_sync][INFO] Previous key found 1057 null null null
[2025-01-15][14:39:47.773262][a3::calendar_sync][INFO] No previous calendar found, creating a new one null null null
[2025-01-15][14:39:47.821049][a3::calendar_sync][INFO] ignoring state change without value null null null
 ...
[2025-01-15][14:39:50.831929][a3::calendar_sync][INFO] Current links: 1058: 3 null null null
[2025-01-15][14:39:50.873099][a3::calendar_sync][INFO] 1058: creating new items for $Ent7jKLpXl20AxOZGy96jW5FhPEDnXy1yAnKOuKID8U null null null
[2025-01-15][14:39:50.909107][a3::calendar_sync][INFO] 1058: creating new items for $ITaQQ-V58nIODj0KI7Aa4SZQ9GYaDffMhaQmW32i4zU null null null
[2025-01-15][14:39:50.936522][a3::calendar_sync][INFO] 1058: creating new items for $MS2tsQbSjD5GYZjw1OmM-IB9RdRePt0KRr3qCunhdA8 null null null
[2025-01-15][14:39:50.963767][a3::calendar_sync][INFO] Storing new mapping: [$Ent7jKLpXl20AxOZGy96jW5FhPEDnXy1yAnKOuKID8U=7096, $ITaQQ-V58nIODj0KI7Aa4SZQ9GYaDffMhaQmW32i4zU=7097, $MS2tsQbSjD5GYZjw1OmM-IB9RdRePt0KRr3qCunhdA8=7098] null null null

As if the call for retrieveCalendars wasn't working at all. Checking the documentation of the plugin, we can see that there is a section about if exactly that kind of problem, which I ignored in the past, as we didn't have configured. But revisiting this, it seems that this is exactly the issue causing #2369 and also explaining why all is fine in debug mode and we only see it on nightly and release:

By default, all android apps go through R8 for file shrinking when building a release version. Currently, it interferes with some functions such as retrieveCalendars().

You may add the following setting to the ProGuard rules file proguard-rules.pro (thanks to Britannio Jarrett). Read more about the issue here

This PR applies those changes (and a minor more verbose trace) so we can try it out in a nightly release (after this release) and confirm the fix.

@gnunicorn gnunicorn added the merge post release only Merge this only after the new release has been cut label Jan 15, 2025
@gnunicorn gnunicorn changed the title Fix calendars on Android Fix too many calendars on Android Jan 15, 2025
@gnunicorn gnunicorn added s-calendar Calendar, events & meetings t-android Android platform issues ci-build-android build-demo Include demo builds in this PR labels Jan 15, 2025
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.32%. Comparing base (07198dc) to head (37a29ea).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2503   +/-   ##
=======================================
  Coverage   27.32%   27.32%           
=======================================
  Files         680      680           
  Lines       44523    44523           
=======================================
+ Hits        12165    12168    +3     
+ Misses      32358    32355    -3     
Flag Coverage Δ
integration-test 39.82% <ø> (+0.01%) ⬆️
unittest 18.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Copy link
Contributor

Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-demo Include demo builds in this PR ci-build-android merge post release only Merge this only after the new release has been cut s-calendar Calendar, events & meetings t-android Android platform issues
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

1 participant