(from Discord user: elcharitas) Please help, I am running a local ceramic node and I keep getting this error:

HTTP request to 'http://localhost:7007/api/v0/streams' failed with status 'Internal Server Error': {"error":"The \"list[0]\" argument must be an instance of Buffer or Uint8Array. Received an instance of Array"}

I can’t make sense of what the error is or why it’s popping up. It seems to be an internal issue with the node. For context, I tried running v3.0.4 and v.2.44.0 neither of them works

Further context - This error occurs when I try the following only:

const ceramic = new CeramicClient("http://localhost:7007");
Composite.create({
  ceramic,
  schema,
  index: true,
});

What could be wrong? I can confirm that my schemas are valid graphql schemas

After even more digging and attempting to run the sample app at GitHub - ceramicstudio/ComposeDbExampleApp, (without any modifications) I encountered the same error.

Now, I’m wondering is it a daemon issue?

elcharitas:

I’ve been on this for hours and would be happy to get a hint of some sort. I doubt the issue here is with the composites since I ran the composedb sample app(with no modifications) and still got the same error while the composite are being created and deployed

Now, if the sample app is unstable, then this much I would understand. But if it’s some config I’m missing on my local, I would like to know

P.S Been waiting for an activation mail for about 10-12mins…

[UPDATE]

After trying to programmatically create composites and making no headway, I decided to make use of existing composites and to use composedb cli through wheel . When I ran the cli (v0.5.2), I got the same error here’s the i/o composedb composite:from-model kjzl6hvfrbw6c5ajfmes842lu09vjxu5956e3xq0xk12gp2jcf9s90cagt2god9 --ceramic-url=http://localhost:7007 --output=my-first-composite-single.json

See more details with DEBUG=*
(node:76422) [ERR_INVALID_ARG_TYPE] TypeError Plugin: @composedb/cli Plugin: @composedb/cli Plugin: @composedb/cli Plugin: @composedb/cli Plugin: @composedb/cli Plugin: @composedb/cli Plugin: @composedb/cli Plugin: @composedb/cli Plugin: @composedb/cli [ERR_INVALID_ARG_TYPE]: The "list[0]" argument must be an instance of Buffer or Uint8Array. Received an instance of Array
module: @oclif/core@2.15.0
task: toCached

Paul:

Yes looks like there is an issue with the Ceramic daemon if the error happens with every interaction, but I’ve never seen this error before so without more details about your setup I have no clue where to even start.

elcharitas:

Thanks so much for your help so far, I’ve been moving back and forth and not getting any good results.

however, the code for my project is public. I have no issue sharing the repositories.

GitHub - BlocklanceHQ/ceramic-node - Houses the ceramic node, it’s only a simple call to ceramic daemon but done programmatically…

GitHub - BlocklanceHQ/interface: Decentralized freelance platform - Here’s the interface. I created a vite plugin which essentially creates and deploy composites.

You can view the plugin here https://github.com/BlocklanceHQ/interface/blob/84feb1d904a17f827ac630e04658b10343ec0604/vite.config.ts#L31

P.S is there an issue with the forum’s mail server? I still haven’t gotten mail

BTW, the script which starts the ceramic node is here - https://github.com/BlocklanceHQ/ceramic-node/blob/main/run.mjs

I tried creating an account on the forum earlier today but didn’t get mail. I decided to try log in and resend the mail and I got a dialog with this message An error occurred: The requested URL or resource could not be found. Please hekp and thanks in advance

I can’t seem to attach images on this channel… Sigh

Cole:

Any chance it was caught by a spam filter?

elcharitas:

It wasn’t. It seems the mail isn’t delivering at all

Also, noticed SIWE isn’t working as expected. I tried that (thinking it would aid an easy onboard) but there’s no click action whatsoever. I keep clicking with no responsiveness

Cole:

Ok, thanks for the report. We will look into it. Most of us are off for the weekend and back Monday but I can do a little poking around when I’m home later today

Definitely want to get you set up

Danny B:

I don’t see where ceramic-node actually calls ceramic daemon

elcharitas:

Oh yes, that’s because I’m making use of docker and use the start script in package.json

Danny B:

is admin did actually set? https://github.com/BlocklanceHQ/ceramic-node/blob/main/run.mjs#L38

elcharitas

Yes it is.

Danny B:

otherwise, do you have the logs of where you run ceramic daemon?

elcharitas:

Yes I can get logs.

Would logs from my local container work?

elcharitas:

How do I share the logs? NVM, I had to split the logs below

neonblock-app-1  | 
neonblock-app-1  | > neonblock@1.0.0 start
neonblock-app-1  | > node run.mjs && ceramic daemon --config ./daemon.config.json
neonblock-app-1  | 
neonblock-app-1  | (node:25) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.
neonblock-app-1  | 
neonblock-app-1  | Please migrate your code to use AWS SDK for JavaScript (v3).
neonblock-app-1  | For more information, check the migration guide at https://a.co/7PzMCcy
neonblock-app-1  | (Use `node --trace-warnings ...` to show where the warning was created)
neonblock-app-1  | (node:66) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.
neonblock-app-1  | 
neonblock-app-1  | Please migrate your code to use AWS SDK for JavaScript (v3).
neonblock-app-1  | For more information, check the migration guide at https://a.co/7PzMCcy
neonblock-app-1  | (Use `node --trace-warnings ...` to show where the warning was created)
neonblock-app-1  | [2023-11-25T17:57:23.734Z] IMPORTANT: Starting Ceramic Daemon with @ceramicnetwork/cli package version 3.0.4, with js-ceramic repo git hash a61758a300326df5caaa5e6d5598bbf1018697a7, and with config: 
neonblock-app-1  | {
neonblock-app-1  |   "anchor": {},
neonblock-app-1  |   "http-api": {
neonblock-app-1  |     "cors-allowed-origins": [
neonblock-app-1  |       ".*"
neonblock-app-1  |     ],
neonblock-app-1  |     "admin-dids": [
neonblock-app-1  |       "<removed for security reasons>"
neonblock-app-1  |     ]
neonblock-app-1  |   },
neonblock-app-1  |   "ipfs": {
neonblock-app-1  |     "mode": "bundled",
neonblock-app-1  |     "disable-peer-data-sync": false
neonblock-app-1  |   },
neonblock-app-1  |   "logger": {
neonblock-app-1  |     "log-level": 2,
neonblock-app-1  |     "log-to-files": false
neonblock-app-1  |   },
neonblock-app-1  |   "metrics": {
neonblock-app-1  |     "metrics-exporter-enabled": false
neonblock-app-1  |   },
neonblock-app-1  |   "network": {
neonblock-app-1  |     "name": "inmemory"
neonblock-app-1  |   },
neonblock-app-1  |   "node": {},
neonblock-app-1  |   "state-store": {
neonblock-app-1  |     "mode": "fs",
neonblock-app-1  |     "local-directory": "/app/.ceramic/.ceramic/statestore/"
neonblock-app-1  |   },
neonblock-app-1  |   "indexing": {
neonblock-app-1  |     "db": "<removed for security reasons>",
neonblock-app-1  |     "allow-queries-before-historical-sync": true,
neonblock-app-1  |     "disable-composedb": false,
neonblock-app-1  |     "enable-historical-sync": false
neonblock-app-1  |   }
neonblock-app-1  | }
neonblock-app-1  | [2023-11-25T17:57:23.783Z] IMPORTANT: Connecting to IPFS node available as /ip4/127.0.0.1/tcp/4011/p2p/12D3KooWAhCUF4GmxFWDtZtxRtRXv9LSiuyPqbFdMx53aJhEVDTa, /ip4/192.168.228.2/tcp/4011/p2p/12D3KooWAhCUF4GmxFWDtZtxRtRXv9LSiuyPqbFdMx53aJhEVDTa
neonblock-app-1  | [2023-11-25T17:57:23.797Z] IMPORTANT: Initializing PostgreSQL connection
neonblock-app-1  | [2023-11-25T17:57:23.816Z] IMPORTANT: Connecting to ceramic network 'inmemory' using pubsub topic '/ceramic/inmemory-1521391164'
neonblock-app-1  | [2023-11-25T17:57:28.657Z] IMPORTANT: Connecting to bootstrap peers for network inmemory
neonblock-app-1  | [2023-11-25T17:57:28.714Z] IMPORTANT: Connected to anchor service '<inmemory>' with supported anchor chains ['inmemory:12345']
neonblock-app-1  | [2023-11-25T17:57:28.848Z] WARNING: No pinned streams detected. This is expected if this is the first time this node has been run, but may indicate a problem with the node's persistence setup if it should have pinned streams
neonblock-app-1  | [2023-11-25T17:57:28.852Z] IMPORTANT: Resuming polling for streams with pending anchors
neonblock-app-1  | [2023-11-25T17:57:28.951Z] IMPORTANT: Ceramic API running on 0.0.0.0:7007'
neonblock-app-1  | [2023-11-25T17:57:28.959Z] IMPORTANT: Finished resuming polling for 0 streams which had pending anchors
neonblock-app-1  | [2023-11-25T17:58:23.714Z] WARNING: Did not receive any pubsub messages in more than 60000ms. IPFS did not provide any internal messages, please check your IPFS configuration.
neonblock-app-1  | [2023-11-25T18:07:43.446Z] WARNING: Did not receive any pubsub messages in more than 60000ms. IPFS did not provide any messages, please check your IPFS configuration and ensure your node is well connected to the rest of the Ceramic network.
neonblock-app-1  | [2023-11-26T13:44:05.630Z] ERROR: TypeError: terminated
neonblock-app-1  | [2023-11-26T13:55:35.791Z] WARNING: Did not receive any pubsub messages in more than 60000ms. IPFS did not provide any messages, please check your IPFS configuration and ensure your node is well connected to the rest of the Ceramic network.
neonblock-app-1  | [2023-11-26T14:32:35.945Z] WARNING: Did not receive any pubsub messages in more than 60000ms. IPFS did not provide any messages, please check your IPFS configuration and ensure your node is well connected to the rest of the Ceramic network.
neonblock-app-1  | [2023-11-26T14:48:00.405Z] ERROR: TypeError [ERR_INVALID_ARG_TYPE]: The "list[0]" argument must be an instance of Buffer or Uint8Array. Received an instance of Array

This is what is logged when I try to create composites. I dug around a bit, the error occurs when /api/v0/streams is queried with the created genesis (not entirely sure what genesis means, any luck @dbcfd?

ensure your node is well connected to the rest of the Ceramic network.

Taking a look at this statement. How do I ensure this?

BTW, @core-devs JIC you can help attempts at running the composeDB sample app fails as well. And I get this log:

(base) ➜  ComposeDbExampleApp git:(main) ✗ yarn dev
yarn run v1.22.19
$ node scripts/run.mjs
node:internal/errors:490
    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:399:5)
    at Function.concat (node:buffer:618:13)
    at concat (file:///Users/kriss/Documents/ComposeDbExampleApp/node_modules/uint8arrays/dist/src/concat.js:8:47)
    at get bytes (file:///Users/kriss/Documents/ComposeDbExampleApp/node_modules/@ceramicnetwork/streamid/lib/stream-id.js:82:16)
    at descriptor.get (file:///Users/kriss/Documents/ComposeDbExampleApp/node_modules/mapmoize/dist/getter.js:13:49)
    at StreamID.toString (file:///Users/kriss/Documents/ComposeDbExampleApp/node_modules/@ceramicnetwork/streamid/lib/stream-id.js:96:35)
    at descriptor.value (file:///Users/kriss/Documents/ComposeDbExampleApp/node_modules/mapmoize/dist/method.js:30:57)
    at file:///Users/kriss/Documents/ComposeDbExampleApp/node_modules/@composedb/devtools/dist/composite.js:65:37
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v18.16.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

After many hours of debugging, I think I’m getting clues to why the daemon is failing.
I’d update this channel with my findings

Danny B:

other than ERROR: TypeError: terminated the ceramic daemon seems fine, since you’re doing an inmemory ceramic

What versions of composedb and ceramic are you using?

elcharitas:

Oh and BTW, I finally figured out the issue. Big thanks @dbcfd @Cole @Paul You guys were super helpful. It turns out some package’s dependency is responsible. I’m yet to figure out which package/dependency exactly. I am currently behind schedule due to the whole issue with the node but I did notice something - Installing ceramic cli using yarn causes the dependency issue. As to which one, once I figure it out, I’ll let you all know.

Paul:

Hey @elcharitas, I think I figured out the issue, indirectly caused by the uint8arrays package v4.0.9 that was released 3 days ago (Release v4.0.9 · achingbrain/uint8arrays · GitHub). Could you try using v4.0.8 or another earlier version please?

I opened a PR that should fix the issue on Ceramic’s side (Fix Uint8Array inputs for concatenation calls by PaulLeCam · Pull Request #3048 · ceramicnetwork/js-ceramic · GitHub) if you can have a look please @ukstv @Spencer (he/him)?
Maybe we should push a hotfix to make sure it doesn’t affect more people making fresh installations of Ceramic? cc @Cole @juste