appy-one / acebase

A fast, low memory, transactional, index & query enabled NoSQL database engine and server for node.js and browser with realtime data change notifications
MIT License
477 stars 27 forks source link

DEBUG THIS: getNodeInfo error Error: Invalid child key #201

Closed donl closed 1 year ago

donl commented 1 year ago

I'm still trying to make a simple reproducible case, but here is the error message, if it is helpful. I was calling a query with one nested child too many.

 [default] DEBUG THIS: getNodeInfo error Error: Invalid child key "adminthreadlcespnb300503b5pfagj" for path "draft/admin". Keys cannot contain control characters or any of the following characters: \ / [ ]
     at file:///app/node_modules/acebase-core/dist/esm/path-info.js:59:27
     at Array.forEach (<anonymous>)
     at PathInfo.child (file:///app/node_modules/acebase-core/dist/esm/path-info.js:51:18)
     at PathInfo.getChildPath (file:///app/node_modules/acebase-core/dist/esm/path-info.js:26:35)
     at NodeReader.getChildInfo (file:///app/node_modules/acebase/dist/esm/storage/binary/index.js:2942:36)
     at async AceBaseStorage.getNodeInfo (file:///app/node_modules/acebase/dist/esm/storage/binary/index.js:1824:33)
     at async AceBaseStorage.getNode (file:///app/node_modules/acebase/dist/esm/storage/binary/index.js:1690:30)
     at async file:///app/node_modules/acebase/dist/esm/query.js:72:26
     at async AsyncTaskBatch.execute (file:///app/node_modules/acebase/dist/esm/async-task-batch.js:22:28)
 [default] DEBUG THIS: getNode error: Error: Invalid child key "adminthreadlcespnb300503b5pfagj" for path "draft/admin". Keys cannot contain control characters or any of the following characters: \ / [ ]
     at file:///app/node_modules/acebase-core/dist/esm/path-info.js:59:27
     at Array.forEach (<anonymous>)
     at PathInfo.child (file:///app/node_modules/acebase-core/dist/esm/path-info.js:51:18)
     at PathInfo.getChildPath (file:///app/node_modules/acebase-core/dist/esm/path-info.js:26:35)
     at NodeReader.getChildInfo (file:///app/node_modules/acebase/dist/esm/storage/binary/index.js:2942:36)
     at async AceBaseStorage.getNodeInfo (file:///app/node_modules/acebase/dist/esm/storage/binary/index.js:1824:33)
     at async AceBaseStorage.getNode (file:///app/node_modules/acebase/dist/esm/storage/binary/index.js:1690:30)
     at async file:///app/node_modules/acebase/dist/esm/query.js:72:26
     at async AsyncTaskBatch.execute (file:///app/node_modules/acebase/dist/esm/async-task-batch.js:22:28)
 file:///app/node_modules/acebase-core/dist/esm/data-reference.js:869
             throw new Error(err);
                   ^

 Error: Error: Invalid child key "adminthreadlcespnb300503b5pfagj" for path "draft/admin". Keys cannot contain control characters or any of the following characters: \ / [ ]
     at file:///app/node_modules/acebase-core/dist/esm/data-reference.js:869:19

 Node.js v18.11.0
appy-one commented 1 year ago

Interesting, let me know!

appy-one commented 1 year ago

Hi @donl, any news about this?

donl commented 1 year ago

It reproduces in a project / db file combination. I wasn't able to reproduce it in an example project with an export of the (hopefully) relevant data. I'll try again with a copy of the original db file.

appy-one commented 1 year ago

Hi @donl I hope this maybe has been fixed by recent updates. Closing the issue for now, please reopen if it is still an issue!