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

Error submitting message to hub: HubError: read ECONNRESET / Call cancelled #2377

Closed
eucalyptus-viminalis opened this issue Oct 24, 2024 · 2 comments
Labels
s-noop Cannot be worked on

Comments

@eucalyptus-viminalis
Copy link

What is the bug?
Nodejs app fails to submit message using the public nemes.farcaster.xyz:2283 URL using HubRpcClient from @farcaster/hub-nodejs.

The error messages I'm getting:

  • for makeUserDataAdd: Error submitting message to hub: HubError: read ECONNRESET
  • for makeCastAdd: Error submitting message to hub: HubError: Call cancelled

How can it be reproduced? (optional)
This bug relates to the write data example in the hub-nodejs package. In my clone I am using the getInsecureHubRpcClient method to create the client using the public hub URL nemes.farcaster.xyz:2283.

Additional context (optional)
Add any other context about the problem here.

  • I've checked that the public key of the signer corresponds to the one recorded onchain by the KeyRegistry contract.
  • My feeling is that it's a problem with using the getInsecureHubRpcClient instead of getSSLHubRpcClient but I'm not sure if there is a username and password available to use with the public server.
  • It seems I'm only getting this error for submitting messages. e.g. I can run the chron-feed example without any problem.
@github-actions github-actions bot added the s-triage Needs to be reviewed, designed and prioritized label Oct 24, 2024
@sds sds added s-noop Cannot be worked on and removed s-triage Needs to be reviewed, designed and prioritized labels Oct 31, 2024
@sds
Copy link
Member

sds commented Oct 31, 2024

This isn't a bug—sometimes network connections fail. You need to design your application to be resilient to failure.

When such a failure occurs, try writing to another hub instead. Have your code gracefully failover to the other hub.

@sds sds closed this as completed Oct 31, 2024
@eucalyptus-viminalis
Copy link
Author

eucalyptus-viminalis commented Nov 1, 2024

Okay so it's got nothing to do with how I was using the APIs? It was just that the nemes hub I was using was down or something?

But that doesnt make sense because as I said the chron feed which I was using the same hub URL for was pulling data fine 🤔🤔 I'll have another go and report back..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s-noop Cannot be worked on
Projects
None yet
Development

No branches or pull requests

2 participants