Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Music stops halfway through tracks throwing error #1120

Open
Spurge420 opened this issue Jan 29, 2024 · 10 comments
Open

Music stops halfway through tracks throwing error #1120

Spurge420 opened this issue Jan 29, 2024 · 10 comments

Comments

@Spurge420
Copy link

Spurge420 commented Jan 29, 2024

Hi,

Music seems to stop when playing tracks at the halfway mark throwing the error

Error playing URL: /index.php/apps/music/api/file/79381/download

The reload grey visual you see doesn't go beyond halfway either. Cannot seek tracks but skip forward and back is fine.
Different browsers give me the same problem.

This only happens with flac files. mp3 seems to work without any issues.

Any ideas on what might cause this? Seem the preloading or cache stops halfway .

NextCloudPi 28.0.2 RC5
Music v1.10.0

Update: This only happens when playing locally. Quite bizarre.
Not related to Music, but I can't browse Nextvcloud via https locally. Perhaps it's related?

@vitis586
Copy link

I also see this. I play folders a lot and some of the files play just a second or so and are skipped with an error Error playing URL: /index.php/apps/music/api/file/2503189/download. For me it happened with FLAC and also M4a files.

With the M4a it skipped 20 files and then started playing the 21st file without issues. I do not expect that this file was encoded in some special way. Technical tab shows the same details across the whole M4a album.

The logs in Nextcloud do not show anything related to this. I am playing only remotely through https. I never seen this error on the previous versions.

Nextcloud 28.0.1 (linuxserver docker container)
Music v1.10.0

Do we need to rescan the library with the new version? I have not tried that.

@paulijar
Copy link
Collaborator

@Spurge420 @vitis586 Thanks for the report. Could you maybe share one sample file with me which triggers this problem for you? You can find my email address from my github profile.

@paulijar
Copy link
Collaborator

@vitis586

Do we need to rescan the library with the new version?

No, that will not be necessary, and there's no reason to believe that it would help here. Scanning is made just to extract the metadata to show the artists and albums and so on, but the playing of the file happens directly from the original file.

@Spurge420
Copy link
Author

Just an update, doesn't seem to happen to every flac file. Some play and seek fine. Might be related to the bitrate / encoding of the file.

Thanks for the work you do.

@vitis586
Copy link

@paulijar I did some more investigation and long story short - it works, no issues. I tried Edge and that worked, I also tried private Firefox session (new profile) and that also worked. So I flushed my profile and now it also works as it should. Something got cached I guess. So maybe @Spurge420 can share a file for you?

Thanks for the app. It is great!

@paulijar
Copy link
Collaborator

@Spurge420 I got your sample files, and for me, both of them play fine and also the seeking works without any issues both on Firefox and on Chrome. Based on this, there shouldn't be anything wrong with those files specifically. My best guess is that this is some kind of configuration issue on your HTTP server or reverse proxy (or similar). Especially, you should make sure that they will not mutilate the partial content requests or responses (status code 206). You wrote that the problem happens with flac files but not with mp3 but the important difference might be that the flac files are typically much larger than the mp3 files.

@vitis586
Copy link

vitis586 commented Jan 31, 2024

After I sent that everything is working, it started again. The thing is that the files do not play but as soon as I play something else for a while, I can then play most of the wrong files (not sure it there is a correlation). But I was at work and did not want to investigate.
Now at home (different machine, also Firefox) I am getting the errors as well. In the console I am getting some errors at every failed playback.

  • At the very beginning (after loading the screen with Music app). There is the first error and warning that might be related.

Content-Security-Policy: The page's settings blocked the loading of a resource at eval ("script-src"). [webpack.app.ed7a3d4fa79d10ae7b4c.js:2:41067](https://cloud.example.cz/apps/music/dist/webpack.app.ed7a3d4fa79d10ae7b4c.js?v=ca892429-72)

Source map error: Error: request failed with status 404 Resource URL: https://cloud.example.cz/apps/music/dist/webpack.app.ed7a3d4fa79d10ae7b4c.js?v=ca892429-72 Source Map URL: webpack.app.ed7a3d4fa79d10ae7b4c.js.map

  • After I find the "wrong" files I start getting these. This is for the first file

Using html5 for type audio/flac URL /index.php/apps/music/api/file/2503189/download [webpack.app.ed7a3d4fa79d10ae7b4c.js:2:293819](https://cloud.example.cz/apps/music/dist/webpack.app.ed7a3d4fa79d10ae7b4c.js?v=ca892429-72)

Media resource https://cloud.example.cz/index.php/apps/music/api/file/2503189/download could not be decoded. [music](https://cloud.example.cz/apps/music/#/folders)

Cannot play with HTML5, falling back to Aurora.js [webpack.app.ed7a3d4fa79d10ae7b4c.js:2:295864](https://cloud.example.cz/apps/music/dist/webpack.app.ed7a3d4fa79d10ae7b4c.js?v=ca892429-72)

Uncaught (in promise) DOMException: The media resource indicated by the src attribute or assigned media provider object was not suitable.

Media resource https://cloud.example.cz/index.php/apps/music/api/file/2503189/download could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_METADATA_ERR (0x806e0006) [music](https://cloud.example.cz/apps/music/#/folders)

Aurora error: Error: Invalid ADTS header. [webpack.app.ed7a3d4fa79d10ae7b4c.js:2:296746](https://cloud.example.cz/apps/music/dist/webpack.app.ed7a3d4fa79d10ae7b4c.js?v=ca892429-72)

Aurora error: Error: Invalid ADTS header. [webpack.app.ed7a3d4fa79d10ae7b4c.js:2:296746](https://cloud.example.cz/apps/music/dist/webpack.app.ed7a3d4fa79d10ae7b4c.js?v=ca892429-72)

HTTP "Content-Type" of "text/html" is not supported. Load of media resource https://cloud.example.cz/apps/music/ failed. [music](https://cloud.example.cz/apps/music/#/folders)

Aurora error: Error: Invalid ADTS header.

  • Then for every other file I am getting just Aurora error: Error: Invalid ADTS header.
  • Succesfull plays (mp3) are accompanied by these
    HTTP "Content-Type" of "text/html" is not supported. Load of media resource https://cloud.example.cz/apps/music/ failed.

Using html5 for type audio/mpeg URL /index.php/apps/music/api/file/2503962/download

All of those are very basic (mostly) FLACs, not something exotic like DSD. Let me know if you can get something from this. The console gets flooded quite quickly, because when it starts spitting those errors, it is like a machine gun until I find something that plays. 😄

@paulijar
Copy link
Collaborator

@vitis586 The first two console logs are completely normal:
Content-Security-Policy: The page's settings blocked the loading of a resource at eval ("script-src"). [webpack.app.ed7a3d4fa79d10ae7b4c.js:2:41067](https://cloud.example.cz/apps/music/dist/webpack.app.ed7a3d4fa79d10ae7b4c.js?v=ca892429-72)
Source map error: Error: request failed with status 404 Resource URL: https://cloud.example.cz/apps/music/dist/webpack.app.ed7a3d4fa79d10ae7b4c.js?v=ca892429-72 Source Map URL: webpack.app.ed7a3d4fa79d10ae7b4c.js.map
The first of these happens when the Angular.js framework checks if eval is allowed or not (it's nowadays disallowed on all major browsers). The second just tells that you don't have the .map files to properly debug the Music app front-end. If you'd like to do that, you could download the map files from https://github.com/owncloud/music/releases and extract them to the dist folder of your Music app installation.

I received and tested your sample file and noticed that the file cannot be played on Firefox but it plays fine on Chrome. You can even drop Music and Nextcloud out of the loop and just open the local file to Firefox and see that it cannot be played:
image

I then remembered that some user earlier reported about a similar problem and that was caused by somehow incorrect file metadata. I tested clearing all the metadata from your file, and indeed, it started to play normally also on Firefox! I don't know which is the offending metadata tag but this one seems pretty suspicious:
image

@vitis586
Copy link

I knew that it is something stupid.. That is there because I was using Mucicbrainz to label my collection to properly show up in Jellyfin. That never worked out for these "various artist collections".

I have to find something to strip just the problematic metadata. I tried VLC na jRiver but no luck. That is a problem for another day.

So my previous statement stays - everything is OK on Music's side. 👍 Thank you again for you input and time.

@Spurge420
Copy link
Author

Thank you Paul for your time and looking into this. Also for the Music App!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants