Skip to content

fix(network): serve raw items.dat from disk to prevent byte offset shifts - #258

Merged
JadlionHD merged 2 commits into
StileDevs:mainfrom
Phoenix-rat:main
Sep 12, 2026
Merged

JadlionHD merged 2 commits into
StileDevs:mainfrom
Phoenix-rat:main

Conversation

@Phoenix-rat

Copy link
Copy Markdown
Contributor

Fixes the annoying "download failed" error and the malformed CDN requests on v5.56 and v5.57.

Basically, RefreshItemData.ts was using the reconstructed in-memory buffer (this.base.items.content) for Windows/Android clients. It looks like our internal parser drops a byte when re-encoding (probably missing a new struct flag in 5.56 and v5.57), which causes a 1-byte offset shift on the client side. This is why the client was trying to request item description strings instead of actual texture paths from the CDN (like GET /growtopia/hip can survive...).

This PR just changes it so we serve the raw items.dat straight from the disk for all platforms, exactly like we were already doing for macOS. Bypassing the in-memory re-encoding completely solves the shift and the download errors.

Code changes:
Changed RefreshItemData.ts to use readFileSync(join(datDir, this.base.cdn.itemsDatName)) for the fallback case instead of this.base.items.content.

@Phoenix-rat

Copy link
Copy Markdown
Contributor Author

FUCK ESLINT IT WORKS!

@JadlionHD

Copy link
Copy Markdown
Member

I'll take a note on this, since i currently working on new rewrite GrowServer

@JadlionHD
JadlionHD merged commit 3d3fdd2 into StileDevs:main Sep 12, 2026
0 of 2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants