-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't reopen the same box with identity wallet if local ipfs has been cleared #941
Comments
Might be related to: ceramicstudio/js-3id-did-provider#34 |
@oed forgot what you mentioned before, but yeah looks this is partially resolved by pinning auth data (so won't work for this seed here now, but will for another), don't see where/when that fix was still needs another fix, when not stored locally, takes two opens, before it resolves on second open |
@zachferland why wasn't the authData pinned? |
@oed couldn't remember if you mentioned that, because yeah i dont see where that would have been true |
That's very strange because I explicitly did a patch that fixed this. |
ok where is that patch? couldnt find it so yes seems like it is definitely pinning now, and it partially fixed it, since mike last tried it, now just not resolving on first open, but works on second |
Looks like it is actually pinning: https://github.com/3box/3box-pinning-node/blob/develop/src/pinning.js#L316 |
@msterle - using your example above, it now works in the following case, have existing (used) seed, clear orbit/ipfs, run (it hangs before completing open, probs needs few seconds to get data), exit, run again and now it will work |
@zachferland can this be done programmatically (without user intervention)? |
It appears this is the root issue - ipfs/js-ipfs-bitswap#214 When having to fetch same data/cid from concurrently it just hangs. This seems to happen most frequently with the did docs, as this is used to verify identity on entires and other verifications, ends up having dag.get called concurrently at some point. Might be able to limit this, and can also fix in other ways, probably in 3id resolver, but having that fixed in ipfs would be helpful. Saw same issue in past it looks like, and may or may not be primarily because of did doc. 3box/3box-pinning-node#288 But was causing random test failures. |
@msterle if within same process, i guess not, maybe can spawn child process, exit after few seconds, then run again. I can look at your code as well if you dont have time today, i think either way may be short term hacky somewhere since not sure i will want to change any production to get around it. But can look at quick fix in 3id resolver, and that branch can be pulled in for tests at least. But may still show up in other ways. |
Ok since almost only caused by did doc it appears, easy enough to circumvent in ipfs-did-document with cache to not call dag.get multiple times. So will push that up soon |
@msterle you can now 'npm i github:3box/js-ipfs-did-document#feat/diddoc-cache' and this should be fixed for you for now |
Thanks @zachferland, I tried some of the functional tests and they seem to be working now :) |
Steps to reproduce:
Create a new npm package
npm i 3boc identity-wallet
create index.js with the following:
force-quit (client doesn't halt otherwise)
remove local ipfs and orbit directories with
rm -fr ipfs orbitdb
rerun index.js
The text was updated successfully, but these errors were encountered: