-
Notifications
You must be signed in to change notification settings - Fork 41
Sample fails with a strange error, atleast to me #114
Comments
@vongohren is this running the sample un-modified? If not can you share what you are running? |
@tplooker good question. I ran the sample unmodified and it worked. But the only difference I see is that I used higher versions of jsonld and jsonld-signatures. Might that be some reason it is not working anymore?
I can confirm that upgrading the sample to these libs breaks the sample with the same error. Code im runningCode
|
@vongohren can you try the latest sample, it has just been updated to use the v0.9.0 release? |
@tplooker I can confirm to have the latest master. |
We've not updated and tested this library against the packages that you're relying on. For now, my suggestion would be to remain on the versions used within the samples. Even still, my experience has shown me that the redefined protected terms errors appears when the context files are not quite correct. Can you post the link to the proof that you're working with so that I can take a look at the contexts that are being loaded by the documentLoader and debug it? The alternative approach that I've learned is to go into the node_modules/json-ld library, search for the error and modify it within the node_modules folder to look like this: https://github.com/digitalbazaar/jsonld.js/pull/421/files This will allow the console to spit out the term that's being redefined when you're getting the error back. Also, after looking at the code you published I'm almost certain this is an issue because you're using both the security-v3-unstable context and the BBSv1 Context. If you do the suggest above then you'll be able to confirm if this is actually an issue with the BBS terms that are defined in both. |
@kdenhartog using this code I ended up using the transient dependency you guys bring along. https://gist.github.com/vongohren/92753c7dc8e8be7ed219c2d184c624aa It means that using the newest json-ldsignature version is still not up to speed I guess Thanks for the debugging introduction, I will take that with me! What are the main reason things fail when JSON LD lib updates? Is it imssing contexts? |
@vongohren with the merge of #135 can you try things out again and let me know if you are still facing issues? |
So I did solve it earlier by depending on your transient dependency with "jsonld-signatures" But adding "jsonld-signatures": "^8.0.2", the same error comes. @tplooker ☝️ |
Did a bit of debugging on this. There's two issues I've found so far. For some reason the way the The second issue is your documentLoader doesn't have a DID resolver in it so even if you did have a fully qualified DID URL in there it wouldn't dereference properly. Use something like this documentLoader: https://github.com/decentralized-identity/jsonld-document-loader See here for an example of how to get that configured properly so that the resolver is plugged into the documentLoader properly. https://github.com/transmute-industries/vc.transmute.world/blob/49d3499aa6266088ca2cef6691bd9b1ac961fd35/packages/cli/src/util/documentLoader.ts |
This is currently working: I have general concerns with the approach digital bazaar is taking with documentLoaders... they are either a resolver or a dereferencer... I have been treating documentLoaders as resolvers... not dereferencers... but recent changes digital bazaar has made to their libraries appear to changing documentLoaders to dereferencers... |
This happens when I try to make a derive proof, and im quite new to JSON LD and BBS, so cannot say much on why it happens. Anyone here have an idea?
The text was updated successfully, but these errors were encountered: