New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching error from SatNOGS DB #39

Closed
ppapadeas opened this Issue Jan 1, 2017 · 7 comments

Comments

Projects
None yet
2 participants
@ppapadeas
Copy link

ppapadeas commented Jan 1, 2017

On latest build I am trying to fetch SatNOGS DB transponder data and although the fetch of the JSON is successful, the parsing is not.

2017/01/02 00:20:37   INFO  Ready to fetch modes list from satnogs...
2017/01/02 00:20:37   INFO  modes_update_from_network: File to open /home/liknus/.config/Gpredict/trsp/modes.json
2017/01/02 00:20:37   INFO  modes_update_from_network: Successfully fetched https://db.satnogs.org/api/modes/?format=json
2017/01/02 00:20:37   INFO  modes_update_from_network: Fetched 1 files from network; updating...
2017/01/02 00:20:37   INFO  Ready to fetch transponder list from satnogs
2017/01/02 00:20:37   INFO  trsp_update_from_network: File to open /home/liknus/.config/Gpredict/trsp/transmitters.json
2017/01/02 00:20:38   INFO  trsp_update_from_network: Successfully fetched https://db.satnogs.org/api/transmitters/?format=json
2017/01/02 00:20:38   INFO  trsp_update_from_network: Fetched 1 files from network; updating...
NXJSON PARSE ERROR (345): unexpected chars at }
NXJSON PARSE ERROR (345): unexpected chars at }
NXJSON PARSE ERROR (345): unexpected chars at }
NXJSON PARSE ERROR (345): unexpected chars at }
NXJSON PARSE ERROR (345): unexpected chars at }
NXJSON PARSE ERROR (345): unexpected chars at }
NXJSON PARSE ERROR (345): unexpected chars at }
NXJSON PARSE ERROR (345): unexpected chars at }
NXJSON PARSE ERROR (345): unexpected chars at }
NXJSON PARSE ERROR (345): unexpected chars at }
NXJSON PARSE ERROR (345): unexpected chars at }
NXJSON PARSE ERROR (345): unexpected chars at }

@csete

This comment has been minimized.

Copy link
Owner

csete commented Jan 1, 2017

Oh, I saw this once, but I simply don't remember what the issue was... It wasn't a gpredict issue. Are you sure the file is correctly fetched?

@csete

This comment has been minimized.

Copy link
Owner

csete commented Jan 1, 2017

It may have had to do with SSL, i.e. it only works with libcurl-openssl and not the other options.

@ppapadeas

This comment has been minimized.

Copy link
Author

ppapadeas commented Jan 1, 2017

@csete you mean which ssl I am using for build?

@ppapadeas

This comment has been minimized.

Copy link
Author

ppapadeas commented Jan 1, 2017

Here is the fetched JSON. It seems OK to me.

@csete

This comment has been minimized.

Copy link
Owner

csete commented Jan 1, 2017

Sorry, I was confusing it with something else. Now I recalled where I have seen this issue:
https://community.satnogs.org/t/help-needed-gpredict-integration-with-satnogs-db/687/43
But I do not know why this error occurs.

@ppapadeas

This comment has been minimized.

Copy link
Author

ppapadeas commented Jan 1, 2017

Any ideas on how I can debug this?

@ppapadeas

This comment has been minimized.

Copy link
Author

ppapadeas commented Jan 2, 2017

Built the latest commit and it works like a charm. Closing this.

@ppapadeas ppapadeas closed this Jan 2, 2017

csete added a commit that referenced this issue May 31, 2017

fixed Bug in JSON transponder parser
The behaviour of `sprintf()` is undefined when using the output buffer
as an argument. This may lead to parsers errors like that described in
issue #39. This commit shifts the preparsing of the transponder JSON
file entirely to nxjson, thus further avoiding a possible stack overflow
vulnerability through the `jsn_object` buffer.

Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment