Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
error "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"

I have a async function with a fetch call to an api , in Safari the function works fine with no errors, but in Chrome and Firefox I get the following error:

"SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"

I think it has something to do with the json response not being readable, but I was not sure how to fix this inside of the following function :

async function getUserTracks() {
    try {
      await fetch("https://www.soundpro.city/music/music_all/?format=json") 
        .then(res => res.json())
        .then(data => {
          for (item of data)
            trackNames.push(item['title']),
            trackUrl.push(item['track']),
            albums.push(item['artist_name'])
        })
    } catch(error) {
      console.log(error)
    }
}
getUserTracks();
console.log(trackNames, trackUrl, albums);
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!