framesjs / frames.js

The fastest way to make Frames
https://framesjs.org
MIT License
344 stars 98 forks source link

Failing to connect to hub #98

Closed alex067 closed 7 months ago

alex067 commented 7 months ago

Running on local debugger, when clicking on a button which is a post, we get the debugger logs:

info: Mock hub: Forwarding message v1/linkById to a real hub
info: Mock hub: Forwarding message v1/linkById to a real hub
info: Mock hub: Forwarding message v1/reactionById to a real hub
info: Mock hub: Forwarding message v1/verificationsByFid to a real hub
info: Mock hub: Forwarding message v1/reactionById to a real hub
info: Mock hub: Forwarding message v1/userDataByFid to a real hub
info: Mock hub: Validating message without verifying signature. This should only be used in development

Shortly after we get an error:

 ⨯ TypeError: fetch failed
...
  cause: SocketError: other side closed
      at TLSSocket.onSocketEnd (node:internal/deps/undici/undici:8903:26)
      at TLSSocket.emit (node:events:530:35)
      at endReadableNT (node:internal/streams/readable:1696:12)
      at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
    code: 'UND_ERR_SOCKET',
    socket: {
      localAddress: '192.168.1.92',
      localPort: 55656,
      remoteAddress: '44.196.72.233',
      remotePort: 2281,
      remoteFamily: 'IPv4',
      timeout: undefined,
      bytesWritten: 333,
      bytesRead: 0
    }
  }

Is this happening to anyone else? Code is similar to the example:

  const previousFrame = getPreviousFrame(searchParams);

  const frameMessage = await getFrameMessage(previousFrame.postBody, {
    ...DEBUG_HUB_OPTIONS,
  });

  if (frameMessage && !frameMessage?.isValid) {
    throw new Error("Invalid frame payload");
  }
stephancill commented 7 months ago

Hey, have you tried updating the debugger? That IP looks like nemes.farcaster.xyz, which is the hub that our old debugger used to use and which has also been experiencing downtime recently.

You can update the debugger using this command:

npx degit github:framesjs/frames.js/examples/framesjs-starter/app/debug#main app/debug --force

Closing this issue, but feel free to reopen if updating the debugger didn't work for you.