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

RequestManager/SockerProvider never resolves Web3Deferred Promise when using IPC Provider #7323

Open
fipso opened this issue Oct 13, 2024 · 1 comment
Labels
4.x 4.0 related Bug Addressing a bug

Comments

@fipso
Copy link

fipso commented Oct 13, 2024

Steps to reproduce the behavior

const { Web3 } = require("web3");
const { IpcProvider } = require("web3-providers-ipc");

async function main2() {
  const ipcProvider = new IpcProvider("/tmp/sockets/rpc_proxy.sock", {}, {});
  const web3 = new Web3(ipcProvider);

  const latest = await web3.eth.getBlockNumber();
  console.log(latest);
}
main2();

I debugged my way to the SocketProvider's send function. For some reason, when I place a breakpoint at the end of the function return deferredPromise; line 494, wait for like 2 seconds, then i continue execution and suddenly it works and the promise resolves with the right number.

Environment

Fedora 40, Node v20.17,
"web3": "^4.13.0",
"web3-providers-ipc": "^4.0.7"

@mconnelly8 mconnelly8 added Bug Addressing a bug 4.x 4.0 related labels Oct 14, 2024
@mconnelly8
Copy link

The team will review this soon @fipso

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related Bug Addressing a bug
Projects
None yet
Development

No branches or pull requests

2 participants