6

I have tried scrobbling to my account on last.fm using three different methods and have come across the same error each time. All the information including auth information was provided yet the call to scrobble to my account still failed.. What is going on?! How can I fix this error and begin seeing accepted meta-data?

I am using Javascript, but an explanation of why this is happening and how I can fix the problem on a more abstract level is much appreciated as well! Thanks!

Success: {"scrobbles":{
            "@attr":{
                "accepted":0,"ignored":1
             },"scrobble":{
                "artist":{
                  "corrected":"0","#text":"AOA"
                 },"ignoredMessage":{
                   "code":"1","#text":""
                 },"albumArtist":{
                   "corrected":"0","#text":""
                 },"timestamp":"1468573491638","album":{
                      "corrected":"0"
                 },"track":{
                   "corrected":"0","#text":"Good Luck"
          }}}}
Edwin0258
  • 181
  • 1
  • 8

1 Answers1

11

The problem was that my timestamp was in miliseconds and not seconds.

it was just Date.now() instead of Math.floor(Date.now() / 1000).

Cheers!

Edwin0258
  • 181
  • 1
  • 8
  • Amazing. Thank you. For someone else in future, reference from API doc says: timestamp[i] (Required) : The time the track started playing, in UNIX timestamp format (integer number of seconds since 00:00:00, January 1st 1970 UTC). This must be in the UTC time zone. – Priya Ranjan Singh Aug 10 '20 at 15:26
  • It would have been way too easy for the last.fm developers too simply add a correct messages why it has been ignored :D Thanks for giving this hint, now I can get my scrobbles right. – jmizv Jun 24 '23 at 12:09