SyntaxError: Unexpected end of JSON input
Hello ! My MqDockerUp keeps rebooting.
17.09.2023 08:51:20 [error] MqDockerUp stopped due to an error
17.09.2023 08:51:20 [error] object
17.09.2023 08:51:20 [error] SyntaxError: Unexpected end of JSON input
at JSON.parse (
The problem you are getting seems to be happening here: https://github.com/MichelFR/MqDockerUp/blob/11bb787160d15c2aad1d80c8cebf3c15447df193/src/services/DockerService.ts#L23
That’s strange, your MqDockerUp is getting changed from the docker sock. But it cannot parse it’s data. im gonna surround this part of the code with a try/fetch so that it wouldn’t stop the entire process. But this should be further inspection.
Im gonna come back to you when I got some news/ a new build
Hello, same issue here:
`19.01.2024 22:46:01 [error] MqDockerUp stopped due to an error
19.01.2024 22:46:01 [error] object
19.01.2024 22:46:02 [error] SyntaxError: Unexpected end of JSON input
at JSON.parse (
[email protected] start`
Hello, I've the same issue here. It's working well on a Synology DSM 7 docker. All the informations are well available in HA.
But the MqDockerUp docker is rebooting every 5min. Any updates on this bug ?
Thanks
I suspect that the error I get at startup is a similar symptom on the same issue:
mqdockerup | 19.04.2025 22:07:53 [info] Connected to the database.
mqdockerup | 19.04.2025 22:07:53 [info] MQTT client successfully connected
mqdockerup | 19.04.2025 22:07:53 [info] Checking for removed containers...
mqdockerup | 19.04.2025 22:07:53 [info] Database initialized successfully
mqdockerup | 19.04.2025 22:07:53 [info] Checking for containers...
mqdockerup | 19.04.2025 22:07:53 [info] Finished checking for containers
mqdockerup | 19.04.2025 22:07:53 [info] Next check in 5 minutes
mqdockerup | 19.04.2025 22:07:53 [verbose] Setting up startContainerCheckingInterval with value 5m
mqdockerup | 19.04.2025 22:07:53 [info] Checking for image updates...
mqdockerup | 19.04.2025 22:07:53 [info] Shutting down MqDockerUp...
mqdockerup | 19.04.2025 22:07:53 [info] Closing MQTT connection...
mqdockerup | 19.04.2025 22:07:53 [info] MQTT connection closed successfully
mqdockerup | 19.04.2025 22:07:53 [error] MqDockerUp stopped due to an error
mqdockerup | 19.04.2025 22:07:53 [error] object
mqdockerup | 19.04.2025 22:07:53 [error] SyntaxError: Unexpected token { in JSON at position 2839
mqdockerup | at JSON.parse (<anonymous>)
mqdockerup | at IncomingMessage.<anonymous> (/app/src/services/DockerService.ts:41:28)
mqdockerup | at IncomingMessage.emit (node:events:517:28)
mqdockerup | at IncomingMessage.emit (node:domain:489:12)
mqdockerup | at addChunk (node:internal/streams/readable:368:12)
mqdockerup | at readableAddChunk (node:internal/streams/readable:341:9)
mqdockerup | at IncomingMessage.Readable.push (node:internal/streams/readable:278:10)
mqdockerup | at HTTPParser.parserOnBody (node:_http_common:131:24)
mqdockerup | at Socket.socketOnData (node:_http_client:541:22)
mqdockerup | at Socket.emit (node:events:517:28)