int2001 / DXClusterAPI

Simple JSON API for DXCluster
3 stars 4 forks source link

Weird "unexpected end of JSON" error #13

Closed fred-corp closed 5 months ago

fred-corp commented 5 months ago

Hi,

I tried to run the DXClusterAPI for my CloudLog installation, but after following the installation steps, I can't find any data on <ip:port>/dxcache/spots>, and I get the following error in the server console :

$ node index.js
listener started on Port 8092
connected
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:4292:19)
    at successSteps (node:internal/deps/undici/undici:4274:27)
    at fullyReadBody (node:internal/deps/undici/undici:2695:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async consumeBody (node:internal/deps/undici/undici:4283:7)
    at async postData (/root/Downloads/DXClusterAPI/index.js:264:12)
    at async /root/Downloads/DXClusterAPI/index.js:222:11
{
  spotter: 'SQ4O',
  spotted: 'YF9EBT',
  frequency: 21275,
  message: undefined,
  when: 2024-04-06T16:37:38.286Z
}
undefined

When I go to <cloudlog URL>/index.php/api/lookup I get the following data (I guess everything is null because I don't post any data to lookup) :

{ "callsign": "", "dxcc": null, "dxcc_lat": null, "dxcc_long": null, "dxcc_cqz": null, "name": "", "gridsquare": "", "location": "", "iota_ref": "", "state": "", "us_county": "", "qsl_manager": "", "bearing": "", "workedBefore": false, "lotw_member": false, "suffix_slash": "" }

How could I fix this issue ?

Note : CloudLog seems to fetch the data from https://log.jo30.de/dxcache just fine

Thanks !

int2001 commented 5 months ago

ahh. the cluster runs only with wavelog, since cloudlog isn't capable of resolving the Call to the needed informations.

Either u continue using dxc.jo30.de or switch to wavelog ;)

HTH

fred-corp commented 5 months ago

Aah, yes, this makes sense :)

Is it easy to migrate user data from cloudlog to wavelog ?

int2001 commented 5 months ago

Sure. Follow this Tutorial: https://github.com/wavelog/Wavelog/wiki/How-to-migrate-Cloudlog-to-Wavelog

fred-corp commented 5 months ago

Thanks ! I should have RTFM ^^’