drive-music-player
drive-music-player copied to clipboard
Possible Scalability Issue: You are not authorized to read this file or the file does not exist
I have created a playlist for my main collection, 700 songs. When I open this playlist (or all of the songs from the 'My Drive' tab), DMP displays the titular error message ('You are not authorized to read this file or the file does not exist') for a seemingly arbitrary set of songs, about 1/4 of the entire playlist and not related by name, size, date, or length, filetype, or metadata. It is always the same arbitrary songs, even when opening and closing the app.

When I refresh and choose any of the individual broken songs to select from 'My Drive', it plays them and then they are permanently available from the playlist. In fact, I seem to be able to do this for at least 100 songs at a time, permanently removing the error from any songs in that selection that might have had it before. I haven't determined at what point this workaround stops working, but selecting the 700 songs from 'My Drive' definitely does not fix the error, and the same songs with errors in the playlist have errors in this 700-song selection too (as mentioned above).
I did a bit of digging and debugging - I setup your app locally with Python's SimpleHTTPServer and the same songs have the error message as at driveplayer.com, so I thought it could be a problem with Google Drive's API. I noticed there is a limit of 10 API requests per second, so I implemented a random setInterval on one of the functions that makes the API call, slowing the requests down to 1 per second and taking ~10 minutes total to load (my forked code is, ironically, not in Google Drive or Github - when I get access I can give more info on which function I delayed). Still, the error appeared for those songs. Plus, it's the same songs every time and it is fixed through my hacky-workaround, so this idea was shaky to begin with.
I tried setting permissions in Google Drive (global settings, application security settings, individual file sharing settings) but nothing I tried worked.
I'm out of ideas. Any insight on this?