kabouzeid / phonograph-issue-tracker

14 stars 0 forks source link

"Couldn't play this song." for every song on external SD #101

Open llucax opened 8 years ago

llucax commented 8 years ago

Hi, I've been using Phonograph very gladly for some time now, but yesterday it suddenly stopped working. I get this message for every song I try to play: Couldn't play this song.

I tried the same songs with VLC and it works great. I don't know what happened because I never had a similar problem before.

Device: Elephone P9000 Android: 6.0 Phonograph: 0.13.1

llucax commented 8 years ago

In case is of any help, I can see via logcat this message:

07-05 22:24:52.103  2390  3463 W PackageManager: checkUidPermission(): android.permission.WRITE_MEDIA_STORAGE of 10173 is denied.

My music is in an external SD card. Maybe there was some upgrade where Phonograph needs to write to the storage but it doesn't ask for the WRITE_MEDIA_STORAGE permission?

llucax commented 8 years ago

Or was it WRITE_EXTERNAL_STORAGE the special permission?

llucax commented 8 years ago

I noticed that also the album covers can't be read anymore by Phonograph. I tried a few more audio players all seem to work fine though.

arkon commented 7 years ago

This is really bizarre. Did it still happen afterwards, or did you just give up?

llucax commented 7 years ago

I gave up and switched to Black Player. I really liked Phonograph 😢

arkon commented 7 years ago

For dev future reference, it seems like writing to an external SD card is weird across different versions of Android.

Prior to 4.4, you could easily read/write anywhere.

I'm not entirely sure about 5.0, but I think reading is fine so long as you have the permission, but writing outside of the app-specific folder might not be possible without root.

In 6.0 (and probably 7.0/8.0), the new permissions model requires you to ask for the permissions needed to do this unless you're just working in the app-specific directory (i.e. ndroid/data/com.kabouzeid.gramophone/files, which we're not in this case, since music files can be anywhere). See this thread for more info.

Of course, all of this still needs more research.

kruleucc commented 6 years ago

Is deleting songs on SD card going to be supported in near future @arkon?

arkon commented 6 years ago

@krux3r It'll likely be "fixed" as part of https://github.com/kabouzeid/Phonograph/pull/253

kruleucc commented 6 years ago

@arkon niceeee. So I'll finally be able to delete songs right from the app. Great! :)

ajayram198 commented 3 years ago

Hi, I've been using Phonograph very gladly for some time now, but yesterday it suddenly stopped working. I get this message for every song I try to play: Couldn't play this song.

I tried the same songs with VLC and it works great. I don't know what happened because I never had a similar problem before.

Device: Elephone P9000 Android: 6.0 Phonograph: 0.13.1

Even I'm getting the same error "Couldnt play this Song" for all songs stored in External Memory Card. I'm using a Nokia 1 Handset running Android v10. So to get rid of the error, I restarted the phone. After restarting, none of the songs in Memory Card were available. Memory Card is empty and entire 16 GB is showing as "Free Space". I tried copying a few albums again, and after 3-4 hours ran into the same error message. Upon restart lo and behold, the entire Memory Card got wiped out. Had Completed a Software Update few days back, could that be the root cause behind the entire Memory Card getting wiped out on a restart?

And, to make matters worse, In the middle of Lockdown, none of the online marketplaces (Amazon, Flipkart etc) are able to deliever new phones coz they don't have stock. Retail phone stores are closed, including Shopping malls have downed shutters 24x7. Probably even God doesnt know when they would open up and when "unLocking" would begin.So I've shifted to another phone was lying unused at home (thankfully), only for playing Music. Back to the good old "Ipod Days" when Music and Phone Calling/ SMS were in separate devices :) :+1:

chewi commented 3 years ago

FYI, I found that formatting SD cards as Adoptable Storage is the only sane way to go. The concept is a little confusing but it generally just works. You can still choose whether apps are installed to the SD card or not. The only downside is the phone becomes rather unhappy if you remove it but I never do.

ajayram198 commented 3 years ago

FYI, I found that formatting SD cards as Adoptable Storage is the only sane way to go. The concept is a little confusing but it generally just works. You can still choose whether apps are installed to the SD card or not. The only downside is the phone becomes rather unhappy if you remove it but I never do.

"phone becomes rather unhappy" does that mean malfunctioning of phone for apps like contacts, calling, SMS, Whatsapp? ( I hope not). I plan to buy a new phone when lockdown ends and then take this SD card and putting it into new phone. Would I face any problem then?

If the issue I am facing only Phonograph related, then using another music player app would not end up erasing the SD Card right?

chewi commented 3 years ago

It sounds like you haven't used Adoptable Storage so this wouldn't happen.

If you remove a card formatted as Adoptable Storage then any apps installed to the card will stop working, although that was also the case without Adoptable Storage. I'm not sure but you may not be able to save photos and such anywhere because it would normally only write these to the card and nowhere else.

You can't just move an Adoptable Storage card from one phone to another because the data is encrypted and the encryption key lives in the phone's internal memory. You can fish this out and copy it if you have root or recovery access but don't expect any installed apps to just carry across to the new phone. I personally only use Adoptable Storage for my files (i.e. /sdcard) and still install apps to internal memory.

These permission issues affect far more than just Phonograph. I think SD cards without Adoptable Storage is just broken in general. It may have worked in the past but security on Android is tighter these days.

ajayram198 commented 3 years ago

It sounds like you haven't used Adoptable Storage so this wouldn't happen.

If you remove a card formatted as Adoptable Storage then any apps installed to the card will stop working, although that was also the case without Adoptable Storage. I'm not sure but you may not be able to save photos and such anywhere because it would normally only write these to the card and nowhere else.

You can't just move an Adoptable Storage card from one phone to another because the data is encrypted and the encryption key lives in the phone's internal memory. You can fish this out and copy it if you have root or recovery access but don't expect any installed apps to just carry across to the new phone. I personally only use Adoptable Storage for my files (i.e. /sdcard) and still install apps to internal memory.

These permission issues affect far more than just Phonograph. I think trying to just an SD card without Adoptable Storage is just broken in general. It may have worked in the past but security on Android is tighter these days.

m not sure how to check whether my Card is "Adoptable Storage". Upon opening the "Files by Google" this is how it shows :-

Screenshot_20210604-170834

chewi commented 3 years ago

It says Portable Storage, which is the other option, so not Adoptable Storage.

pratibha131 commented 2 months ago