epoupon / lms

Lightweight Music Server. Access your self-hosted music using a web interface.
http://lms-demo.poupon.dev
GNU General Public License v3.0
1.14k stars 62 forks source link

ListenBrainz scrobbler not updated and error in the log #325

Closed seblucas closed 1 year ago

seblucas commented 1 year ago

Hi,

Sorry for being such a PITA :(. After fixing most of my issues I finally enable Listenbrainz yesterday -> Everything went fine yesterday and all the music I listened with LMS Web UI is available in Listenbrainz.

This morning I used Foobar2000 to use my Hifi system (with the foo_listenbrainz plugin) -> Everything went fine and listenbrainz is updated.

This afternoon, I went back to using my headset so I've gone back to LMS Web UI and the currently played song is shown in listenbrainz web page but nothing in my recent listen list.

Here is my log (I'm using latest docker image 3.39 updated today from 3.37) :

ARG = /usr/bin/lms
ARG = --config=/var/lms/wt_config.xml
ARG = --docroot=/usr/share/lms/docroot/;/resources,/css,/images,/js,/favicon.ico
ARG = --approot=/usr/share/lms/approot
ARG = --deploy-path=/
ARG = --resources-dir=/usr/share/Wt/resources
ARG = --http-port=5082
ARG = --http-address=0.0.0.0
ARG = --threads=2
[2023-May-05 14:18:38.922] 1 - [info] "config: reading Wt config file: /var/lms/wt_config.xml (location = '/usr/bin/lms')"
[2023-May-05 14:18:38.923] 1 - [info] - [UTILS] Starting IO context with 2 threads...
[2023-May-05 14:18:38.923] 1 - [info] - [DB] Creating connection pool on file /var/lms/lms.db
[2023-May-05 14:18:38.936] 1 - [error] - [DB] Cannot create tables: Sqlite3: create table "cluster_type" (
  "id" integer primary key autoincrement,
  "version" integer not null,
  "name" text not null,
  "scan_settings_id" bigint,
  constraint "fk_cluster_type_scan_settings" foreign key ("scan_settings_id") references "scan_settings" ("id") on delete cascade deferrable initially deferred
): table "cluster_type" already exists
[2023-May-05 14:18:38.936] 1 - [info] - [DB] Database version = 40, LMS binary version = 40
[2023-May-05 14:18:38.950] 1 - [info] - [COVER] JPEG export quality = 75
[2023-May-05 14:18:38.950] 1 - [info] - [COVER] Default cover path = '/usr/share/lms/approot//images/unknown-cover.jpg'
[2023-May-05 14:18:38.950] 1 - [info] - [COVER] Max cache size = 30000000
[2023-May-05 14:18:38.950] 1 - [info] - [COVER] Max file size = 10000000
[2023-May-05 14:18:38.950] 1 - [info] - [COVER] Preferred file names: cover,front
[2023-May-05 14:18:38.968] 1 - [info] - [METADATA] Creating TagLib parser with read style = accurate
[2023-May-05 14:18:38.968] 1 - [info] - [SCROBBLING] Starting service...
[2023-May-05 14:18:38.968] 1 - [info] - [RECOMMENDATION] Reloading recommendation engines...
[2023-May-05 14:18:38.968] 1 - [info] - [RECOMMENDATION] Initializing engine 'clusters'...
[2023-May-05 14:18:38.968] 1 - [info] - [RECOMMENDATION] Initializing engine 'clusters': complete
[2023-May-05 14:18:38.968] 1 - [info] - [RECOMMENDATION] Recommendation engines loaded!
[2023-May-05 14:18:38.969] 1 - [info] - [DB UPDATER] Scheduling next scan at Sat May  6 03:00:00 2023

[2023-May-05 14:18:38.968] 1 - [info] - [SCROBBLING] [listenbrainz] - Starting Listens synchronizer, maxSyncListenCount = 1000, _syncListensPeriod = 1 hours
[2023-May-05 14:18:38.969] 1 - [info] - [SCROBBLING] [listenbrainz] - Starting Feedbacks synchronizer, maxSyncFeedbackCount = 1000, _syncFeedbacksPeriod = 1 hours
[2023-May-05 14:18:38.969] 1 - [info] - [SCROBBLING] [listenbrainz] - Starting ListenBrainz scrobbler... API endpoint = 'https://api.listenbrainz.org'
[2023-May-05 14:18:38.969] 1 - [info] - [SCROBBLING] Service started!
[2023-May-05 14:18:38.969] 1 - [info] - [MAIN] Starting server...
[2023-May-05 14:18:38.969] 1 - [info] "WServer/wthttp: initializing built-in wthttpd"
[2023-May-05 14:18:38.972] 1 - [info] "wthttp: started server: http://0.0.0.0:5082"
[2023-May-05 14:18:38.973] 1 - [info] - [MAIN] Now running...
[2023-May-05 14:19:09.988] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [error] - [SCROBBLING] [listenbrainz] - Cannot parse 'listen': Type error: value is String, expected Number
[2023-May-05 14:19:09.989] 1 - [info] - [SCROBBLING] [listenbrainz] - Sync done for user 'XXXX', fetched: 25, matched: 0, imported: 0
[2023-May-05 14:19:10.138] 1 - [info] - [SCROBBLING] [listenbrainz] - Feedback sync done for user 'XXXX', fetched: 6, matched: 5, imported: 0
seblucas commented 1 year ago

Listenbrainz web got updated so it was certainly on their end. I don't know if my error in the log are relevant or not

epoupon commented 1 year ago

Thans for reporting!

I just tested and I confirm LMS can send listens and sync them afterwards.

So looks like LMS is not able to import stuff pushed on LB by your other player, foobar2000. Would you accept to mail me your listenbrainz username so that I can check what may be wrong?

seblucas commented 1 year ago

Done

epoupon commented 1 year ago

Thanks! I managed to reproduce. The "tracknumber" in the additional_info element is encoded using a string instead of an integer for foobar2k entries. According to https://listenbrainz.readthedocs.io/en/latest/users/json.html#fetching-listen-json it should be an integer.

I guess foobar2k encodes this using a string, but this is strange LB as I would have expected LB to parse/validate/reencode each value

epoupon commented 1 year ago

I opened an issue here https://github.com/phw/foo_listenbrainz2/issues/12 @seblucas I guess it is what you use?

And I will update LMS code to fallback on string parsing