Skip to content
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

'[' or '{' expected near 'null' #487

Open
andreasrosdal opened this issue Jul 3, 2022 · 5 comments
Open

'[' or '{' expected near 'null' #487

andreasrosdal opened this issue Jul 3, 2022 · 5 comments

Comments

@andreasrosdal
Copy link
Contributor

I see this error in the logs of www.fciv.net often:

[T001 - 2022/06/28 15:06:28] in get_packet_from_connection_json() [../freeciv/common/networking/packets_json.c::136]: '[' or '{' expected near 'null'
freeciv-web-log-6004.log:1: [T002 - 2022/06/25 00:33:09] in get_packet_from_conne

@andreasrosdal
Copy link
Contributor Author

Can we please improve the error logging here? @cazfi

@cazfi
Copy link
Member

cazfi commented Jul 5, 2022

Well, it already should give you all of the raw contents in the previous line (135), starting with "ERROR: Unable to parse packet: ". Did you cut that out, or isn't it showing in your logs?

@andreasrosdal
Copy link
Contributor Author

freeciv-web-log-6026.log:1: [T001 - 2022/07/04 08:40:04] in get_packet_from_connection_json() [../freeciv/common/networking/packets_json.c::135]: ERROR: Unable to parse packet: null

So it looks like the packet is null.

@andreasrosdal
Copy link
Contributor Author

andreasrosdal commented Jul 5, 2022

So why is the packet null? Is the JavaScript client sending empty packets? Should this be fixed in the Freeciv C server, or Freeciv-proxy?

@cazfi
Copy link
Member

cazfi commented Jul 5, 2022

Upcoming improvements to the server side error detection with json packets may help in investigating this.

E.g. https://osdn.net/projects/freeciv/ticket/44986, https://osdn.net/projects/freeciv/ticket/45000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants