[GH-ISSUE #97] TypeError: Unknown chunk type 50 #29

Closed
opened 2026-05-23 08:39:00 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @kodejuice on GitHub (Sep 13, 2023).
Original GitHub issue: https://github.com/appy-one/acebase-server/issues/97

Originally assigned to: @appy-one on GitHub.

0|index  | [astrava_database] DEBUG THIS: getNode error: TypeError: Unknown chunk type 50 while reading record at "/users/0x2F0d78366BB5fa8b8963B5535Cc332C35A808eD5" @9,906
0|index  |     at NodeReader.readHeader (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:3093:23)
0|index  |     at async NodeReader.getValue (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:2312:13)
0|index  |     at async loadChildValue (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:2423:37)
0|index  |     at async Promise.all (index 0)
0|index  |     at async NodeReader.getValue (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:2467:21)
0|index  |     at async AceBaseStorage.getNode (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:1710:25)
0|index  |     at async AceBaseStorage._writeNodeWithTracking (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/index.js:655:26)
0|index  |     at async AceBaseStorage._updateNode (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:1957:26)
0|index  |     at async AceBaseStorage.setNode (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:1868:27)
0|index  |     at async LocalApi.set (/root/astrava_db_server/node_modules/acebase/dist/cjs/api-local.js:59:24)

The whole users/ object is unreachable because of this error, i cant retrieve /users/0x2F0d78366BB5fa8b8963B5535Cc332C35A808eD5 or even delete it, what could be the cause here?

Originally created by @kodejuice on GitHub (Sep 13, 2023). Original GitHub issue: https://github.com/appy-one/acebase-server/issues/97 Originally assigned to: @appy-one on GitHub. ``` 0|index | [astrava_database] DEBUG THIS: getNode error: TypeError: Unknown chunk type 50 while reading record at "/users/0x2F0d78366BB5fa8b8963B5535Cc332C35A808eD5" @9,906 0|index | at NodeReader.readHeader (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:3093:23) 0|index | at async NodeReader.getValue (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:2312:13) 0|index | at async loadChildValue (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:2423:37) 0|index | at async Promise.all (index 0) 0|index | at async NodeReader.getValue (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:2467:21) 0|index | at async AceBaseStorage.getNode (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:1710:25) 0|index | at async AceBaseStorage._writeNodeWithTracking (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/index.js:655:26) 0|index | at async AceBaseStorage._updateNode (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:1957:26) 0|index | at async AceBaseStorage.setNode (/root/astrava_db_server/node_modules/acebase/dist/cjs/storage/binary/index.js:1868:27) 0|index | at async LocalApi.set (/root/astrava_db_server/node_modules/acebase/dist/cjs/api-local.js:59:24) ``` The whole `users/` object is unreachable because of this error, i cant retrieve `/users/0x2F0d78366BB5fa8b8963B5535Cc332C35A808eD5` or even delete it, what could be the cause here?
Author
Owner

@kodejuice commented on GitHub (Sep 13, 2023):

i cant even delete users

<!-- gh-comment-id:1717579939 --> @kodejuice commented on GitHub (Sep 13, 2023): i cant even delete `users`
Author
Owner

@appy-one commented on GitHub (Sep 20, 2023):

Hi @kodejuice this looks like database corruption caused by multiple processes writing to the same file without (correctly) using IPC. Are you running multiple server instances?

<!-- gh-comment-id:1728281316 --> @appy-one commented on GitHub (Sep 20, 2023): Hi @kodejuice this looks like database corruption caused by multiple processes writing to the same file without (correctly) using IPC. Are you running multiple server instances?
Author
Owner

@kodejuice commented on GitHub (Sep 25, 2023):

I was trying to import from firebase, it was too large so i was doing it chunk by chunk
So I think this was caused by an incomplete write, i fixed it by deleting the .db file and doing it again, works fine now

<!-- gh-comment-id:1733148782 --> @kodejuice commented on GitHub (Sep 25, 2023): I was trying to import from firebase, it was too large so i was doing it chunk by chunk So I think this was caused by an incomplete write, i fixed it by deleting the .db file and doing it again, works fine now
Author
Owner

@appy-one commented on GitHub (Sep 25, 2023):

Awesome, thanks for the update! 👍🏼

Do you like AceBase? 👇🏼

Sponsor AceBase Spread the word contribute

<!-- gh-comment-id:1734051069 --> @appy-one commented on GitHub (Sep 25, 2023): Awesome, thanks for the update! 👍🏼 Do you like AceBase? 👇🏼 [![Sponsor AceBase](https://user-images.githubusercontent.com/26569719/168233053-8e56b243-4140-40ab-9a30-4cb3cc149bfe.svg)](https://github.com/sponsors/appy-one) [![Spread the word](https://user-images.githubusercontent.com/26569719/169265089-3d593555-e1ad-4390-986b-877ac2c38a47.svg)](https://twitter.com/intent/tweet?button=&url=https://github.com/appy-one/acebase&text=I'm+using+@AcebaseRealtime+in+my+project+to+make+my+life+easier!&button=) [![contribute](https://user-images.githubusercontent.com/26569719/169265318-30c4c6a5-7c89-46a0-a7a2-ef433a8192f4.svg)](https://github.com/appy-one/acebase#contributing)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase-server#29
No description provided.