[GH-ISSUE #1990] [Bug]: 500 Error on /play API in Mobile, but Works on Desktop #1053

Closed
opened 2026-02-26 02:35:05 +03:00 by kerem · 3 comments
Owner

Originally created by @HNIdesu on GitHub (Jul 2, 2025).
Original GitHub issue: https://github.com/koel/koel/issues/1990

Originally assigned to: @phanan on GitHub.

Read the Troubleshooting guide.

  • I have read and followed the Troubleshooting guide

Reproduction steps

1.Open the Koel web app.
2.Either use a mobile device or use Chrome's developer tools to simulate a mobile screen size.
3.Try to play a song.

Expected behavior

The music should start playing as soon as the /play API request is made. The request should be processed correctly, and the music should play without errors.

Actual behavior

The music fails to play. In the console, I see the following error:

GET http://192.168.1.4:8000/play/0e278095-3d7b-4969-b3f4-60de61c58915/1?t=176|yNgY4av83vcbydt4LMNkHR4vrvamiEATfBQUpoVE8ec7c0e3 500 (Internal Server Error)

Logs

GET http://192.168.1.4:8000/play/0e278095-3d7b-4969-b3f4-60de61c58915/1?t=176|yNgY4av83vcbydt4LMNkHR4vrvamiEATfBQUpoVE8ec7c0e3 500 (Internal Server Error)

Koel version

7.8.1

How did you install Koel?

Compiled from source

Additional information

  • Server OS:
  • PHP version:8.4.8
  • Database:
  • Node version:
  • Browser & device:Google Chrome
  • Additional context:
    I found a discrepancy in the way the /play API is requested between the mobile and desktop versions of Koel. The URL used for the API request is different:
    Desktop Request URL:Desktop Request URL:http://192.168.1.4:8000/play/0e278095-3d7b-4969-b3f4-60de61c58915/?t=176|yNgY4av83vcbydt4LMNkHR4vrvamiEATfBQUpoVE8ec7c0e3
    Mobile Request URL:http://192.168.1.4:8000/play/0e278095-3d7b-4969-b3f4-60de61c58915/1?t=176|yNgY4av83vcbydt4LMNkHR4vrvamiEATfBQUpoVE8ec7c0e3
    On the mobile version, the request URL contains an extra /1 segment, which seems to be causing the 500 error when trying to play the music. The desktop version does not include this extra /1 and functions correctly.
Originally created by @HNIdesu on GitHub (Jul 2, 2025). Original GitHub issue: https://github.com/koel/koel/issues/1990 Originally assigned to: @phanan on GitHub. ### Read the Troubleshooting guide. - [x] I have read and followed the Troubleshooting guide ### Reproduction steps 1.Open the Koel web app. 2.Either use a mobile device or use Chrome's developer tools to simulate a mobile screen size. 3.Try to play a song. ### Expected behavior The music should start playing as soon as the /play API request is made. The request should be processed correctly, and the music should play without errors. ### Actual behavior The music fails to play. In the console, I see the following error: ``` GET http://192.168.1.4:8000/play/0e278095-3d7b-4969-b3f4-60de61c58915/1?t=176|yNgY4av83vcbydt4LMNkHR4vrvamiEATfBQUpoVE8ec7c0e3 500 (Internal Server Error) ``` ### Logs GET http://192.168.1.4:8000/play/0e278095-3d7b-4969-b3f4-60de61c58915/1?t=176|yNgY4av83vcbydt4LMNkHR4vrvamiEATfBQUpoVE8ec7c0e3 500 (Internal Server Error) ### Koel version 7.8.1 ### How did you install Koel? Compiled from source ### Additional information - **Server OS**: - **PHP version**:8.4.8 - **Database**: - **Node version**: - **Browser & device**:Google Chrome - **Additional context**: I found a discrepancy in the way the /play API is requested between the mobile and desktop versions of Koel. The URL used for the API request is different: Desktop Request URL:Desktop Request URL:http://192.168.1.4:8000/play/0e278095-3d7b-4969-b3f4-60de61c58915/?t=176|yNgY4av83vcbydt4LMNkHR4vrvamiEATfBQUpoVE8ec7c0e3 Mobile Request URL:http://192.168.1.4:8000/play/0e278095-3d7b-4969-b3f4-60de61c58915/1?t=176|yNgY4av83vcbydt4LMNkHR4vrvamiEATfBQUpoVE8ec7c0e3 On the mobile version, the request URL contains an extra /1 segment, which seems to be causing the 500 error when trying to play the music. The desktop version does not include this extra /1 and functions correctly.
kerem closed this issue 2026-02-26 02:35:05 +03:00
Author
Owner

@phanan commented on GitHub (Jul 2, 2025):

The 1 value instructs Koel to transcode the file before streaming for mobile users. Without showing what the 500 error is, my guess is your ffmpeg installation (required for this process) is faulty.
You can also disable the transcoding by going to the Profile and Preferences tab on mobile.

<!-- gh-comment-id:3026757449 --> @phanan commented on GitHub (Jul 2, 2025): The `1` value instructs Koel to transcode the file before streaming for mobile users. Without showing what the 500 error is, my guess is your ffmpeg installation (required for this process) is faulty. You can also disable the transcoding by going to the Profile and Preferences tab on mobile.
Author
Owner

@HNIdesu commented on GitHub (Jul 2, 2025):

After reviewing your suggestion, I tried correcting the FFMPEG_PATH in the .env file, and that resolved the issue. It turns out the incorrect ffmpeg path was causing the problem, and once I updated it, the transcoding process worked correctly.

I also noticed that there were no specific error messages in the storage/logs/laravel.log, which made it difficult for me to identify the issue initially. But once I fixed the path, everything started functioning as expected.

Thanks again for your support!

<!-- gh-comment-id:3026805863 --> @HNIdesu commented on GitHub (Jul 2, 2025): After reviewing your suggestion, I tried correcting the FFMPEG_PATH in the .env file, and that resolved the issue. It turns out the incorrect ffmpeg path was causing the problem, and once I updated it, the transcoding process worked correctly. I also noticed that there were no specific error messages in the storage/logs/laravel.log, which made it difficult for me to identify the issue initially. But once I fixed the path, everything started functioning as expected. Thanks again for your support!
Author
Owner

@phanan commented on GitHub (Jul 2, 2025):

Glad it worked!

<!-- gh-comment-id:3026881313 --> @phanan commented on GitHub (Jul 2, 2025): Glad it worked!
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#1053
No description provided.