Hi, I’m getting this error when running npm run dev on the ceramic-eas repo.
node:internal/errors:484
ErrorCaptureStackTrace(err);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "list[0]" argument must be an instance of Buffer or Uint8Array. Received an instance of Array
at new NodeError (node:internal/errors:393:5)
at Function.concat (node:buffer:565:13)
at concat (file:///Users/kylehauskins-kaplan/ceramic-eas/node_modules/uint8arrays/dist/src/concat.js:8:47)
at get bytes (file:///Users/kylehauskins-kaplan/ceramic-eas/node_modules/@ceramicnetwork/streamid/lib/stream-id.js:82:16)
at descriptor.get (file:///Users/kylehauskins-kaplan/ceramic-eas/node_modules/mapmoize/dist/getter.js:13:49)
at StreamID.toString (file:///Users/kylehauskins-kaplan/ceramic-eas/node_modules/@ceramicnetwork/streamid/lib/stream-id.js:96:35)
at descriptor.value (file:///Users/kylehauskins-kaplan/ceramic-eas/node_modules/mapmoize/dist/method.js:30:57)
at file:///Users/kylehauskins-kaplan/ceramic-eas/node_modules/@composedb/devtools/dist/composite.js:65:37
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0) {
code: 'ERR_INVALID_ARG_TYPE'
}
Anyone else run into this or have a possible solution?
Maybe there needs to be a similar update to the ceramic-eas code if it uses Uint8Array directly, or maybe it just needs to be updated to use the newest version of the Ceramic libraries.
@spencer locally, I tried updating all the packages to Ceramic 3.0. This fixed the unit8Array issue, but I ran into additional issues down the line when trying to fetch my attestations. I’m not sure if it was because I updated Ceramic or if it was something else.
@paul - one thing I just noticed in my definition.json file is that the indices do not look right.
For example, I just looked at the definition.json output of this repo (which uses different model definitions by the way, so not 1:1) but I noticed that the “indices” key looks like this:
whereas the indices key for Ceramic-EAS repo looks like:
Thanks for the details.
Looks like the ceramic-eas repo uses v0.5 of ComposeDB, so the version of the packages and CLI should be matching, if you use v0.6 of the CLI for example that can explain the issue.
I think the best solution here would be to update the ceramic-eas dependencies to the latest version of Ceramic and ComposeDB.
Regarding the specifics of the issue, ComposeDB v0.5 incorrectly uses model names instead of IDs as keys in the indices record of the encoded definition.
This is fixed in v0.6, but if you try using an encoded definition generated by v0.5 with v0.6, you’ll need to manually edit the encoded composite to replace the model names by IDs, otherwise the indices won’t be handled.
The issue I described in my last message (the screenshots showing the issues I’m seeing with indices not being recognized) was encountered using the packages above.
@mzk did you create the encoded composite definition with ComposeDB v0.5 please?
If so, you’ll need to manually replace the keys of the indices object from model names to model IDs.
@kylekaplan - this should be fixed with the update to several packages. I also reflected those changes in the Ceramic-EAS repo. I’d therefore recommend pulling down the latest changes.
When you have a moment, could you please try again and let us know?
Just a couple more things:
The readme should probably be updated from “make sure you are using node version 16” to “make sure you are using node version 20”
Also, when I click on an attestation from the connections page, It brings me to a page like this: Ethereum Attestation Service - Explorer that just says “Waiting for attestation…” do you know what this is about, should it be showing my attestation details or is this correct behavior?
Great call on updating the README instructions - just changed to v20.
Another great call on the click behavior. The easscan site uses a trad DB to store off-chain attestations (at the moment). I ended up changing this to an endpoint on your local 7007 port that will pull the full document and show to the user in the browser (i.e. http://localhost:7007/api/v0/streams/ + streamID)
Thanks so much for all your help and attention to detail! It’s really appreciated