TeamVanced / VancedManager

Vanced Installer
GNU General Public License v3.0
8.25k stars 1.14k forks source link

[Bug]: Crash on open #750

Open Bluexin opened 2 years ago

Bluexin commented 2 years ago

Device

Device: Samsung Galaxy Tab S5e LTE Operating System: LineageOS 18.1 (w/ microG & Magisk) Android Version: 11

Version

I tried with 2.6.2, 2.6.1, 2.6.0

Bug Description

The app crashes when opening. Logcat shows a lot of errors which seem to have to do with a missing directory, or unability to create some directories. Here's a snippet from the logs :

12-06 17:52:23.621 11703 11742 W ContextImpl: Failed to ensure /mnt/expand/b30c66b2-7b50-4b6d-8289-f7d27cb20a2b/user/0/com.vanced.manager/files: mkdir failed: ENOENT (No such file or directory)
12-06 17:52:23.622 11703 11729 W ContextImpl: Failed to ensure /mnt/expand/b30c66b2-7b50-4b6d-8289-f7d27cb20a2b/user/0/com.vanced.manager/databases: mkdir failed: ENOENT (No such file or directory)
12-06 17:52:23.622 11703 11742 E CrossProcessLock: encountered error while creating and acquiring the lock, ignoring
12-06 17:52:23.622 11703 11742 E CrossProcessLock: java.io.FileNotFoundException: /mnt/expand/b30c66b2-7b50-4b6d-8289-f7d27cb20a2b/user/0/com.vanced.manager/files/generatefid.lock: open failed: ENOENT (No such file or directory)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  at libcore.io.IoBridge.open(IoBridge.java:492)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  at java.io.RandomAccessFile.<init>(RandomAccessFile.java:289)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  at p.f.c.u.b.a(CrossProcessLock.java:2)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  at p.f.c.u.e.run(FirebaseInstallations.java:7)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  at java.lang.Thread.run(Thread.java:923)
12-06 17:52:23.622 11703 11742 E CrossProcessLock: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  at libcore.io.Linux.open(Native Method)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7550)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  at libcore.io.IoBridge.open(IoBridge.java:478)
12-06 17:52:23.622 11703 11742 E CrossProcessLock:  ... 6 more

Please let me know if there is any more info I could provide. I could not find any SELinux denial linked to these errors.

Additional checks

Bluexin commented 2 years ago

Turns out I was only getting this issue when downloading the apk on my device and installing it from files browser, installing through adb seems to work fine. I'll let you decide whether to close this issue or keep it open :)

X1nto commented 2 years ago

The crash log is super odd. Are you installing manager on SD Card or any other external storage device by any chance?

Bluexin commented 2 years ago

I downloaded the file to my device and installed it with the default installer, which does not let me pick where to install it. Note that the sd card is configured for "device and app storage".

Now after installing through adb :

find / -name "*databases*" -links 2 2> /dev/null | grep vanced                                                                                                                                                                  
./dev/R0Z7/.magisk/mirror/data/data/com.vanced.manager/databases
./data_mirror/data_ce/null/0/com.vanced.manager/databases
./data/user/0/com.vanced.manager/databases
./data/data/com.vanced.manager/databases

these locations popped up

X1nto commented 2 years ago

I downloaded the file to my device and installed it with the default installer, which does not let me pick where to install it. Note that the sd card is configured for "device and app storage".

Hmm, I'm guessing it's some kind of bug with the software on your system, and particularly, how it handles apps on external storage devices (Certified Samsung Moment™️)