mirror of
https://github.com/koel/koel.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #1990] [Bug]: 500 Error on /play API in Mobile, but Works on Desktop #1053
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#1053
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
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:
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
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.
@phanan commented on GitHub (Jul 2, 2025):
The
1value 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.
@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!
@phanan commented on GitHub (Jul 2, 2025):
Glad it worked!