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

Error: getsockname EBADF #92

Closed
zach-is-my-name opened this issue Jan 14, 2023 · 1 comment
Closed

Error: getsockname EBADF #92

zach-is-my-name opened this issue Jan 14, 2023 · 1 comment

Comments

@zach-is-my-name
Copy link

zach-is-my-name commented Jan 14, 2023

I don't understand the error, nor why I'm getting it. The only reason I felt confident opening the issue is because the stack trace begins with is-online and ends with one of it's dependencies, which upon review has not been updated in 2 years...

Error: getsockname EBADF
    at Socket.address (node:dgram:764:11)
    at isListening (/home/zmg/Tinker/wiener/node_modules/dns-socket/index.js:283:19)
    at new DNS (/home/zmg/Tinker/wiener/node_modules/dns-socket/index.js:36:7)
    at DNS (/home/zmg/Tinker/wiener/node_modules/dns-socket/index.js:12:12)
    at queryDns (file:///home/zmg/Tinker/wiener/node_modules/public-ip/index.js:90:17)
    at file:///home/zmg/Tinker/wiener/node_modules/public-ip/index.js:213:22
    at queryAll (file:///home/zmg/Tinker/wiener/node_modules/public-ip/index.js:224:4)
    at publicIp.v4 (file:///home/zmg/Tinker/wiener/node_modules/public-ip/index.js:240:10)
    at file:///home/zmg/Tinker/wiener/node_modules/is-online/index.js:58:48
    at isOnline (file:///home/zmg/Tinker/wiener/node_modules/is-online/index.js:62:5)

Here's me calling it if it matters...

import React, {useEffect, useState} from 'react'
import isOnline from 'is-online'
import isReachable from 'is-reachable'

export function useHasInternet() {
  const [hasInternet, setHasInternet] = useState("loading")
  const [wienIsReachable, setWienIsReachable] = useState("loading")
  useEffect(() => {
    (async () => {
      setHasInternet(await isOnline() && await isReachable('https://weekinethereumnews.com') );
    })()
  } );
  
 return hasInternet
}

is-online is version 10

edit: related? #47 (comment)
I'm experiencing a core dump as well

@zach-is-my-name
Copy link
Author

Please ignore. Above is likely caused by an unhandled axios error.

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

1 participant