Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

141
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda