[GH-ISSUE #447] JS error in data response #313

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

Originally created by @alex-phillips on GitHub (Sep 12, 2016).
Original GitHub issue: https://github.com/koel/koel/issues/447

As of a couple of days ago, I can no longer load up koel in Chrome or Firefox since the /api/data request now fails.

I'm given the following error in the Chrome console: /api/data net::ERR_INCOMPLETE_CHUNKED_ENCODING.

Firefox is a bit different. I don't get a console error, but instead the /api/data network item states the following: SyntaxError: JSON.parse: end of data when property name was expected at line 1 column 130921 of the JSON data. I can see in the response body in Firefox that the JSON is indeed incomplete.

I don't know if anyone else has experienced this issue or not or why it has all of a sudden happened. It COULD be the size of my library, but if that is the case, would adding a content-length header to the response fix the issue? Maybe the browser is cutting the response short without knowing how long it is.

Originally created by @alex-phillips on GitHub (Sep 12, 2016). Original GitHub issue: https://github.com/koel/koel/issues/447 As of a couple of days ago, I can no longer load up koel in Chrome or Firefox since the `/api/data` request now fails. I'm given the following error in the Chrome console: `/api/data net::ERR_INCOMPLETE_CHUNKED_ENCODING`. Firefox is a bit different. I don't get a console error, but instead the `/api/data` network item states the following: `SyntaxError: JSON.parse: end of data when property name was expected at line 1 column 130921 of the JSON data`. I can see in the response body in Firefox that the JSON is indeed incomplete. I don't know if anyone else has experienced this issue or not or why it has all of a sudden happened. It COULD be the size of my library, but if that is the case, would adding a `content-length` header to the response fix the issue? Maybe the browser is cutting the response short without knowing how long it is.
kerem closed this issue 2026-02-26 02:32:48 +03:00
Author
Owner

@BernardGoldberger commented on GitHub (Sep 12, 2016):

Might be unrelated, but https://github.com/phanan/koel/pull/439 made me to get a 404 every time I was playing a file.

The reason was that since streaming was spelled wrong it was using php for streaming files, when it was fixed it obviously went over to utilizing x-sendfile which needed some extra configuration.

<!-- gh-comment-id:246486974 --> @BernardGoldberger commented on GitHub (Sep 12, 2016): Might be unrelated, but https://github.com/phanan/koel/pull/439 made me to get a 404 every time I was playing a file. The reason was that since `streaming` was spelled wrong it was using `php` for streaming files, when it was fixed it obviously went over to utilizing `x-sendfile` which needed some extra configuration.
Author
Owner

@alex-phillips commented on GitHub (Sep 12, 2016):

Maybe, but this started happening without me even pulling any new, but I did just update to be sure and no change.

<!-- gh-comment-id:246496142 --> @alex-phillips commented on GitHub (Sep 12, 2016): Maybe, but this started happening without me even pulling any new, but I did just update to be sure and no change.
Author
Owner

@alex-phillips commented on GitHub (Sep 12, 2016):

Also, did a fresh install, new DB, and no change.

<!-- gh-comment-id:246507620 --> @alex-phillips commented on GitHub (Sep 12, 2016): Also, did a fresh install, new DB, and no change.
Author
Owner

@BernardGoldberger commented on GitHub (Sep 12, 2016):

Did you check Nginx logs?

<!-- gh-comment-id:246509986 --> @BernardGoldberger commented on GitHub (Sep 12, 2016): Did you check Nginx logs?
Author
Owner

@alex-phillips commented on GitHub (Sep 12, 2016):

Interesting. Not sure if this is relevent, but something was in there:

"/usr/local/var/run/nginx/fastcgi_temp/6/01/0000000016" failed (13: Permission denied) while reading upstream, client: 192.168.1.66, server: alexphillips.duckdns.org, request: "GET /api/data HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.150", referrer: "http://192.168.1.150/music"

<!-- gh-comment-id:246512943 --> @alex-phillips commented on GitHub (Sep 12, 2016): Interesting. Not sure if this is relevent, but something was in there: `"/usr/local/var/run/nginx/fastcgi_temp/6/01/0000000016" failed (13: Permission denied) while reading upstream, client: 192.168.1.66, server: alexphillips.duckdns.org, request: "GET /api/data HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.150", referrer: "http://192.168.1.150/music"`
Author
Owner

@BernardGoldberger commented on GitHub (Sep 12, 2016):

Maybe this

<!-- gh-comment-id:246513286 --> @BernardGoldberger commented on GitHub (Sep 12, 2016): Maybe [this](http://stackoverflow.com/questions/34380360/debugging-partial-file-aka-neterr-incomplete-chunked-encoding)
Author
Owner

@alex-phillips commented on GitHub (Sep 13, 2016):

Yup, looks like it was a permissions issue. Thanks!

<!-- gh-comment-id:246545126 --> @alex-phillips commented on GitHub (Sep 13, 2016): Yup, looks like it was a permissions issue. Thanks!
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#313
No description provided.