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

Fixed: Application crashing below API level 29 when we select the external storage. #3642

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

MohitMaliFtechiz
Copy link
Collaborator

Parent Issue #3638

See #3638 (comment)

  • The issue was with the FileObserver class constructor we used, which is introduced in SDK 29. As a result, it is not available for older versions, leading to a NoSuchMethodError when attempting to access it. This caused the application to crash below API level 29 when selecting external storage.

@kelson42
Copy link
Collaborator

kelson42 commented Dec 29, 2023

@MohitMaliFtechiz Which apps are impacted (kiwix, custom apps)? Why this bug has not been detected for other (custom) apps? Earlier? Why custom apps - where you can not choose any storage - are impacted? How often such a crash will happen?

@MohitMaliFtechiz
Copy link
Collaborator Author

@MohitMaliFtechiz Which apps are impacted (kiwix, custom apps)?

@kelson42 It will impact the kiwix app.

Why this bug has not been detected for other (custom) apps? Earlier? Why custom apps - where you can not choose any storage - are impacted?

This bug does not exist in the custom apps, which is why it has not been recognized yet in custom apps, for kiwix app, it occurs below Android 9 when external storage has very little storage in it.

Copy link

codecov bot commented Dec 29, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (492e8ee) 48.61% compared to head (e775447) 48.63%.
Report is 1 commits behind head on main.

Files Patch % Lines
...a/org/kiwix/kiwixmobile/zimManager/Fat32Checker.kt 0.00% 10 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3642      +/-   ##
============================================
+ Coverage     48.61%   48.63%   +0.01%     
- Complexity     1090     1092       +2     
============================================
  Files           285      285              
  Lines         10582    10588       +6     
  Branches       1418     1418              
============================================
+ Hits           5144     5149       +5     
- Misses         4594     4598       +4     
+ Partials        844      841       -3     

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

@MohitMaliFtechiz
Copy link
Collaborator Author

For the lint issue, we just merged the #3626, and the string file has not been updated on translate-wiki, so it is not allowing me to correct the translations. Probably it will take a few hours to update.

Screenshot from 2023-12-29 16-10-35

@kelson42 kelson42 force-pushed the Issue#3638 branch 2 times, most recently from 101c15c to e775447 Compare January 10, 2024 14:39
@kelson42
Copy link
Collaborator

@MohitMaliFtechiz Why this PR had no reviewer?

@MohitMaliFtechiz
Copy link
Collaborator Author

@kelson42 We had encountered the lint-related issue so I did not request a review at that time, and after the lint issue was resolved I was busy with CI failure and libkiwix bookmarks issues so I forgot to request a review on this PR, sorry for that.

Copy link
Collaborator

@gouri-panda gouri-panda left a comment

Choose a reason for hiding this comment

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

Thanks @MohitMaliFtechiz ! @kelson42 LGTM!

…ernal storage.

* The issue was with the `FileObserver` class constructor we used, which is introduced in SDK 29. As a result, it is not available for older versions, leading to a `NoSuchMethodError` when attempting to access it. This caused the application to crash below API level 29 when selecting external storage.
@kelson42 kelson42 merged commit f8647de into main Jan 12, 2024
6 of 7 checks passed
@kelson42 kelson42 deleted the Issue#3638 branch January 12, 2024 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants