honojs / hono

Web framework built on Web Standards
https://hono.dev
MIT License
18.72k stars 530 forks source link

hono/bun getConnInfo() function not working #3351

Open hanumanjiblog opened 2 weeks ago

hanumanjiblog commented 2 weeks ago

What version of Hono are you using?

4.5.4

What runtime/platform is your app running on?

Bun

What steps can reproduce the bug?

try {
  console.log(getConnInfo(c));
} catch (e) {
  console.log(e);
}
/*
 9 |     throw new TypeError("server.requestIP is not a function.");
10 |   }
11 |   const info = server.requestIP(c.req.raw);
12 |   return {
13 |     remote: {
14 |       address: info.address,
                    ^
TypeError: null is not an object (evaluating 'info.address')
  at getConnInfo (C:\Users\one\Desktop\Code\node_modules\hono\dist\adapter\bun\conninfo.js:14:16)
  at C:\Users\one\Desktop\Code\2-quiz.ts:110:19
*/

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

yusukebe commented 2 weeks ago

Hi @hanumanjiblog

I can't reproduce it if you want to have more help. Please provide a minimal project to reproduce it.