homebridge / ciao

RFC 6762 and RFC 6763 compliant mdns service discovery library written in Typescript
MIT License
81 stars 6 forks source link

tvOS 18 ipv4-mapped ipv6 address #41

Closed donavanbecker closed 4 months ago

donavanbecker commented 5 months ago

Analysis

For some reason getting this error on latest or beta

Expected Behavior

I would expect it to not restart

Steps To Reproduce

install latest Homebridge latest or beta

Logs

AssertionError [ERR_ASSERTION]: ipv4-mapped ipv6 addresses are currently unsupported!
    at enlargeIPv6 (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:137:9)
    at getNetAddress (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:296:26)
    at Function.HAPConnection.getLocalNetworkInterface (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:868:26)
    at new HAPConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:390:43)
    at EventedHTTPServer.onConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:229:24)
    at Server.emit (node:events:519:28)
    at TCP.onconnection (node:net:2204:8)

Configuration

using ciao

Environment

Process Supervisor

hb-service

Additional Context

No response

donavanbecker commented 5 months ago

Updated to beta 2 and still receiving this error:

AssertionError [ERR_ASSERTION]: ipv4-mapped ipv6 addresses are currently unsupported!
    at enlargeIPv6 (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:137:9)
    at getNetAddress (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:296:26)
    at Function.HAPConnection.getLocalNetworkInterface (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:879:28)
    at new HAPConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:394:43)
    at EventedHTTPServer.onConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:231:24)
    at Server.emit (node:events:519:28)
    at TCP.onconnection (node:net:2204:8)
donavanbecker commented 5 months ago
AssertionError [ERR_ASSERTION]: Illegal argument. Must be an IPv6 address!
    at enlargeIPv6 (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:134:9)
    at getNetAddress (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:347:24)
    at Function.HAPConnection.getLocalNetworkInterface (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:879:28)
    at new HAPConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:394:43)
    at EventedHTTPServer.onConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:231:24)
    at Server.emit (node:events:519:28)
    at TCP.onconnection (node:net:2204:8)
[6/25/2024, 5:11:00 PM] [Meater] Child bridge process ended
[6/25/2024, 5:11:00 PM] [Meater] Process Ended. Code: 1, Signal: null
AssertionError [ERR_ASSERTION]: Illegal argument. Must be an IPv6 address!
    at enlargeIPv6 (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:134:9)
    at getNetAddress (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:347:24)
    at Function.HAPConnection.getLocalNetworkInterface (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:879:28)
    at new HAPConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:394:43)
    at EventedHTTPServer.onConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:231:24)
    at Server.emit (node:events:519:28)
    at TCP.onconnection (node:net:2204:8)
[6/25/2024, 5:11:00 PM] [iRobot] Child bridge process ended
[6/25/2024, 5:11:00 PM] [iRobot] Process Ended. Code: 1, Signal: null
AssertionError [ERR_ASSERTION]: Illegal argument. Must be an IPv6 address!
    at enlargeIPv6 (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:134:9)
    at getNetAddress (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:347:24)
    at Function.HAPConnection.getLocalNetworkInterface (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:879:28)
    at new HAPConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:394:43)
    at EventedHTTPServer.onConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:231:24)
    at Server.emit (node:events:519:28)
    at TCP.onconnection (node:net:2204:8)
[6/25/2024, 5:11:00 PM] [August] Child bridge process ended
[6/25/2024, 5:11:00 PM] [August] Process Ended. Code: 1, Signal: null
AssertionError [ERR_ASSERTION]: Illegal argument. Must be an IPv6 address!
    at enlargeIPv6 (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:134:9)
    at getNetAddress (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:347:24)
    at Function.HAPConnection.getLocalNetworkInterface (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:879:28)
    at new HAPConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:394:43)
    at EventedHTTPServer.onConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:231:24)
    at Server.emit (node:events:519:28)
    at TCP.onconnection (node:net:2204:8)
AssertionError [ERR_ASSERTION]: Illegal argument. Must be an IPv6 address!
    at enlargeIPv6 (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:134:9)
    at getNetAddress (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:347:24)
    at Function.HAPConnection.getLocalNetworkInterface (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:879:28)
    at new HAPConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:394:43)
    at EventedHTTPServer.onConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:231:24)
    at Server.emit (node:events:519:28)
    at TCP.onconnection (node:net:2204:8)
AssertionError [ERR_ASSERTION]: Illegal argument. Must be an IPv6 address!
    at enlargeIPv6 (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:134:9)
    at getNetAddress (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:347:24)
    at Function.HAPConnection.getLocalNetworkInterface (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:879:28)
    at new HAPConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:394:43)
    at EventedHTTPServer.onConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:231:24)
    at Server.emit (node:events:519:28)
    at TCP.onconnection (node:net:2204:8)
AssertionError [ERR_ASSERTION]: Illegal argument. Must be an IPv6 address!
    at enlargeIPv6 (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:134:9)
    at getNetAddress (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:347:24)
    at Function.HAPConnection.getLocalNetworkInterface (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:879:28)
    at new HAPConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:394:43)
    at EventedHTTPServer.onConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:231:24)
    at Server.emit (node:events:519:28)
    at TCP.onconnection (node:net:2204:8)
[6/25/2024, 5:11:00 PM] AssertionError [ERR_ASSERTION]: Illegal argument. Must be an IPv6 address!
    at enlargeIPv6 (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:134:9)
    at getNetAddress (/usr/local/lib/node_modules/homebridge/node_modules/@homebridge/ciao/src/util/domain-formatter.ts:347:24)
    at Function.HAPConnection.getLocalNetworkInterface (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:879:28)
    at new HAPConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:394:43)
    at EventedHTTPServer.onConnection (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:231:24)
    at Server.emit (node:events:519:28)
    at TCP.onconnection (node:net:2204:8)
donavanbecker commented 5 months ago

with changes that I have in the alpha-1.0.0 branch I am able to keep Homebridge alive but get this:

WARNING couldn't map socket coming from remote address undefined:undefined     at local address ::192.168.0.111 to a interface!
WARNING couldn't map socket coming from remote address undefined:undefined     at local address ::192.168.0.111 to a interface!
WARNING couldn't map socket coming from remote address undefined:undefined     at local address ::192.168.0.111 to a interface!
WARNING couldn't map socket coming from remote address undefined:undefined     at local address ::192.168.0.111 to an interface!
WARNING couldn't map socket coming from remote address undefined:undefined     at local address ::192.168.0.111 to a interface!
WARNING couldn't map socket coming from remote address undefined:undefined     at local address ::192.168.0.111 to a interface!
WARNING couldn't map socket coming from remote address undefined:undefined     at local address ::192.168.0.111 to a interface!

Homebridge and Home app are communicating.

Supereg commented 5 months ago

@donavanbecker I think it would generally recommend to not directly push developmental work to beta or alpha branches and instead incrementally do development in a feature branch and create a PR or draft PR for that. This makes it easier to review, doesn't induce large amounts of confusing commits and also separates different development efforts from each other. I tired to review your approach but was very tedious as I couldn't really distinguish your changes from other ones made to the alpha release.

donavanbecker commented 5 months ago

Is there some workaround to this issue? Will downgrading Homebridge to a particular version fix it?

As of now you could install Homebridge alpha tag but just know that alpha is a work in progress.

ciao currently support this do only alpha tag would have the changes.

donavanbecker commented 5 months ago

@donavanbecker I think it would generally recommend to not directly push developmental work to beta or alpha branches and instead incrementally do development in a feature branch and create a PR or draft PR for that. This makes it easier to review, doesn't induce large amounts of confusing commits and also separates different development efforts from each other.

I tired to review your approach but was very tedious as I couldn't really distinguish your changes from other ones made to the alpha release.

Yeah let me clean up what I changed and then get a clean alpha branch and a PR open.

donavanbecker commented 4 months ago

Resolved with v1.3.0