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

Another Harmony SDK bug FetchError: invalid json response body at https://api.s0.t.hmny.io/ reason: Unexpected token < in JSON at position 0 #110

Open
trekze opened this issue Jan 4, 2022 · 1 comment

Comments

@trekze
Copy link

trekze commented Jan 4, 2022

This happens on occasion when calling the transfer method of our HRC20 contract.

The SDK doesn't recover from it.

15|withdraw-handler  | Error: FetchError: invalid json response body at https://api.s0.t.hmny.io/ reason: Unexpected token < in JSON at position 0
15|withdraw-handler  |     at Messenger.<anonymous> (/path/dev/crypto_royale/node_modules/@harmony-js/network/dist/messenger/messenger.js:82:35)
15|withdraw-handler  |     at step (/path/dev/crypto_royale/node_modules/tslib/tslib.js:143:27)
15|withdraw-handler  |     at Object.throw (/path/dev/crypto_royale/node_modules/tslib/tslib.js:124:57)
15|withdraw-handler  |     at rejected (/path/dev/crypto_royale/node_modules/tslib/tslib.js:115:69)
15|withdraw-handler  |     at runMicrotasks (<anonymous>)
15|withdraw-handler  |     at processTicksAndRejections (node:internal/process/task_queues:96:5)```
@neeboo
Copy link
Contributor

neeboo commented Jan 4, 2022

Sorry to have you encountered so many problems, since the SDK has not been updated for a while. Maybe there are some issues undiscovered during this time, harmony's mainnet apis may have been changed or upgraded a lot.

Plus some of the dependencies of this SDK haven't been updated and may not be compatible for newer nodejs and browsers.

I may be the author of this sdk but actually been away from this project for couple months. Better ask the maintainer of this repo to upgrade , or you may seek the other way to complete your job.
Seems that harmony has moved to use Web3/ethereum compatible tool to do the job, so you would better check that out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants