MissingCore / Music

A Nothing inspired local music player.
GNU Affero General Public License v3.0
163 stars 9 forks source link

The app doesn't start. #62

Closed dontknowhowtocoding closed 1 month ago

dontknowhowtocoding commented 1 month ago

What device did this occur on?

Galaxy Note 10

What version of Android is your device running?

12

App Version

v1.0.0-rc.11

Summary

I'm getting this error massage when starting the app, I tried to reinstall it, but nothing happened

Screenshot / Video

ad7faddc-b3fe-4834-ad42-07c68ac2b74e

cyanChill commented 1 month ago

When I was submitting this app for review on the Play Console, I noticed that I was getting this error only with Android 12 devices. In general, the Missing MEDIA_LIBRARY permissions. means that you might have not accepted the permissions for granting access to Files and media (since this is pre-Android 13).

Does this error occur with v1.0.0-rc.10? If it doesn't, then it might mean it got introduced with this version of the app.

dontknowhowtocoding commented 1 month ago

In version 1.0.0-rc.10, the app was stuck with this screen 93bb3eb0-d00a-4014-81bd-d4722d9b8282 I couldn't try the app at this point, but the error message didn't show. (I found if I disabled the storage permission the app opens without any error message and my music doesn't show of course)

cyanChill commented 1 month ago

@dontknowhowtocoding Hey, I found the issue. Actually this was something I encountered while testing the app on my OnePlus 6 running Android 11 way back then that I forgot about. Basically, I wanted to limit the scope of app permissions based on Android version, specifically WRITE_EXTERNAL_STORAGE.

Supposedly, this permission should have no effect when an app targets Android 11 or higher, so I assume it would be safe it set a maxSDKVersion value on this permission (I initially set it to 29). However, when I tried it on my OnePlus 6, it threw an error, so I changed it to 30 (API level for Android 11). Apparently, expo-media-library still relies on this permission, even if it shouldn't be used. I guess it still uses it for Android 12 as well.

I just ended up removing any use of maxSDKVersion in the manifest so I don't encounter any stupid issues such as this xD.

cyanChill commented 1 month ago

I'll probably upload a v1.0.0-rc.12 which hot fixes this issue soon / in a few days (just need to fix a double bootsplash issue that only appeared in the production version of the app and just causes the bootsplash to stay present).

dontknowhowtocoding commented 1 month ago

The new update works but it's laggy. https://github.com/user-attachments/assets/d022e258-4f13-4589-83a2-3bad0ccfe827

cyanChill commented 1 month ago

The app might be laggy if it's still saving images in the background. Did this happen right after you installed v1.0.0-rc.12?

dontknowhowtocoding commented 1 month ago

Yes

cyanChill commented 1 month ago

Yea, then it might be because the app is still saving images in the background (I assume "10:35" has some cover artwork). You can check to see if the app finished saving images in the "Insights" screen accessible from the settings page.

If it's still occurring when the app claims that images are finished saving, then it might be something else.

dontknowhowtocoding commented 1 month ago

The weird thing is when I tried the app now, no more lag I assume like you said saving or processing my 327 tracks in the background.

cyanChill commented 1 month ago

Since everything seems good now, I'll close this issue.