[Loopy Audio Looper] [V0.9] The app crashed when I clicked on an option after denying the access permission

in #utopian-io5 years ago

Related Informations

Expected behavior

I expected that I could click on every option after denying access permission.

Actual behavior

When I tried to click on "Browse music library" after denying the access permission, then the app crashed.

How to reproduce

  1. Download the app from here.
  2. Your phone will ask you to grant all permission, click on "DENY".
  3. Then go to this app's options and click on "Browse music library".
  4. See error.
  • App version: 0.9
  • Operating system: Android 6.0.1

Logcat

05-07 13:28:08.357  7350  7350 D AndroidRuntime: Shutting down VM

05-07 13:28:08.367  7350  7350 E AndroidRuntime: FATAL EXCEPTION: main

05-07 13:28:08.367  7350  7350 E AndroidRuntime: Process: de.michaelpohl.loopy, PID: 7350

05-07 13:28:08.367  7350  7350 E AndroidRuntime: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/audio/albums from pid=7350, uid=10424 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:1620)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.content.ContentResolver.query(ContentResolver.java:502)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.content.ContentResolver.query(ContentResolver.java:445)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at de.michaelpohl.loopy.model.DataRepository.getAlbumTitles(DataRepository.kt:5)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at de.michaelpohl.loopy.ui.main.filebrowser.AlbumBrowserFragment.onCreate(AlbumBrowserFragment.kt:2)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:64)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.support.v4.app.FragmentTransition.addToFirstInLastOut(FragmentTransition.java:24)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.support.v4.app.FragmentTransition.startTransitions(FragmentTransition.java:11)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:44)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:10)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:4)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:1)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:739)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:95)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7325)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

05-07 13:28:08.367  7350  7350 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Sort:  

Hi @sagorahmed, thanks for making this report

I was able to reproduce the behavior just like you described. The logcat you provided is very helpful. The application attempts to make a write request to local storage but is denied.

This is a simple issue. A simple fix will be throw an error prompt requesting the user to grant the app access permissions. The issue is just the absence of an error prompt. I say this because you specifically denied the app access then tried to use a feature of the app that requires the same permission it was denied of.

Thanks again for this report. I look forward to more of your reports.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @fego! Keep up the good work!

Hi @sagorahmed!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @sagorahmed!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.32
TRX 0.11
JST 0.034
BTC 66785.29
ETH 3229.75
USDT 1.00
SBD 4.30