Fetch Error
See original GitHub issue✗ HTTP_RPC_ENDPOINT=http://office.nkg:20000 npm start
> fork-off-substrate@1.0.0 start /home/xavier/Documents/paritytech/fork-off-substrate
> node index.js
We are intentionally using the HTTP endpoint. If you see any warnings about that, please ignore them.
2021-03-02 12:18:28 API/INIT: Api will be available in a limited mode since the provider does not support subscriptions
2021-03-02 12:18:28 API-HTTP: HTTP Provider does not have 'on' emitters, use WebSockets instead
2021-03-02 12:18:28 API-HTTP: HTTP Provider does not have 'on' emitters, use WebSockets instead
2021-03-02 12:18:28 API-HTTP: HTTP Provider does not have 'on' emitters, use WebSockets instead
2021-03-02 12:18:29 API/INIT: RPC methods not decorated: balances_usableBalance, headerMMR_genProof, staking_powerOf
Unable to resolve type Status, it will fail on construction
Unknown signed extensions CheckEthereumRelayHeaderParcel found, treating them as no-effect
Unknown types found, no types for Status
Fetching current state of the live chain. Please wait, it can take a while depending on the size of your chain.
/home/xavier/Documents/paritytech/fork-off-substrate/node_modules/node-fetch/lib/index.js:272
return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
^
FetchError: invalid json response body at http://office.nkg:20000/ reason: Cannot create a string longer than 0x1fffffe8 characters
at /home/xavier/Documents/paritytech/fork-off-substrate/node_modules/node-fetch/lib/index.js:272:32
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async HttpProvider.send (/home/xavier/Documents/paritytech/fork-off-substrate/node_modules/@polkadot/rpc-provider/http/index.js:149:20)
at async main (/home/xavier/Documents/paritytech/fork-off-substrate/index.js:65:17) {
type: 'invalid-json'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fork-off-substrate@1.0.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fork-off-substrate@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/xavier/.npm/_logs/2021-03-02T04_22_46_261Z-debug.log
Issue Analytics
- State:
- Created 3 years ago
- Comments:29 (27 by maintainers)
Top Results From Across the Web
Using the Fetch API - MDN Web Docs
A fetch() promise will reject with a TypeError when a network error is encountered or CORS is misconfigured on the server-side, ...
Read more >Fetch: reject promise and catch the error if status is not OK?
Fetch promises only reject with a TypeError when a network error occurs. Since 4xx and 5xx responses aren't network errors, there's nothing ...
Read more >Implement error handling when using the Fetch API - web.dev
When the Fetch API throws errors #. This example uses a try / catch block statement to catch any errors thrown within the...
Read more >Handling Failed HTTP Responses With fetch() - TJ VanToll
Per MDN, the fetch() API only rejects a promise when a “network error is encountered, although this usually means permissions issues or ...
Read more >Fetch - Error Handling for Failed HTTP Responses and ...
The fetch() function will automatically throw an error for network errors but not for HTTP errors such as 4xx or 5xx responses.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@AurevoirXavier Delete
./data/storage.json
and try runningFORK_CHUNKS_LEVEL=2 HTTP_RPC_ENDPOINT=http://office.nkg:20000 npm start
. It splits the the download into even smaller chunks.ps Do you have an Idea how large your blockchain’s state is?
Lol, yes. I need to download the full state of your blockchain. Perhaps it might be best that I just make the changes and test against our blockchain and then you can test against yours on your own.