Waterdish / 2ship2harkinian-Android

Creative Commons Zero v1.0 Universal
136 stars 2 forks source link

failed to determine attributes for the specified path: Permission denied #2

Open xsoalokinx opened 2 months ago

xsoalokinx commented 2 months ago

Description of the crash:

The app crashes when launched from within android work profile.

Can you reproduce? If so please list the steps:

  1. Install 2ship.apk to work profile
  2. Run the app and grant file permissions
  3. Crash

Logs:

signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- Abort message: 'terminating due to uncaught exception of type
std::__ndk1::__fs::filesystem::filesystem_error: filesystem error: in posix_stat: failed to determine attributes for the specified path:
Permission denied ["/storage/emulated/0/Android/data/com.dishii.mm/files/mm.o2r"]'

System Information:

Additional Information:

After installing the app to the work profile, upon running the app, it asks for file permissions. Once the permissions are granted the app closes, and upon running the app it crashes. The app seems to run fine on the regular owner profile. Worth noting that shipwright-android works fine on the same device in work profile. It seems the app is trying to create mm.o2r at /storage/emulated/0/ which it should not be trying to do since it is running from the work profile. The path should be more like /storage/emulated/10/

Waterdish commented 1 month ago

This should be fixed in the latest update

Waterdish commented 1 month ago

My bad it actually isn't fixed. I know why it's broken I just don't know exactly how to fix it yet.

xsoalokinx commented 1 month ago

My bad it actually isn't fixed. I know why it's broken I just don't know exactly how to fix it yet.

I can supply a backtrace if needed.

Waterdish commented 1 month ago

Nah it's ok. I know exactly the line of code I need to change, it's just breaking for what seems like no reason. It's an SDL function that gets the installation directory and it works on SOH but for some reason it crashes on 2S2H saying the Java Native Interface is null. Still need to work that out. As a manual fix I just typed in the name of the installation directory with storage/emulated/0/, so that's why it's breaking.