[AospMusic][v1.3]The app crashes if i try to create new playlist.

in #utopian-io5 years ago

Related Informations

Actual behavior


I tried to add a song to a new playlist.But when i click to save the play list ,the app crashes.

Expected behavior


I expected that I can add a song to a new created playlist.

How to reproduce

  1. Open the app
  2. Click "Songs"
  3. Choose a song ,click and hold to the song.
  4. Option will appear then click add to playlist.
  5. Click new and enter a name of playlist as your wish.
  6. Click Save.
  7. See the error.

Information

  • App version:v1.3
  • Operating system:9.0

Recording of the bug

Logcat


04-30 19:51:38.545 13011 13011 E AndroidRuntime: FATAL EXCEPTION: main
04-30 19:51:38.545 13011 13011 E AndroidRuntime: Process: com.android.music, PID: 13011
04-30 19:51:38.545 13011 13011 E AndroidRuntime: java.lang.SecurityException: Permission Denial: writing com.android.providers.media.MediaProvider uri content://media/external/audio/playlists/100/members from pid=13011, uid=10193 requires android.permission.WRITE_EXTERNAL_STORAGE, or grantUriPermission()
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.os.Parcel.createException(Parcel.java:1966)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:1934)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.content.ContentProviderProxy.bulkInsert(ContentProviderNative.java:498)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.content.ContentResolver.bulkInsert(ContentResolver.java:1659)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at com.android.music.MusicUtils.addToPlaylist(MusicUtils.java:583)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at com.android.music.TrackBrowserActivity.onContextItemSelected(TrackBrowserActivity.java:676)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.app.Activity.onMenuItemSelected(Activity.java:3650)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at com.android.internal.policy.PhoneWindow$PhoneWindowMenuCallback.onMenuItemSelected(PhoneWindow.java:3948)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:776)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at com.android.internal.view.menu.SubMenuBuilder.dispatchMenuItemSelected(SubMenuBuilder.java:82)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:155)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:923)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:913)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at com.android.internal.view.menu.MenuPopup.onItemClick(MenuPopup.java:128)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.widget.AdapterView.performItemClick(AdapterView.java:362)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.widget.AbsListView.performItemClick(AbsListView.java:1689)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.widget.AbsListView$PerformClick.run(AbsListView.java:4130)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.widget.AbsListView$7.run(AbsListView.java:6612)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:873)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:99)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:214)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7073)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
04-30 19:51:38.545 13011 13011 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
Sort:  

Hi @masudrana, thanks for making this contribution.

The cause of this issue is identical to your previous report. The application attempts to make a write request to local storage but is denied. Write requests are - create, modify, delete. So attempting to do any of these will lead to a crash

This is a simple issue. The simple fix will be to grant it access permissions in the AndroidManifest.xml file.

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 @masudrana!

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 @masudrana, your contribution was unvoted because we found out that it did not follow the Utopian guidelines.

Upvote this comment to help Utopian grow its power and help other Open Source contributions like this one.

Want to chat? Join us on Discord.

Coin Marketplace

STEEM 0.25
TRX 0.11
JST 0.032
BTC 61830.08
ETH 2986.99
USDT 1.00
SBD 3.73