Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listenbrainz scrobbling doesn't seem to work #168

Closed
icyphox opened this issue Nov 5, 2021 · 14 comments
Closed

Listenbrainz scrobbling doesn't seem to work #168

icyphox opened this issue Nov 5, 2021 · 14 comments

Comments

@icyphox
Copy link

icyphox commented Nov 5, 2021

Hi,

I'm using substreamer on iOS, which seems to be hitting the /rest/scrobble.view endpoint, but I don't see any scrobbles in Listenbrainz. I'm certain the token is correct -- it works elsewhere.

Here's the output from gonic:

2021/11/05 18:34:09 response  200  for `/rest/scrobble.view?u=admin&t=[...]&s=[...]&v=1.13.0&c=substreamer&f=json&id=tr-727&time=null&submission=true`

The time parameter is null, for whatever reason. Could that be why?

@spasma
Copy link

spasma commented Nov 5, 2021

I think #162 is related, looks like there is a fix, but I think the docker container is not updated yet.

@icyphox
Copy link
Author

icyphox commented Nov 5, 2021 via email

@spasma
Copy link

spasma commented Nov 5, 2021

@icyphox Ah, I saw something with time-param in that issue as well.
FYI: #162 (comment)

@sentriz
Copy link
Owner

sentriz commented Nov 5, 2021

interesting @icyphox
would you mind building from master again and scrobble? check to see if you see some "error scobbling" in the logs.
also the time=null should be fine. gonic will read that to mean the current time instead

also could you please confirm the listenbrainz keys?

$ sqlite3 path/to/gonic.db "select listen_brainz_url, listen_brainz_token from users where name='<username>'"

@icyphox
Copy link
Author

icyphox commented Nov 6, 2021

Built it from master again. Looks like we're onto something.
I'm seeing this:

error when submitting: non >= 400: 400: listenbrainz error

And yes, my Listenbrainz key exists in the db.

@sentriz
Copy link
Owner

sentriz commented Nov 6, 2021

thanks @icyphox could you try again with master? added more logging

@icyphox
Copy link
Author

icyphox commented Nov 6, 2021

Okay, here's what I got this time:

2021/11/06 21:15:39 received listenbrainz response
2021/11/06 21:15:39 HTTP/2.0 400 Bad Request
Content-Length: 294
Access-Control-Allow-Methods: OPTIONS, POST
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: X-RateLimit-Remaining,X-RateLimit-Limit,X-RateLimit-Reset,X-RateLimit-Reset-In
Access-Control-Max-Age: 21600
Content-Type: application/json
Date: Sat, 06 Nov 2021 15:45:39 GMT
Server: openresty
X-Ratelimit-Limit: 30
X-Ratelimit-Remaining: 29
X-Ratelimit-Reset: 1636213540
X-Ratelimit-Reset-In: 1

{"code":400,"error":"JSON document must not contain listened_at while submitting playing_now.","listened_at":1636213538,"track_metadata":{"additional_info":{"track_length":220,"track_mbid":"","tracknumber":1},"artist_name":"Dayseeker","release_name":"Sleeptalk (Deluxe)","track_name":"Drunk"}}

2021/11/06 21:15:39 error when submitting: >= 400: 400: listenbrainz error

@sentriz
Copy link
Owner

sentriz commented Nov 6, 2021

thanks, could you try again now

@icyphox
Copy link
Author

icyphox commented Nov 6, 2021

Appears to be a similar error again, I'm afraid:

2021/11/06 21:28:12 HTTP/2.0 400 Bad Request
Content-Length: 285
Access-Control-Allow-Methods: OPTIONS, POST
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: X-RateLimit-Remaining,X-RateLimit-Limit,X-RateLimit-Reset,X-RateLimit-Reset-In
Access-Control-Max-Age: 21600
Content-Type: application/json
Date: Sat, 06 Nov 2021 15:58:12 GMT
Server: openresty
X-Ratelimit-Limit: 30
X-Ratelimit-Remaining: 29
X-Ratelimit-Reset: 1636214300
X-Ratelimit-Reset-In: 8

{"code":400,"error":"JSON document must not contain listened_at while submitting playing_now.","listened_at":0,"track_metadata":{"additional_info":{"track_length":220,"track_mbid":"","tracknumber":1},"artist_name":"Dayseeker","release_name":"Sleeptalk (Deluxe)","track_name":"Drunk"}}

@sentriz
Copy link
Owner

sentriz commented Nov 6, 2021

ah yes. how about now? force pushed. commit is @95731d7

@icyphox
Copy link
Author

icyphox commented Nov 6, 2021

Looks like we have a winner! Works now. 🎉

@sentriz
Copy link
Owner

sentriz commented Nov 6, 2021

nice! that is the case of the "now playing" notifications working. could you also confirm normal scrobbles are working? I think just by letting your player play a few songs and see if the history shows up in listenbrainz

@icyphox
Copy link
Author

icyphox commented Nov 6, 2021

Yup, I can confirm normal scrobbles work as well.

@sentriz
Copy link
Owner

sentriz commented Nov 6, 2021

Cool! Thanks for your help with this .
Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants