Skip to content
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

ERROR: Error: Invalid 'model' metadata property in Model stream #2365

Open
lyd0 opened this issue Aug 9, 2022 · 2 comments
Open

ERROR: Error: Invalid 'model' metadata property in Model stream #2365

lyd0 opened this issue Aug 9, 2022 · 2 comments

Comments

@lyd0
Copy link

lyd0 commented Aug 9, 2022

Describe the bug

1

When I call the ModelInstanceDocument.create method , The server reported an error : ERROR: Error: Invalid 'model' metadata property in Model stream: kh4q0kq8h3j3zb52p8gjcayuwrdpt

27c7f6961342920aa41f4e49f638047

2

But apparently the string kh4q0kq8h3j3zb52p8gjcayuwrdpt doesn't match my model stream id (kjzl6hvfrbw6c59v2kgsss471xbd0wzl2pvy6pj22mcxrkxuzz85vnfbjohw1yo)

Then I added this id to the configuration file: daemon.config.json

  "indexing": {
    "db": "postgres://",
    "allow-queries-before-historical-sync": true,
    "models": [
            "kjzl6hvfrbw6c59v2kgsss471xbd0wzl2pvy6pj22mcxrkxuzz85vnfbjohw1yo",
            "kh4q0kq8h3j3zb52p8gjcayuwrdpt"
    ]

The problem is not solved at this time

3

Then I modified the source code and it works fine

d0bcaa80fa38e4cdbca82e7463905bd
disable this line:
https://github.com/ceramicnetwork/js-ceramic/blob/develop/packages/stream-model-handler/src/model-handler.ts#L126

Ceramic versions
2.5.0 and 2.5.0-rc.0 and 2.5.0-rc.1

Machine, OS, browser information (please complete the following information):
ubuntu

Additional context

If I change the order of the models in the configuration file ,eg.:

  "indexing": {
    "db": "postgres://",
    "allow-queries-before-historical-sync": true,
    "models": [
            "kh4q0kq8h3j3zb52p8gjcayuwrdpt",
            "kjzl6hvfrbw6c59v2kgsss471xbd0wzl2pvy6pj22mcxrkxuzz85vnfbjohw1yo"
    ]

The server report ERROR: Error while loading commit CID bafyxccyabfug233emvwc25rr from IPFS for stream kh4q0kq8h3j3zb52p8gjcayuwrdpt:HTTPError: potentially insecure hash functions not allowed
Even modifying the source code won't fix it

@lyd0
Copy link
Author

lyd0 commented Aug 10, 2022

@ukstv @pawartur hello can you help me

@stbrody
Copy link
Contributor

stbrody commented Aug 10, 2022

Sorry, these libraries aren't really ready to use yet and may have bugs or rough edges.

That error is from a mismatch between the client and server libraries. Make sure both your server (@ceramicnetwork/cli) and client (@ceramicnetwork/http-client, @ceramicnetwork/stream-model, and @ceramic/stream-model-instance) packages are all on the most recent RC version, and then re-create all your Models and ModelInstanceDocuments and that should resolve things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants