PaulP
Convex Community•11mo ago
Paul

Could not find public function

All of a sudden I'm getting:

Ok([Request ID: 2333d44835d22263] Server Error
Could not find public function for 'users:getUserById'. Did you forget to run `npx convex dev` or `npx convex deploy`?
)


The query:

export const getUserbyId = query({
  args: { id: v.string() },
  handler: async ({ db }, args) => {
    return await db.query("users")
      .withIndex("idx_id", (q) => q.eq("id", args.id))
      .first();
  },
});


I'm using rust and I have 2 queries:

let token_result = client.query("tokens:getAccessTokenById", maplit::btreemap!{
        "id".into() => access_token_uuid.to_string().into()
    }).await;

    println!("{:?}", token_result);
let user_result = client.query("users:getUserById", maplit::btreemap!{
        "id".into() => user_id.to_string().into()
    }).await;

    println!("{:?}", user_result);


The first one gets executed and the second doesn't?
Screenshot_2025-02-12_at_15.13.15.png
Was this page helpful?