[GH-ISSUE #396] Problem's transcoding FLAC #288

Closed
opened 2026-02-26 02:32:41 +03:00 by kerem · 21 comments
Owner

Originally created by @alex-phillips on GitHub (Aug 8, 2016).
Original GitHub issue: https://github.com/koel/koel/issues/396

Using the Chrome browser (up to date), I just updated my installation to the latest master branch a few hours ago. I can no longer play transcoded FLAC files with the following error appearing in my console:

undefined:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.

I can replicate it with any of my FLAC tracks. Was working earlier today, but after the update, this problem started. Can try and look into debugging it later, but thought I'd go ahead and file an issue.

Originally created by @alex-phillips on GitHub (Aug 8, 2016). Original GitHub issue: https://github.com/koel/koel/issues/396 Using the Chrome browser (up to date), I just updated my installation to the latest master branch a few hours ago. I can no longer play transcoded FLAC files with the following error appearing in my console: ``` undefined:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found. ``` I can replicate it with any of my FLAC tracks. Was working earlier today, but after the update, this problem started. Can try and look into debugging it later, but thought I'd go ahead and file an issue.
kerem closed this issue 2026-02-26 02:32:41 +03:00
Author
Owner

@BernardGoldberger commented on GitHub (Aug 8, 2016):

I had the same error after a force sync yesterday, but I don't believe it had anything to do with FLAC files, I will double check.

I had the error when I ran an unsuccessful force sync with my audio files located in a new folder, but I solved everything by pointing the path to the old location.

<!-- gh-comment-id:238352440 --> @BernardGoldberger commented on GitHub (Aug 8, 2016): I had the same error after a force sync yesterday, but I don't believe it had anything to do with `FLAC` files, I will double check. I had the error when I ran an unsuccessful force sync with my audio files located in a new folder, but I solved everything by pointing the path to the old location.
Author
Owner

@alex-phillips commented on GitHub (Aug 8, 2016):

@bdgold I double checked some of the files and the paths are correct in the database though. Running a force sync isn't really ideal. With 40k+ files, it takes HOURS to do a full sync.

Any information on how to fix this without running that would be awesome.

Also, unusual this issue is only on FLAC files. Everything else I've tried seems fine.

<!-- gh-comment-id:238362616 --> @alex-phillips commented on GitHub (Aug 8, 2016): @bdgold I double checked some of the files and the paths are correct in the database though. Running a force sync isn't really ideal. With 40k+ files, it takes HOURS to do a full sync. Any information on how to fix this without running that would be awesome. Also, unusual this issue is only on FLAC files. Everything else I've tried seems fine.
Author
Owner

@BernardGoldberger commented on GitHub (Aug 8, 2016):

@alex-phillips

40k+

Are those music files or just files to scan?

<!-- gh-comment-id:238397542 --> @BernardGoldberger commented on GitHub (Aug 8, 2016): @alex-phillips > 40k+ Are those music files or just files to scan?
Author
Owner

@alex-phillips commented on GitHub (Aug 8, 2016):

Music files

<!-- gh-comment-id:238401514 --> @alex-phillips commented on GitHub (Aug 8, 2016): Music files
Author
Owner

@BernardGoldberger commented on GitHub (Aug 8, 2016):

Hmmmm, I had a music library with 48k songs and loading koel was a disaster, are you experiencing the same?

<!-- gh-comment-id:238407150 --> @BernardGoldberger commented on GitHub (Aug 8, 2016): Hmmmm, I had a music library with 48k songs and loading koel was a disaster, are you experiencing the same?
Author
Owner

@alex-phillips commented on GitHub (Aug 8, 2016):

Loading koel is a disaster with my library. I wrote my own front end that is an iTunes clone (I posted a premature demo in a previous PR) and it runs as smoothly as a native app. I didn't build it to be mobile friendly though. If you're interested in trying it out let me know and I can shoot you a link. Uses koel backbend.

As far as this issue goes, this issue does occur in the official koel code and front-end.

<!-- gh-comment-id:238408357 --> @alex-phillips commented on GitHub (Aug 8, 2016): Loading koel is a disaster with my library. I wrote my own front end that is an iTunes clone (I posted a premature demo in a previous PR) and it runs as smoothly as a native app. I didn't build it to be mobile friendly though. If you're interested in trying it out let me know and I can shoot you a link. Uses koel backbend. As far as this issue goes, this issue does occur in the official koel code and front-end.
Author
Owner

@BernardGoldberger commented on GitHub (Aug 8, 2016):

Please do, I would like to give it a try.

<!-- gh-comment-id:238408911 --> @BernardGoldberger commented on GitHub (Aug 8, 2016): Please do, I would like to give it a try.
Author
Owner

@BernardGoldberger commented on GitHub (Aug 8, 2016):

Same issue by me with FLAC

<!-- gh-comment-id:238411658 --> @BernardGoldberger commented on GitHub (Aug 8, 2016): Same issue by me with `FLAC`
Author
Owner

@BernardGoldberger commented on GitHub (Aug 9, 2016):

I just changed $transcode = to null and it works again.

Once it works there is still a 500 error on getting info.

Update

Even with null not all are working, some still give the same error.

<!-- gh-comment-id:238416273 --> @BernardGoldberger commented on GitHub (Aug 9, 2016): I just changed [`$transcode =` to `null`](https://github.com/phanan/koel/blob/master/app/Http/Controllers/API/SongController.php#L25) and it works again. Once it works there is still a 500 error on getting info. **Update** Even with `null` not all are working, some still give the same error.
Author
Owner

@phanan commented on GitHub (Aug 9, 2016):

I acknowledge this. Some changes in the recent Chrome version(s?) seem to have broken transcoding-streaming. Will certainly look for a workaround when I have time.

<!-- gh-comment-id:238482680 --> @phanan commented on GitHub (Aug 9, 2016): I acknowledge this. Some changes in the recent Chrome version(s?) seem to have broken transcoding-streaming. Will certainly look for a workaround when I have time.
Author
Owner

@BernardGoldberger commented on GitHub (Aug 9, 2016):

@phanan I believe there are some breaking changes in github.com/phanan/koel@65d403f857
on github.com/phanan/koel@a87b456f9b everything plays as it used to for me.

@alex-phillips can you run git checkout a87b456f9b140447c3c25f6a16f396a4d658e323 and see if it works again.

On master I have the issue in Firefox as well

<!-- gh-comment-id:238523390 --> @BernardGoldberger commented on GitHub (Aug 9, 2016): @phanan I believe there are some breaking changes in https://github.com/phanan/koel/commit/65d403f857ddf43d92aaa334d6091e38bb535327 on https://github.com/phanan/koel/commit/a87b456f9b140447c3c25f6a16f396a4d658e323 everything plays as it used to for me. @alex-phillips can you run `git checkout a87b456f9b140447c3c25f6a16f396a4d658e323` and see if it works again. On master I have the issue in Firefox as well
Author
Owner

@alex-phillips commented on GitHub (Aug 9, 2016):

@bdgold That checkout does work for me. I can play FLAC now.

Site note: is the email on your Github page good to contact you with the frontend information? (@bdgold)

<!-- gh-comment-id:238581037 --> @alex-phillips commented on GitHub (Aug 9, 2016): @bdgold That checkout does work for me. I can play FLAC now. Site note: is the email on your Github page good to contact you with the frontend information? (@bdgold)
Author
Owner

@BernardGoldberger commented on GitHub (Aug 9, 2016):

Yes.

<!-- gh-comment-id:238581442 --> @BernardGoldberger commented on GitHub (Aug 9, 2016): Yes.
Author
Owner

@BernardGoldberger commented on GitHub (Aug 10, 2016):

I have now the weirdest thing.

I was doing some tests with Koel and changed the STREAMING_METHOD to php, after that I'm unable to get Opera to play any files, I believe I have tried everything. Firefox and Chrome are working.

The error? undefined:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.

UPDATE

Opera just magically just began working again, I don't know why, but maybe it was cloudflare clearing some cache that I forgot to purge when I was done testing :-/

<!-- gh-comment-id:238735406 --> @BernardGoldberger commented on GitHub (Aug 10, 2016): I have now the weirdest thing. I was doing some tests with Koel and changed the `STREAMING_METHOD` to `php`, after that I'm unable to get Opera to play any files, I believe I have tried everything. Firefox and Chrome are working. The error? `undefined:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.` **UPDATE** Opera just magically just began working again, I don't know why, but maybe it was cloudflare clearing some cache that I forgot to purge when I was done testing :-/
Author
Owner

@phanan commented on GitHub (Aug 10, 2016):

Damn. Will check this out as soon as I can. Thanks for letting me know.

On Tuesday, August 9, 2016, bdgold notifications@github.com wrote:

Yes.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/phanan/koel/issues/396#issuecomment-238581442, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AHrt0r1agld23ypkschlV9h2sBpwS5UOks5qeJYggaJpZM4JfYxi
.

<!-- gh-comment-id:238735768 --> @phanan commented on GitHub (Aug 10, 2016): Damn. Will check this out as soon as I can. Thanks for letting me know. On Tuesday, August 9, 2016, bdgold notifications@github.com wrote: > Yes. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > https://github.com/phanan/koel/issues/396#issuecomment-238581442, or mute > the thread > https://github.com/notifications/unsubscribe-auth/AHrt0r1agld23ypkschlV9h2sBpwS5UOks5qeJYggaJpZM4JfYxi > .
Author
Owner

@BernardGoldberger commented on GitHub (Aug 10, 2016):

@phanan does Koel check the STREAMING_METHOD on every play request? or does it store it somewhere?

<!-- gh-comment-id:238738026 --> @BernardGoldberger commented on GitHub (Aug 10, 2016): @phanan does Koel check the `STREAMING_METHOD` on every play request? or does it store it somewhere?
Author
Owner

@phanan commented on GitHub (Aug 10, 2016):

@bdgold It checks for environment variables on every request, as it should.

<!-- gh-comment-id:238738321 --> @phanan commented on GitHub (Aug 10, 2016): @bdgold It checks for environment variables on every request, as it should.
Author
Owner

@BernardGoldberger commented on GitHub (Aug 10, 2016):

as it should.

Right.

So if I were to set it to some gibberish STREAMING_METHOD=gibberish what should the expected behavior be?

<!-- gh-comment-id:238738996 --> @BernardGoldberger commented on GitHub (Aug 10, 2016): > as it should. Right. So if I were to set it to some gibberish `STREAMING_METHOD=gibberish` what should the expected behavior be?
Author
Owner

@phanan commented on GitHub (Aug 10, 2016):

        // After checking for transcoding…
        switch (env('STREAMING_METHOD')) {
            case 'x-sendfile':
                return (new XSendFileStreamer($song))->stream();
            case 'x-accel-redirect':
                return (new XAccelRedirectStreamer($song))->stream();
            default:
                return (new PHPStreamer($song))->stream();
        }
<!-- gh-comment-id:238739170 --> @phanan commented on GitHub (Aug 10, 2016): ``` // After checking for transcoding… switch (env('STREAMING_METHOD')) { case 'x-sendfile': return (new XSendFileStreamer($song))->stream(); case 'x-accel-redirect': return (new XAccelRedirectStreamer($song))->stream(); default: return (new PHPStreamer($song))->stream(); } ```
Author
Owner

@BernardGoldberger commented on GitHub (Aug 10, 2016):

Does default: return PHPStreamer for anything that is not 'x-sendfile': or 'x-accel-redirect':? or unless its set to one of the 3 it should fail?

<!-- gh-comment-id:238742697 --> @BernardGoldberger commented on GitHub (Aug 10, 2016): Does `default:` return `PHPStreamer` for anything that is not `'x-sendfile':` or `'x-accel-redirect':`? or unless its set to one of the 3 it should fail?
Author
Owner

@phanan commented on GitHub (Aug 10, 2016):

It's for anything that's not x-sendfile or x-accel-redirect.

<!-- gh-comment-id:238749751 --> @phanan commented on GitHub (Aug 10, 2016): It's for anything that's not `x-sendfile` or `x-accel-redirect`.
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#288
No description provided.