Getting a "model is not indexed on this node" error following the setup docs

I am trying to step someone through the setup process & I’ve run the following commands:

I’m running through them to make sure they work:

  • CERAMIC_ENABLE_EXPERIMENTAL_COMPOSE_DB=true npx @ceramicnetwork/cli daemon
  • composedb did:generate-private-key > composedb.private.key
  • composedb did:from-private-key $(cat composedb.private.key) > composedb.admin.did
  • code ~/.ceramic/daemon.config.json
  • Paste your admin DID in an array under http-api admin-dids.
  • composedb composite:from-model kjzl6hvfrbw6c7keo17n66rxyo21nqqaa9lh491jz16od43nokz7ksfcvzi6bwc --output=my-first-composite.json
  • composedb composite:deploy my-first-composite.json --ceramic-url=http://localhost:7007 --did-private-key=$(cat composedb.private.key)
  • composedb composite:compile my-first-composite.json runtime-composite.json
  • composedb graphql:server --ceramic-url=http://localhost:7007 --graphiql --port=5001 runtime-composite.json --did-private-key=$(cat composedb.private.key)

All that seemed to execute successfully, but when I run the following query in GraphiQL:

{
  simpleProfileIndex(first: 10) {
    edges {
      node {
        displayName
      }
    }
  }
}

I get the error back:

HTTP request to 'http://localhost:7007/api/v0/collection'
failed with status 'Internal Server Error': {"error":
"Query failed: Model kjzl6hvfrbw6c7keo17n66rxyo21nqqaa9lh491jz16od43nokz7ksfcvzi6bwc
is not indexed on this node"}

What’d I miss?

1 Like

hey dys, the team is traveling back from our offsite - someone will get back to you ASAP

When you run the composedb composite:deploy command do you get any errors? What does the output look like?

@dysbulic’s daemon config file that was shared on discord:

{
  "anchor": {},
  "http-api": {
    "cors-allowed-origins": [
      ".*"
    ],
    "admin-dids": [
      "did:key:z6MkuBMHzuYEKuA6H9VBesJcwm7iTLHQQZAjnN4hbKeFQMnq",
      "did:key:z6MkfTq7FKj3mU7LgA4PaU959oLZ1pqUJPTfHyC3pk5KRu4v"
    ]
  },
  "ipfs": {
    "mode": "remote",
    "host": "http://localhost:5001"
  },
  "logger": {
    "log-level": 2,
    "log-to-files": false
  },
  "metrics": {
    "metrics-exporter-enabled": false
  },
  "network": {
    "name": "testnet-clay"
  },
  "node": {},
  "state-store": {
    "mode": "fs",
    "local-directory": "/home/dys/.ceramic/statestore/"
  },
  "indexing": {
    "db": "sqlite:///home/dys/.ceramic/indexing.sqlite",
    "allow-queries-before-historical-sync": true
  }
}

Ok, my problem was I had v0.3.0-rc.1 of @composedb/cli installed. Running the most recent version resolves the indexing issue.

When I run npx @composedb/cli@0.3.0 graphql:server --ceramic-url=http://localhost:7007 --graphiql --port=5001 runtime-composite.json --did-private-key=$(cat composedb.private.key) (or npx @composedb/cli@latest), I get the following error:

:information_source: Using DID did:key:z6MkfTq7FKj3mU7LgA4PaU959oLZ1pqUJPTfHyC3pk5KRu4v
:heavy_multiplication_x: Cannot use GraphQLScalarType “String” from another module or realm.

Ensure that there is only one instance of “graphql” in the node_modules directory. If different versions of “graphql” are the dependencies of other relied on modules, use “resolutions” to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate “graphql” modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and spurious results.

@paul any ideas on the above?

This is an issue with package managers/app setup, see Cannot use GraphQLScalarType "CeramicCommitID" from another module or realm and similar posts that might help address the specifics.

This is an issue with package managers/app setup

Y’all have two different versions of the graphql library in your CLI’s search path. You need to run yarn list | grep graphql in the project directory to determine what those versions are & then add a "resolutions": { "graphql": "2.3.4" } (or whatever the most recent used version is) to your package.json to force everything to use that version.

(Or update the graphql libraries to all be the same version.)

Then rerun yarn.

I’d submit a PR if I knew where to find the code? What’s the repo?

@dysbulic were you able to get this working? FYI @paul for the question about duplicate graphql libraries.

The master branch of the GitHub repo works.