"Could not fetch package info" error when opening apk file while using App Manager's installer
Opened this issue · 13 comments
Please check before submitting an issue
- I know what my device, OS and App Manager versions are
- I know how to take logs
- I know how to reproduce the issue which may not be specific to my device
Describe the bug
When I try to install or update an app from Aurora Store or just opening apk file from file manager I get this error, what helps is to force close App Manager, then installer opens just fine.
I found an old issue #1121 , where you mentioned that it was fixed in v4.0.0-beta01, but it seems this issue still pops up on my device.
To Reproduce
No response
Expected behavior
No response
Screenshots
Logs
No response
Device info
- Device: Xiaomi 14 Ultra
- OS Version: 1.0.12.0.UNAEUXM
- App Manager Version: v4.0.0-beta01
- Mode: Root
Additional context
No response
I found an old issue #1121 , where you mentioned that it was fixed in v4.0.0-beta01, but it seems this issue still pops up on my device.
That was a different issue.
Unfortunately, these issues will always popup now and then due to their nature. It would be better if you can some logs. In my test devices (both running A14), Aurora Store (latest) working fine. But I am running 3.1.7 stable and 4.0.0 debug versions. So, it may be fixed in the debug versions too. You can wait for the next release which is scheduled for the next week.
@MuntashirAkon I just installed v4.0.0-beta01-DEBUG (2763) from your telegram group. I will let you know if I encounter this bug. Could you point where I should gather logs, please.
Could you point where I should gather logs, please.
There's a logcat viewer inside App Manager. You can leverage it. Since you are rooted, you can try other logcat viewers or the logcat
command itself.
@MuntashirAkon So the problem repeats on v4.0.0-beta01-DEBUG (2763). Regarding the log file, is it enough to send a log in <1 min period, basically starting the log with opening a force closed Aurora Store -> Searching updates -> Updating app -> Getting fetch error -> Stop the log? I don't know how sensitive the information is which is contained in log file, so want to make sure. If this is enough to debug I would rather send it to you by email then post it here.
@MuntashirAkon So the problem repeats on v4.0.0-beta01-DEBUG (2763). Regarding the log file, is it enough to send a log in <1 min period, basically starting the log with opening a force closed Aurora Store -> Searching updates -> Updating app -> Getting fetch error -> Stop the log?
Should be enough.
I don't know how sensitive the information is which is contained in log file, so want to make sure. If this is enough to debug I would rather send it to you by email then post it here.
There's an option to mask the potentially sensitive items in the logs. You can send me the logs via email as well.
@MuntashirAkon I sent you log file + screenshot with time when the error popped up
@MuntashirAkon I rolled back to 3.1.7 which I haven't used for a long period few days ago and have not encountered this bug so far.
Found the issue:
On create, intent: Intent { act=android.intent.action.SEND_MULTIPLE typ=application/x-apks flg=0x10800001 cmp=io.github.muntashirakon.AppManager.debug/io.github.muntashirakon.AppManager.apk.installer.PackageInstallerActivity clip={application/x-apks {U(content)}} (has extras) }
Couldn't fetch package info
io.github.muntashirakon.AppManager.apk.ApkFile$ApkFileException: java.io.IOException: No such file or directory
at io.github.muntashirakon.AppManager.apk.CachedApkSource.resolve(CachedApkSource.java:57)
at io.github.muntashirakon.AppManager.apk.installer.PackageInstallerViewModel.getPackageInfoInternal(PackageInstallerViewModel.java:170)
at io.github.muntashirakon.AppManager.apk.installer.PackageInstallerViewModel.lambda$getPackageInfo$0$io-github-muntashirakon-AppManager-apk-installer-PackageInstallerViewModel(PackageInstallerViewModel.java:95)
at io.github.muntashirakon.AppManager.apk.installer.PackageInstallerViewModel$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively0(Native Method)
at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:349)
at java.io.File.createTempFile(File.java:2007)
at io.github.muntashirakon.AppManager.self.filecache.FileCache.getCachedFile(FileCache.java:83)
at io.github.muntashirakon.AppManager.apk.CachedApkSource.resolve(CachedApkSource.java:54)
... 8 more
@MuntashirAkon Great to hear. So the fix is going to be a part of next release of 4.0.0, or it got included in to recently released v4.0.0-beta02? I did not tested it yet, 3.1.7 works like a charm.
So the fix is going to be a part of next release of 4.0.0, or it got included in to recently released v4.0.0-beta02? I did not tested it yet, 3.1.7 works like a charm.
I actually didn't understand the issue. It's failing to cache the APK files for some reason, but it previous checks for the cache directory passed. This could mean that the storage was running out, or a bug. I need to investigate more on this.
@MuntashirAkon I see. I installed v4.0.0-beta02, to see how it performs. For some reason got a feeling this issue could be related to "Run AM in the background" which was switched on previously. Now I keep it off.
I must say that I have not yet encountered "Could not fetch package info" error using v4.0.0-beta02 for a good week or two. I also keep "Run AM in the background" off.
@resiehnnes: Please let me know if you have found a way to reproduce it.