[GH-ISSUE #700] Unable to enter after login #494

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

Originally created by @daniele-athome on GitHub (Dec 18, 2017).
Original GitHub issue: https://github.com/koel/koel/issues/700

Just upgraded to v3.7.0 (all worked in previous version), I am unable to login. More precisely, I can log in but after receiving songs data through /api/data (received correctly, at least as in correct JSON data and 200 OK response) the browser shows the login screen again.

More in depth with debugging (minified!) JavaScript using Chrome dev tools, I discovered that an exception is thrown while handling the response from /api/data:

Cannot read property 'map' of undefined
TypeError: Cannot read property 'map' of undefined
    at Object.byIds (https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:24:16961)
    at objectifySongs (https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:24:9569)
    at l (https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:1:8086)
    at vs (https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:2:17422)
    at Object.init (https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:24:9364)
    at https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:24:15238
    at <anonymous>

My library is currently empty because I thought that could be an issue (I wanted to do a new music scan from scratch, so I truncated tables songs, artists, albums, playlists, playlist_song, interactions). Before I did that, the exception was thrown by another piece of code (unfortunately I can't reproduce that because I don't have a backup of my database before I did the truncates), specifically in the setupArtist function, complaining about a call to function every on an undefined object in a function called getImage (which I couldn't find in the repo, maybe it's dinamically generated or a result of the minification). I'll write an example of the call stack as I remember it:

Cannot read property 'every' of undefined
TypeError: Cannot read property 'every' of undefined
    at getImage (...)
    ...
    at setupArtist (...)
    ...
    at l (...)
    at vs (...)
    at Object.init (https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:24:9364)

If you think you can use it to properly debug and fix the issue, I could setup a debug version of Koel on my notebook and try to debug that with non-minified Javascript.

Originally created by @daniele-athome on GitHub (Dec 18, 2017). Original GitHub issue: https://github.com/koel/koel/issues/700 Just upgraded to v3.7.0 (all worked in previous version), I am unable to login. More precisely, I can log in but after receiving songs data through `/api/data` (received correctly, at least as in correct JSON data and 200 OK response) the browser shows the login screen again. More in depth with debugging (minified!) JavaScript using Chrome dev tools, I discovered that an exception is thrown while handling the response from `/api/data`: ``` Cannot read property 'map' of undefined TypeError: Cannot read property 'map' of undefined at Object.byIds (https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:24:16961) at objectifySongs (https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:24:9569) at l (https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:1:8086) at vs (https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:2:17422) at Object.init (https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:24:9364) at https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:24:15238 at <anonymous> ``` My library is currently empty because I thought that could be an issue (I wanted to do a new music scan from scratch, so I truncated tables songs, artists, albums, playlists, playlist_song, interactions). Before I did that, the exception was thrown by another piece of code (unfortunately I can't reproduce that because I don't have a backup of my database before I did the truncates), specifically in the `setupArtist` function, complaining about a call to function `every` on an undefined object in a function called `getImage` (which I couldn't find in the repo, maybe it's dinamically generated or a result of the minification). I'll write an example of the call stack as I remember it: ``` Cannot read property 'every' of undefined TypeError: Cannot read property 'every' of undefined at getImage (...) ... at setupArtist (...) ... at l (...) at vs (...) at Object.init (https://music.casaricci.it/public/js/app.d050d6bc43a986ed79b0.js:24:9364) ``` If you think you can use it to properly debug and fix the issue, I could setup a debug version of Koel on my notebook and try to debug that with non-minified Javascript.
kerem closed this issue 2026-02-26 02:33:22 +03:00
Author
Owner

@phanan commented on GitHub (Dec 18, 2017):

Truncating the database can be an issue, as some of the ID's (Unknown Artist/Album's for example) are hard-coded. That said, I'm not sure why a javascript error should be thrown – been using my own installation of Koel with no problems.

<!-- gh-comment-id:352462728 --> @phanan commented on GitHub (Dec 18, 2017): Truncating the database can be an issue, as some of the ID's (Unknown Artist/Album's for example) are hard-coded. That said, I'm not sure why a javascript error should be thrown – been using my own installation of Koel with no problems.
Author
Owner

@daniele-athome commented on GitHub (Dec 18, 2017):

That said, I'm not sure why a javascript error should be thrown – been using my own installation of Koel with no problems.

Thanks. I'll try a fresh installation on my server and - if the problem still occurs - I'll setup a development installation to properly debug it.

<!-- gh-comment-id:352463383 --> @daniele-athome commented on GitHub (Dec 18, 2017): > That said, I'm not sure why a javascript error should be thrown – been using my own installation of Koel with no problems. Thanks. I'll try a fresh installation on my server and - if the problem still occurs - I'll setup a development installation to properly debug it.
Author
Owner

@daniele-athome commented on GitHub (Dec 19, 2017):

Turned out it was an old version of yarn. You should specify the minimum required version of NodeJS and Yarn in your docs (no, "latest version" is not a version :P)
Updating and reinstalling everything from scratch (using Yarn 1.3.2) solved the issue.

EDIT: the release note might also use an indication of the versions of the base tools that it needs.

<!-- gh-comment-id:352815940 --> @daniele-athome commented on GitHub (Dec 19, 2017): Turned out it was an old version of yarn. You should specify the minimum required version of NodeJS and Yarn in your docs (no, "latest version" is not a version :P) Updating and reinstalling everything from scratch (using Yarn 1.3.2) solved the issue. EDIT: the release note might also use an indication of the versions of the base tools that it needs.
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#494
No description provided.