Digital-Alchemy-TS / Digital-Alchemy-TS/synapse

Problem booting after upgrade to 24.12.1

Open
#73 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
3
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## 🐜 Bug description

After upgrading to all the latest versions (synapse 24.12.1), I got error:

> bootstrap failed SyntaxError: "undefined" is not valid JSON
> at JSON.parse ()
> at Object.load (/node_modules/@digital-alchemy/synapse/dist/services/sqlite.service.mjs:84:34)
> at onReady (/node_modules/@digital-alchemy/synapse/src/services/storage.service.mts:199:35)
> at (/node_modules/@digital-alchemy/core/src/services/lifecycle.service.mts:76:57)
> at (/node_modules/@digital-alchemy/core/src/helpers/async.mts:19:47)
> at Array.map ()
> at each (/node_modules/@digital-alchemy/core/src/helpers/async.mts:19:26)
> at Object.exec (/node_modules/@digital-alchemy/core/src/services/lifecycle.service.mts:76:15)
> at async runReady (/node_modules/@digital-alchemy/core/src/services/wiring.service.mts:377:20)
> at async bootstrap (/node_modules/@digital-alchemy/core/src/services/wiring.service.mts:520:19)

## 🎙️ Additional details

After changing [line 125 in sqlite.service.mts](https://github.com/Digital-Alchemy-TS/synapse/blob/85cd87844fde9325eeacfe599edf3524434aba86/src/services/sqlite.service.mts#L125) from

`if (data) {`
to
`if (data && data.base_state && data.base_state !== "undefined") {`
it managed to boot and create a new db.

Maybe this or something similar should be included in the source?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.