[GH-ISSUE #795] Wrong MIME Type for a flac song #567

Closed
opened 2026-02-26 02:33:34 +03:00 by kerem · 16 comments
Owner

Originally created by @Tzigamm on GitHub (Aug 29, 2018).
Original GitHub issue: https://github.com/koel/koel/issues/795

Hello everyone, and thank you for reading this !

After some headaches, I finally got Koel v3.7.2 installed just the way I want it, and I must say, I'm really impressed, that's some really good job, thank you very much for this app !

Unfortunately I've encountered a problem during testing: my flac files aren't played at all. The server is on a Debian Stretch machine, running apache and php7. The problem seems to be related to Koel: if I move a "song.flac" to Koel's folder music.be-ta.art/song.flac is readable and the HEAD program on linux outputs this, proving my apache know what type to apply to the file.

The problem appears when trying to play a flac song from the Koel app: here's the output of my firefox console when trying to play a song:
Le « Content-Type » HTTP « text/html » n’est pas géré. Le chargement de la ressource média https://music.be-ta.art/api/2473e1133a3acdd10cc82c3946338b52/play?jwt-token=XXXX a échoué.
(Pardon my french, I have no idea how to get it in english, it means "The text/html HTTP Content-Type can't be handled, the media "..." can't be played)
Impossible de lire le média. Aucun décodeur pour les formats nécessaires : text/html, text/html, text/html, text/html, text/html, text/html, text/html, text/html, text/html, text/html, text/html
(Can't read the media, no decoder for these formats)

Just to be sure I tried a HEAD on https://music.be-ta.art/api/2473e1133a3acdd10cc82c3946338b52/play?jwt-token=XXXX, here's the result. As you can see now the file is considered to be a html page (and if I copy paste the link in my browser firefox wants to save a 0 Byte file named "song.flac")

I'm sure this is actually some beginner stuff but Koel seems a bit to specific for Google so I'm hoping someone here knows how to solve this (it might even be helpful to someone else who knows !)

Originally created by @Tzigamm on GitHub (Aug 29, 2018). Original GitHub issue: https://github.com/koel/koel/issues/795 Hello everyone, and thank you for reading this ! After some headaches, I finally got Koel v3.7.2 installed just the way I want it, and I must say, I'm really impressed, that's some really good job, thank you very much for this app ! Unfortunately I've encountered a problem during testing: my flac files aren't played at all. The server is on a Debian Stretch machine, running apache and php7. The problem seems to be related to Koel: if I move a "song.flac" to Koel's folder music.be-ta.art/song.flac is readable and the HEAD program on linux outputs [this](https://pastebin.com/LCypHxKz), proving my apache know what type to apply to the file. The problem appears when trying to play a flac song from the Koel app: here's the output of my firefox console when trying to play a song: `Le « Content-Type » HTTP « text/html » n’est pas géré. Le chargement de la ressource média https://music.be-ta.art/api/2473e1133a3acdd10cc82c3946338b52/play?jwt-token=XXXX a échoué.` (Pardon my french, I have no idea how to get it in english, it means "The text/html HTTP Content-Type can't be handled, the media "..." can't be played) `Impossible de lire le média. Aucun décodeur pour les formats nécessaires : text/html, text/html, text/html, text/html, text/html, text/html, text/html, text/html, text/html, text/html, text/html` (Can't read the media, no decoder for these formats) Just to be sure I tried a HEAD on `https://music.be-ta.art/api/2473e1133a3acdd10cc82c3946338b52/play?jwt-token=XXXX`, [here's the result](https://pastebin.com/nZy9aUtp). As you can see now the file is considered to be a html page (and if I copy paste the link in my browser firefox wants to save a 0 Byte file named "song.flac") I'm sure this is actually some beginner stuff but Koel seems a bit to specific for Google so I'm hoping someone here knows how to solve this (it might even be helpful to someone else who knows !)
kerem 2026-02-26 02:33:34 +03:00
Author
Owner

@phanan commented on GitHub (Aug 30, 2018):

If possible, can you send me the flac file in question?

<!-- gh-comment-id:417173296 --> @phanan commented on GitHub (Aug 30, 2018): If possible, can you send me the flac file in question?
Author
Owner

@Tzigamm commented on GitHub (Aug 30, 2018):

Sure, it's online again, you can download it here (at least until I re-secure Koel): music.be-ta.art/song.flac

<!-- gh-comment-id:417206433 --> @Tzigamm commented on GitHub (Aug 30, 2018): Sure, it's online again, you can download it here (at least until I re-secure Koel): [music.be-ta.art/song.flac](music.be-ta.art/song.flac)
Author
Owner

@Tzigamm commented on GitHub (Aug 31, 2018):

I tried a full reinstall, just to be sure. The issue is still here so I tried to serve the site using both apache2 and artisan, it does not seem to change anything though... Weird...

Edit: Actually it changed something but not much: the second message in the console does not appear anymore

<!-- gh-comment-id:417640498 --> @Tzigamm commented on GitHub (Aug 31, 2018): I tried a full reinstall, just to be sure. The issue is still here so I tried to serve the site using both apache2 and artisan, it does not seem to change anything though... Weird... Edit: Actually it changed something but not much: the second message in the console does not appear anymore
Author
Owner

@phanan commented on GitHub (Aug 31, 2018):

The file is 404 for me.

<!-- gh-comment-id:417652759 --> @phanan commented on GitHub (Aug 31, 2018): The file is 404 for me.
Author
Owner

@Tzigamm commented on GitHub (Aug 31, 2018):

Oh sorry about that, forgot to copy it back after reinstalling, it's online again

<!-- gh-comment-id:417661654 --> @Tzigamm commented on GitHub (Aug 31, 2018): Oh sorry about that, forgot to copy it back after reinstalling, it's online again
Author
Owner

@phanan commented on GitHub (Aug 31, 2018):

Works fine for me. Make sure your FFMPEG_PATH setting (found in .env) is sound.

<!-- gh-comment-id:417668819 --> @phanan commented on GitHub (Aug 31, 2018): Works fine for me. Make sure your `FFMPEG_PATH` setting (found in `.env`) is sound.
Author
Owner

@Tzigamm commented on GitHub (Aug 31, 2018):

That's the problem, the song works perfectly fine when in the root directory, the problem is when I'm trying to stream it through Koel

Checked the ffmpeg path, if I copy-paste it in bash it works so this is not the problem

Would a burner account help you ? No idea if it would but I can make you something for testing purposes

<!-- gh-comment-id:417672811 --> @Tzigamm commented on GitHub (Aug 31, 2018): That's the problem, the song works perfectly fine when in the root directory, the problem is when I'm trying to stream it through Koel Checked the ffmpeg path, if I copy-paste it in bash it works so this is not the problem Would a burner account help you ? No idea if it would but I can make you something for testing purposes
Author
Owner

@phanan commented on GitHub (Sep 1, 2018):

No, I mean the song streams perfectly with Koel.

Kévin Bergue notifications@github.com schrieb am Fr. 31. Aug. 2018 um
20:58:

That's the problem, the song works perfectly fine when in the root
directory, the problem is when I'm trying to stream it through Koel

Checked the ffmpeg path, if I copy-paste it in bash it works so this is
not the problem

Would a burner account help you ? No idea if it would but I can make you
something for testing purposes


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/phanan/koel/issues/795#issuecomment-417672811, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AHrt0jYIWijcj5yVmAB_HlpcIci8joiVks5uWUEegaJpZM4WR0eE
.

<!-- gh-comment-id:417817469 --> @phanan commented on GitHub (Sep 1, 2018): No, I mean the song streams perfectly with Koel. Kévin Bergue <notifications@github.com> schrieb am Fr. 31. Aug. 2018 um 20:58: > That's the problem, the song works perfectly fine when in the root > directory, the problem is when I'm trying to stream it through Koel > > Checked the ffmpeg path, if I copy-paste it in bash it works so this is > not the problem > > Would a burner account help you ? No idea if it would but I can make you > something for testing purposes > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/phanan/koel/issues/795#issuecomment-417672811>, or mute > the thread > <https://github.com/notifications/unsubscribe-auth/AHrt0jYIWijcj5yVmAB_HlpcIci8joiVks5uWUEegaJpZM4WR0eE> > . >
Author
Owner

@Tzigamm commented on GitHub (Sep 1, 2018):

So it's probably an issue with my install ? I thought the point of composer was to install everything needed for Koel to work out of the box, probably some dependency failed to install... Is there some kind of command to check on the dependencies?

<!-- gh-comment-id:417837600 --> @Tzigamm commented on GitHub (Sep 1, 2018): So it's probably an issue with my install ? I thought the point of composer was to install everything needed for Koel to work out of the box, probably some dependency failed to install... Is there some kind of command to check on the dependencies?
Author
Owner

@phanan commented on GitHub (Sep 1, 2018):

The dependencies should be totally fine. I’m sorry but I’m out of ideas —
Koel streams your file just fine for me. I’d check for apache/nginx
configuration; there might be something funny there.

Kévin Bergue notifications@github.com schrieb am Sa. 1. Sep. 2018 um
13:44:

So it's probably an issue with my install ? I thought the point of
composer was to install everything needed for Koel to work out of the box,
probably some dependency failed to install... Is there some kind of command
to check on the dependencies?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/phanan/koel/issues/795#issuecomment-417837600, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AHrt0uF8v4jCIAL1su7Y5z3i-RQuTUptks5uWizSgaJpZM4WR0eE
.

<!-- gh-comment-id:417843891 --> @phanan commented on GitHub (Sep 1, 2018): The dependencies should be totally fine. I’m sorry but I’m out of ideas — Koel streams your file just fine for me. I’d check for apache/nginx configuration; there might be something funny there. Kévin Bergue <notifications@github.com> schrieb am Sa. 1. Sep. 2018 um 13:44: > So it's probably an issue with my install ? I thought the point of > composer was to install everything needed for Koel to work out of the box, > probably some dependency failed to install... Is there some kind of command > to check on the dependencies? > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/phanan/koel/issues/795#issuecomment-417837600>, or mute > the thread > <https://github.com/notifications/unsubscribe-auth/AHrt0uF8v4jCIAL1su7Y5z3i-RQuTUptks5uWizSgaJpZM4WR0eE> > . >
Author
Owner

@Tzigamm commented on GitHub (Sep 1, 2018):

But if it's Apache related the problem wouldn't appear when using artisan to serve, right ?

<!-- gh-comment-id:417853188 --> @Tzigamm commented on GitHub (Sep 1, 2018): But if it's Apache related the problem wouldn't appear when using artisan to serve, right ?
Author
Owner

@phanan commented on GitHub (Sep 2, 2018):

You’re right. Something with your installation of ffmpeg/php, maybe? I’m
just throwing guesses around here.

Kévin Bergue notifications@github.com schrieb am Sa. 1. Sep. 2018 um
18:31:

But if it's Apache related the problem wouldn't appear why using artisan
to serve, right ?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/phanan/koel/issues/795#issuecomment-417853188, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AHrt0lf5Gi3_PBu6XddoF40h2jKJPlnbks5uWnAfgaJpZM4WR0eE
.

<!-- gh-comment-id:417901415 --> @phanan commented on GitHub (Sep 2, 2018): You’re right. Something with your installation of ffmpeg/php, maybe? I’m just throwing guesses around here. Kévin Bergue <notifications@github.com> schrieb am Sa. 1. Sep. 2018 um 18:31: > But if it's Apache related the problem wouldn't appear why using artisan > to serve, right ? > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/phanan/koel/issues/795#issuecomment-417853188>, or mute > the thread > <https://github.com/notifications/unsubscribe-auth/AHrt0lf5Gi3_PBu6XddoF40h2jKJPlnbks5uWnAfgaJpZM4WR0eE> > . >
Author
Owner

@Tzigamm commented on GitHub (Sep 2, 2018):

Is there some way to check that ? In some log file maybe ?

<!-- gh-comment-id:417923456 --> @Tzigamm commented on GitHub (Sep 2, 2018): Is there some way to check that ? In some log file maybe ?
Author
Owner

@Tzigamm commented on GitHub (Sep 10, 2018):

After coming back from vacation I tried to dig some more, I don't really get what the -vvv option of serve does as it doesn't change anything in laravel.log, is there any other log file for koel ?

<!-- gh-comment-id:419936504 --> @Tzigamm commented on GitHub (Sep 10, 2018): After coming back from vacation I tried to dig some more, I don't really get what the -vvv option of serve does as it doesn't change anything in laravel.log, is there any other log file for koel ?
Author
Owner

@phanan commented on GitHub (Sep 10, 2018):

No there isn’t.

Kévin Bergue notifications@github.com schrieb am Mo. 10. Sep. 2018 um
21:37:

After coming back from vacation I tried to dig some more, I don't really
get what the -vvv option of serve does as it doesn't change anything in
laravel.log, is there any other log file for koel ?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/phanan/koel/issues/795#issuecomment-419936504, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AHrt0q1wFLiPoxAnZ70mGKZEPv2KrScCks5uZnk4gaJpZM4WR0eE
.

<!-- gh-comment-id:419972181 --> @phanan commented on GitHub (Sep 10, 2018): No there isn’t. Kévin Bergue <notifications@github.com> schrieb am Mo. 10. Sep. 2018 um 21:37: > After coming back from vacation I tried to dig some more, I don't really > get what the -vvv option of serve does as it doesn't change anything in > laravel.log, is there any other log file for koel ? > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/phanan/koel/issues/795#issuecomment-419936504>, or mute > the thread > <https://github.com/notifications/unsubscribe-auth/AHrt0q1wFLiPoxAnZ70mGKZEPv2KrScCks5uZnk4gaJpZM4WR0eE> > . >
Author
Owner

@BrookeDot commented on GitHub (Apr 22, 2020):

I'm going to close this as I don't think An was able to replicate the issue and as far as I know it hasn't come up since. There are a few other Flac issues (#561 and #306 for example) but they seem unrelated.

<!-- gh-comment-id:617555252 --> @BrookeDot commented on GitHub (Apr 22, 2020): I'm going to close this as I don't think An was able to replicate the issue and as far as I know it hasn't come up since. There are a few other Flac issues (#561 and #306 for example) but they seem unrelated.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#567
No description provided.