position-api icon indicating copy to clipboard operation
position-api copied to clipboard

Response parse error.

Open nkkrishnakfk opened this issue 1 year ago • 2 comments

[1] A request was started: https://www.marinetraffic.com/en/reports?asset_type=vessels&columns=time_of_latest_position:desc,flag,shipname,photo,recognized_next_port,reported_eta,reported_destination,current_port,imo,ship_type,show_on_live_map,area,lat_of_latest_position,lon_of_latest_position&time_of_latest_position_between=60,525600&near_me=51.74190,3.89773,2 [1] A request was started: https://www.marinetraffic.com/cdn-cgi/styles/cf.errors.css [1] undefined:1 [1] [1] ^ [1] [1] SyntaxError: Unexpected token '<', "... is not valid JSON [1] at JSON.parse () [1] at HTTPResponse.json (/Users/krishna.kumar/Workspace/ocean-open/position-api/node_modules/puppeteer-core/lib/cjs/puppeteer/api/HTTPResponse.js:111:21) [1] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [1] at async /Users/krishna.kumar/Workspace/ocean-open/position-api/dist/legacy/lib/puppeteer.js:24:26 [1] [1] Node.js v21.6.2

Looks like its trying to parse http as a json. Anything missed here ?

nkkrishnakfk avatar Mar 04 '24 09:03 nkkrishnakfk

hey thanks for your report. I don't have time at the moment to look into it but Ill try to resolve this in this month :)

niczem avatar Apr 06 '24 14:04 niczem

I'm experiencing the same issue when I try getVesselsInArea, getVesselsNearMe and getVesselsInPort. The 'last position' does work for me

Michelle431 avatar Jun 24 '24 16:06 Michelle431