© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•2y ago•
2 replies
Fabian

RPC Durable Object not working

Can somebody help me finding out why my RPC Durable Object is not working (locally, newest wrangler)? I basically have this (simplified) setup:

export class Example extends DurableObject {
  constructor(ctx: DurableObjectState, env: Env) {
    super(ctx, env);
    // ...
  }

  async fetch(request: Request): Promise<Response> {
    // ...
  }

  async create(test: string) {
    return test + "1";
  }
}
export class Example extends DurableObject {
  constructor(ctx: DurableObjectState, env: Env) {
    super(ctx, env);
    // ...
  }

  async fetch(request: Request): Promise<Response> {
    // ...
  }

  async create(test: string) {
    return test + "1";
  }
}


When I try to call the
create
create
function now, it fails with
TypeError: example.create is not a function
TypeError: example.create is not a function
. Again, simplified:

const objectId = c.env.EXAMPLE.idFromName("test");
const example = c.env.EXAMPLE.get(objectId);
const response = await example.create("example");
const objectId = c.env.EXAMPLE.idFromName("test");
const example = c.env.EXAMPLE.get(objectId);
const response = await example.create("example");
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Access Durable Object RPC from Worker with Vite plugin
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2mo ago
Worker -> Durable Object fetch RPC call performance in Rust
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
7mo ago
Durable Object returning 405s
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago
Durable object websocket connections
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago