IceDynamix / reliquary-archiver

tool to create a relic export from network packets of a certain turn-based anime game
MIT License
167 stars 17 forks source link

Initializing Database - Failed to Read JSON #44

Closed Daniel-Poke closed 3 weeks ago

Daniel-Poke commented 1 month ago

In the last 48 hrs launching reliquary-archiver_x64_v0.1.7 is crashing on the initializing database step:

2024-07-29T11:20:55.387278Z  INFO config_map: reliquary_archiver::export::fribbels: initializing database from online sources, this might take a while...
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: "Failed to read JSON: invalid type: sequence, expected a map at line 1 column 1" }
Location: src\export\fribbels.rs:302

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Warning: SpanTrace capture is Unsupported.
Ensure that you've setup a tracing-error ErrorLayer and the semver versions are compatible

As others have mentioned, having a local/cached version of the database would go a long way in helping those with bad connections, proxy requirements or unhandled database changes.

ManuSwaG commented 1 month ago

I can confirm I have the same issue:

PS D:\Data\Games\Nonsteam\Honkai star rail Relic Importer> .\reliquary-archiver_x64_v0.1.7.exe
2024-07-29T14:08:11.872611Z  INFO config_map: reliquary_archiver::export::fribbels: initializing database from online sources, this might take a while...
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: "Failed to read JSON: invalid type: sequence, expected a map at line 1 column 1" }
Location: src\export\fribbels.rs:302

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Warning: SpanTrace capture is Unsupported.
Ensure that you've setup a tracing-error ErrorLayer and the semver versions are compatible
RaccoonBlade commented 1 month ago

I have the same issue

Arthra-X commented 1 month ago

Same exact issue here, I agree with what Daniel-Poke said

Daniel-Poke commented 1 month ago

Had a quick peek in source, the database in question is probably related to the static files in this repository from Dimbreath.

There's a fairly large update from ~20hrs ago which is probably what knocked out the downloading/parsing.

zekesulastin commented 1 month ago

Per Fribbels on Discord and tying into the warning on the optimizer Import page:

scanner will be down until after the 2.4 patch, if anyone wants to run it before the new reliquary update, clone and change https://github.com/IceDynamix/reliquary-archiver/blob/main/src/export/fribbels.rs#L32 to: const BASE_RESOURCE_URL: &str = "https://raw.githubusercontent.com/Dimbreath/StarRailData/df89dd1138e751c8b1a62c92fc2bafac421dc18f"; then build/run as normal

IMG_4752

Daniel-Poke commented 1 month ago

Thanks for passing on this information. Confirmed that using the commit hash edit suggested will get it opening and listening again.

This would make for a pretty useful command line argument as well, if a local version of the db is more trouble than it's worth:

reliquary-archiver.exe --db-hash "df89dd1138e751c8b1a62c92fc2bafac421dc18f"

EDIT: Now that the game version has also updated, the login payload is different so it can't generate a JSON output regardless 😔 I guess something like this is only useful when DimBreath's file collection updates early 🤷‍♂️