Closed edisondotme closed 3 months ago
Hmm, that is an interesting crash. I am not sure how the packageName can be null, but I will dig into the TelephonyManager and see if I can set it a different way in this edge case.
Thanks for reporting the bug.
I installed Graphene OS on an old Pixel 6 that I have, and I was able to run Network Survey just fine.
I have also dug into the app code as well as the Android OS code, and I am not seeing anything that jumps out at me.
One random (grasping at straws) thought is that it is a permissions problem. If the telephony service has not been granted the proper permissions then maybe it is unable to read the app's package name. Have you approved the proper permissions? You might need to reset the app by deleting all the app's data (via settings or by uninstalling and reinstalling).
I will keep looking into the code, but I am having a hard time reproducing the issue.
Thanks for the digging!
I did some further testing though and it seems that the app works correctly when I install it on the owner profile. It does not work when I open it in the other "Android user account" I have on the device.
Try creating a new user and running it from there.
Hmm, it ran fine for me that way also. I simply created a new user called "Test User", switched to that account, and then installed the app from the source via CLI using the --user 10
option to specify the new account. Maybe it has to do with the way the app was installed? Which app store did you use to install Network survey?
Ahh, I was able to reproduce it now. I had the app installed on the "Owner" account still. I uninstalled it there and the crash started happening. However, given this it seems to be an Android bug related to how the manage accounts and getting the package name for apps on the accounts. I will keep digging now that I can reproduce it to see if I can prevent the crash in the app, and I might submit a bug to the Android bug tracker.
I originally installed it from F-Droid using the IzzyOnDroid repo. On my owner profile, I downloaded the cdr release from Github.
I tried downloading the Github release on my user profile and installing it from the apk, but same crash result. Compared the SHA-1 of the apk downloaded via Github and F-Droid, they match.
I uninstalled and re-installed various times from both sources and for some reason it is working now. I did not change anything about my device setup, so very strange.
I seem to recall the "package name can't be null" problem happening to me with a different app a long time ago, but I've since forgotten which app.
Thank you anyways for looking into it, but it seems like you can call this issue closed as resolved or not reproducible.
I am good with closing it as it seems to be a problem with Android and not my app. I did open an issue in the Android issue tracker here: https://issuetracker.google.com/issues/356176632
Hopefully they resolve the bug (my guess it is a really easy fix, but I can't say for sure without seeing all the ITelephony code), but for now it sounds like a workaround is to have the app installed on the owner profile as well.
@edisondotme , good news. It appears that Google has fixed the issue in Android. I am unsure how long it will take for the fix to start showing up in Android releases, but hopefully this fixes the crash.
Great news! Thank you for reporting that to the AOSP issue tracker
Describe the bug App opens momentarily and then crashes
To Reproduce Steps to reproduce the behavior: Open app
Expected behavior A clear and concise description of what you expected to happen. Not crash on start
Screenshots If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Graphene OS, no Google Play services installed.
Additional context Log data: