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

Error parsing config.json file - Unexpected end of JSON input #22

Open
Sunkiller-qc opened this issue Oct 2, 2024 · 6 comments
Open

Comments

@Sunkiller-qc
Copy link

Hi,

I'm encountering an error when starting the DIG Propagation Server. Below are the details of the error message:

bash:
2024-10-01 20:51:13 propagation-server-1 | Error: Error parsing your configuration file: [/.dig/config.json]: Unexpected end of JSON input
at File.loadSync (/app/node_modules/nconf/lib/nconf/stores/file.js:170:11)
at Provider.add (/app/node_modules/nconf/lib/nconf/provider.js:136:23)
at Provider.file (/app/node_modules/nconf/lib/nconf/provider.js:63:15)
at NconfManager.initializeConfig (/app/node_modules/@dignetwork/dig-sdk/dist/utils/NconfManager.js:28:25)
Node.js v20.8.0

It seems like the config.json file is malformed, leading to a parsing error with the Unexpected end of JSON input message.

Steps to reproduce the issue:
Start the DIG Propagation server with the current configuration.
The error occurs when loading the /.dig/config.json file.
Expected behavior:
The server should start normally with the configuration file loaded correctly.

Actual behavior:
The server crashes with a parsing error in the config.json file, indicating the file is incomplete or incorrectly formatted.

Additional information:
Node.js version: v20.8.0
File in question: /.dig/config.json
If you need further details or the current configuration file, I can provide it. Please let me know if any corrections to the JSON syntax are needed or if there is an example of a properly formatted configuration file available.

Thank you for your help!

@Sunkiller-qc
Copy link
Author

I would like to add that I used the Windows installation method of SlowestTimelord

@SlowestTimelord
Copy link
Contributor

I recreated the issue at DIG-Network/dig-propagation-server#87, what does your config.json file look like?

@Sunkiller-qc
Copy link
Author

I recreated the issue at DIG-Network/dig-propagation-server#87, what does your config.json file look like?

The file is here but empty.

@MichaelTaylor3D
Copy link
Contributor

This looks to be a widespread problem, happened to me last night as well. I am looking into it.

@ligams
Copy link
Contributor

ligams commented Oct 13, 2024

As file is empty when it happens, this should do the trick for now; did not see where config could be emptied.

22-fastpatch-error-parsing-json.patch

@MichaelTaylor3D
Copy link
Contributor

just catching up on this:

I think the empty file happens when the file is being access and the service gets interrupted, i am currently looking at how to address this.

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

No branches or pull requests

4 participants