AppManager icon indicating copy to clipboard operation
AppManager copied to clipboard

"Could not fetch package info" error when opening apk file while using App Manager's installer

Open resiehnnes opened this issue 1 year ago • 2 comments

Please check before submitting an issue

  • [X] I know what my device, OS and App Manager versions are
  • [X] I know how to take logs
  • [X] 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

AppManager_issue

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

resiehnnes avatar Oct 17 '24 12:10 resiehnnes

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 avatar Oct 19 '24 05:10 MuntashirAkon

@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.

resiehnnes avatar Oct 19 '24 10:10 resiehnnes

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 avatar Oct 23 '24 16:10 MuntashirAkon

@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.

resiehnnes avatar Oct 24 '24 10:10 resiehnnes

@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 avatar Oct 25 '24 21:10 MuntashirAkon

@MuntashirAkon I sent you log file + screenshot with time when the error popped up

resiehnnes avatar Oct 29 '24 17:10 resiehnnes

@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.

resiehnnes avatar Nov 04 '24 10:11 resiehnnes

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 avatar Nov 16 '24 20:11 MuntashirAkon

@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.

resiehnnes avatar Nov 17 '24 20:11 resiehnnes

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 avatar Nov 18 '24 06:11 MuntashirAkon

@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.

resiehnnes avatar Nov 18 '24 19:11 resiehnnes

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 avatar Nov 30 '24 11:11 resiehnnes

@resiehnnes: Please let me know if you have found a way to reproduce it.

MuntashirAkon avatar Dec 21 '24 13:12 MuntashirAkon

Getting a similar issue with this app: https://github.com/abdallahmehiz/mpvKt

chaoscalm avatar Jan 12 '25 22:01 chaoscalm