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

problem with cloud build #1

Open
jchris opened this issue Dec 16, 2024 · 8 comments
Open

problem with cloud build #1

jchris opened this issue Dec 16, 2024 · 8 comments
Assignees

Comments

@jchris
Copy link
Contributor

jchris commented Dec 16, 2024

For some reason the cloud build give an error

2024-12-16T22:08:42.754Z [info] Attempting to connect to MCP server fp-mcp...
2024-12-16T22:08:42.757Z [info] Attempting to connect to MCP server notes...
2024-12-16T22:08:42.762Z [info] Connected to MCP server fp-mcp!
2024-12-16T22:08:42.762Z [info] Connected to MCP server notes!
2024-12-16T22:09:04.501Z [info] Attempting to connect to MCP server fp-mcp...
2024-12-16T22:09:04.503Z [info] Attempting to connect to MCP server notes...
2024-12-16T22:09:04.508Z [info] Connected to MCP server fp-mcp!
2024-12-16T22:09:04.510Z [info] Connected to MCP server notes!
2024-12-16T22:09:04.669Z [error] Error in MCP connection to server fp-mcp: [
  {
    "code": "invalid_union",
    "unionErrors": [
      {
        "issues": [
          {
            "code": "invalid_literal",
            "expected": "2.0",
            "path": [
              "jsonrpc"
            ],
            "message": "Invalid literal value, expected \"2.0\""
          },
          {
            "code": "invalid_union",
            "unionErrors": [
              {
                "issues": [
                  {
                    "code": "invalid_type",
                    "expected": "string",
                    "received": "undefined",
                    "path": [
                      "id"
                    ],
                    "message": "Required"
                  }
                ],
                "name": "ZodError"
              },
              {
                "issues": [
                  {
                    "code": "invalid_type",
                    "expected": "number",
                    "received": "undefined",
                    "path": [
                      "id"
                    ],
                    "message": "Required"
                  }
                ],
                "name": "ZodError"
              }
            ],
            "path": [
              "id"
            ],
            "message": "Invalid input"
          },
          {
            "code": "invalid_type",
            "expected": "string",
            "received": "undefined",
            "path": [
              "method"
            ],
            "message": "Required"
          },
          {
            "code": "unrecognized_keys",
            "keys": [
              "module",
              "level",
              "error",
              "msg"
            ],
            "path": [],
            "message": "Unrecognized key(s) in object: 'module', 'level', 'error', 'msg'"
          }
        ],
        "name": "ZodError"
      },
      {
        "issues": [
          {
            "code": "invalid_literal",
            "expected": "2.0",
            "path": [
              "jsonrpc"
            ],
            "message": "Invalid literal value, expected \"2.0\""
          },
          {
            "code": "invalid_type",
            "expected": "string",
            "received": "undefined",
            "path": [
              "method"
            ],
            "message": "Required"
          },
          {
            "code": "unrecognized_keys",
            "keys": [
              "module",
              "level",
              "error",
              "msg"
            ],
            "path": [],
            "message": "Unrecognized key(s) in object: 'module', 'level', 'error', 'msg'"
          }
        ],
        "name": "ZodError"
      },
      {
        "issues": [
          {
            "code": "invalid_literal",
            "expected": "2.0",
            "path": [
              "jsonrpc"
            ],
            "message": "Invalid literal value, expected \"2.0\""
          },
          {
            "code": "invalid_union",
            "unionErrors": [
              {
                "issues": [
                  {
                    "code": "invalid_type",
                    "expected": "string",
                    "received": "undefined",
                    "path": [
                      "id"
                    ],
                    "message": "Required"
                  }
                ],
                "name": "ZodError"
              },
              {
                "issues": [
                  {
                    "code": "invalid_type",
                    "expected": "number",
                    "received": "undefined",
                    "path": [
                      "id"
                    ],
                    "message": "Required"
                  }
                ],
                "name": "ZodError"
              }
            ],
            "path": [
              "id"
            ],
            "message": "Invalid input"
          },
          {
            "code": "invalid_type",
            "expected": "object",
            "received": "undefined",
            "path": [
              "result"
            ],
            "message": "Required"
          },
          {
            "code": "unrecognized_keys",
            "keys": [
              "module",
              "level",
              "error",
              "msg"
            ],
            "path": [],
            "message": "Unrecognized key(s) in object: 'module', 'level', 'error', 'msg'"
          }
        ],
        "name": "ZodError"
      },
      {
        "issues": [
          {
            "code": "invalid_literal",
            "expected": "2.0",
            "path": [
              "jsonrpc"
            ],
            "message": "Invalid literal value, expected \"2.0\""
          },
          {
            "code": "invalid_union",
            "unionErrors": [
              {
                "issues": [
                  {
                    "code": "invalid_type",
                    "expected": "string",
                    "received": "undefined",
                    "path": [
                      "id"
                    ],
                    "message": "Required"
                  }
                ],
                "name": "ZodError"
              },
              {
                "issues": [
                  {
                    "code": "invalid_type",
                    "expected": "number",
                    "received": "undefined",
                    "path": [
                      "id"
                    ],
                    "message": "Required"
                  }
                ],
                "name": "ZodError"
              }
            ],
            "path": [
              "id"
            ],
            "message": "Invalid input"
          },
          {
            "code": "invalid_type",
            "expected": "object",
            "received": "string",
            "path": [
              "error"
            ],
            "message": "Expected object, received string"
          },
          {
            "code": "unrecognized_keys",
            "keys": [
              "module",
              "level",
              "msg"
            ],
            "path": [],
            "message": "Unrecognized key(s) in object: 'module', 'level', 'msg'"
          }
        ],
        "name": "ZodError"
      }
    ],
    "path": [],
    "message": "Invalid input"
  }
]
@mabels
Copy link

mabels commented Dec 17, 2024

Hi,

Could you pls be more specific about how to reproduce this --- I did not look into the src, and for now, I don't understand the surrounding architecture.

Thx

@mabels
Copy link

mabels commented Dec 17, 2024

btw this should not be required:

await db.ready();

If it changed something there is a bug in the core.

@mabels
Copy link

mabels commented Dec 17, 2024

and could we have at least a monade to pass in the db instead of globally declaring?

This is more of a bit of code hygiene

@necrodome
Copy link

@jchris clear your ~/.fireproof and try again.
rm -rf ~/.fireproof

@mabels
Copy link

mabels commented Dec 18, 2024

That sounds like a sledgehammer solution.
But what could be the reason to apply such measures?

@necrodome
Copy link

It is, but in my case it was keyid mismatch and wanted to see the app error.

I haven't dug deeper, but with cloud gateway enabled, keybag is in its own dist folder (kb-dir-FireproofCloud) for each invocation but data is centralized in ~/.fireproof?

@mabels
Copy link

mabels commented Dec 18, 2024

That should not be the case --- I did not configure that in that way.

Should we have a look at it together?

@jimpick
Copy link

jimpick commented Dec 22, 2024

It took me a day to figure out my local fireproof development workflow. Here are some modifications I made to @fireproof/core and @fireproof/cloud to get it to work...

I suppressed the "extractKey" warning in @fireproof/core so it doesn't mess up the stdout/stdin used by the MCP server to communicate with Claude desktop.

jimpick/fireproof@4d876e1

In @fireproof/cloud, I also disabled the console.log that emits "Fireproof Cloud: ..."

jimpick/connect@cd9e0ec#diff-122bda192034b3469ed452a2e55213c140de3003defc3d0245d47b5686f363d2L107

In the same commit, I also changed the "keybag" location to be /tmp/dist

When I run it, I first do rm -rf ~/.fireproof /tmp/dist to clean things up so I don't get key errors.

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

4 participants