SPrincipal doesn't work when stored in the stable data structures
Closed this issue · 1 comments
saikatdas0790 commented
This is the error I'm seeing
Panicked at 'Unable to decode: Error { kind: UnexpectedEndOfInput }', /home/saikat/.cargo/registry/src/github.com-1ecc6299db9ec823/ic-stable-memory-0.2.2/./src/primitive/s_unsafe_cell.rs:39:58
Here's the minimal reproduction (same repo, updated code):
https://github.com/saikatdas0790/stable_memory_allocator_bug_illustration
Steps to Reproduce error
- dfx start --clean
- dfx deploy --no-wallet
- Open the Candid UI explorer
- Run one of the query methods. No issues
- Run the update method to insert SPrincipal into stable collections
- Run the query method again. Error
- Try the separate methods for
String
type which has no issues running
Let me know if you need any further details. Thank you
seniorjoinu commented
Hello there!
I've updated the library to a new version (0.2.3) - it now contains a fix for this problem.
Thank you very much for reporting it!
Feel free to reopen if anything goes wrong.