inaturalist / iNaturalistAndroid

Android app for iNaturalist.org
https://market.android.com/details?id=org.inaturalist.android
MIT License
168 stars 57 forks source link

SecurityException in ObservationEditor.getOutputMediaFileUri #1305

Closed kueda closed 1 year ago

kueda commented 1 year ago

https://console.firebase.google.com/u/0/project/inaturalist-ios/crashlytics/app/android:org.inaturalist.android/issues/a7b625150ed7d1c36aeb16d82ba8af01

Fatal Exception: java.lang.SecurityException: Permission Denial: writing com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=15990, uid=10243 requires android.permission.WRITE_EXTERNAL_STORAGE, or grantUriPermission()
       at android.os.Parcel.createException(Parcel.java:1966)
       at android.os.Parcel.readException(Parcel.java:1934)
       at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
       at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
       at android.content.ContentProviderProxy.insert(ContentProviderNative.java:476)
       at android.content.ContentResolver.insert(ContentResolver.java:1594)
       at org.inaturalist.android.ObservationEditor.getOutputMediaFileUri(ObservationEditor.java:2239)
       at org.inaturalist.android.ObservationEditor.chooseSound(ObservationEditor.java:1470)
       at org.inaturalist.android.ObservationEditor.access$3100(ObservationEditor.java:149)
       at org.inaturalist.android.ObservationEditor$55.onClick(ObservationEditor.java:4696)
       at android.view.View.performClick(View.java:7346)
       at android.view.View.performClickInternal(View.java:7318)
       at android.view.View.access$3200(View.java:846)
       at android.view.View$PerformClick.run(View.java:27807)
       at android.os.Handler.handleCallback(Handler.java:873)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7037)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)