Giter VIP home page Giter VIP logo

Comments (2)

itsezc avatar itsezc commented on June 13, 2024

While running into the issue with DevTools, heres what you get:

A hanging Promise was canceled. This happens when the worker runtime is waiting for a Promise from JavaScript to resolve, but has detected that the Promise cannot possibly ever resolve because all code and events related to the Promise's I/O context have already finished.
Uncaught (in response) Error: The script will never generate a response.

Upon debugging further:

Error: Cannot perform I/O on behalf of a different request. I/O objects (such as streams, request/response bodies, and others) created in the context of one request handler cannot be accessed from a different request's handler. This is a limitation of Cloudflare Workers which allows us to improve overall performance.
    at _SurrealSocket.send (SurrealSocket.ts:133:12)
#options.hooks.handleError @ index.js:2903
handle_error_and_jsonify @ index.js:174
render_page @ index.js:2090

from surrealdb.js.

raymonddaikon avatar raymonddaikon commented on June 13, 2024

I'm having the same issue with CloudFlare workers (via Partykit). Making a db call using the client library hangs indefinitely. I'm not sure whether or not it's an issue with serialization or the ws protocol. A reproduction can be created with a starter template and adding an onStart surrealdb.js call function

  async onStart() {
    this.surrealClient = new Surreal()
    await this.surrealClient.connect(this.room.env.SURREALDB_URL as string, {
      auth: {
        namespace: 'ns',
        database: 'db',
        username: 'root'
        password: 'root',
        scope: undefined,
      },
    })
    await this.surrealClient.query()
  }

anywhere in /party/chatrooms.ts

from surrealdb.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.