EOSIO / eosjs

General purpose library for the EOSIO blockchain.
http://eosio.github.io/eosjs
MIT License
1.43k stars 463 forks source link

TypeError in eosjs-jsonrpc.js #1082

Open apond308 opened 2 years ago

apond308 commented 2 years ago

Version of EOSJS 22.1.0

Describe the bug node_modules/eosjs/dist/eosjs-jsonrpc.js:102 return [4 /yield/, f(this.endpoint + path, { ^ TypeError: f is not a function

This line of code is trying to use f, which is defined in the previous line: "f = this.fetchBuiltin;", as a function, and it is throwing an error.

To Reproduce Steps to reproduce the behavior: Run the example code found here

Screenshots image

Desktop (please complete the following information):

apond308 commented 2 years ago

I changed that line to

return [4 /*yield*/, this.fetch(this.endpoint + path, {

and now it is giving the error of

node_modules/eosjs/dist/eosjs-jsonrpc.js:103 body: JSON.stringify(body),

RangeError: Invalid string length