iobroker-community-adapters / ioBroker.tr-064

tr-64 Adapter for ioBroker
MIT License
37 stars 15 forks source link

Adapter restarts if WLAN is deactivated #527

Open mc-0815 opened 3 months ago

mc-0815 commented 3 months ago

Describe the bug
When the adapter instance starts the SOAP Call for WLAN Configuration ends up with a 500 error, the adapter instance throws a fatal error and restarts. As my fritzbox 7412 has WLAN deactivated, I assume this is the cause of the error.

To Reproduce
Just deactivate your WLAN on your fritzbox and restart the adapter instance.

Expected behavior
Adapter is able to handle such configuration as those are quite common setups.

Screenshots & Logfiles
iobroker logs:

Error: sendSOAPActionRequest Error action=GetInfo serviceType=urn:dslforum-org:service:WLANConfiguration:1: 500 - {"code":500}

XML body of the SOAP response (via network capture)

    <?xml
        version="1.0"
        ?>
    <s:Envelope
        xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
        s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <s:Body>
            <s:Fault>
                <faultcode>
                    s:Client
                    </faultcode>
                <faultstring>
                    UPnPError
                    </faultstring>
                <detail>
                    <UPnPError
                        xmlns="urn:dslforum-org:control-1-0">
                        <errorCode>
                            820
                            </errorCode>
                        <errorDescription>
                            Internal Error
                            </errorDescription>
                        </UPnPError>
                    </detail>
                </s:Fault>
            </s:Body>
        </s:Envelope>

Versions:

Additional context
Add any other context about the problem here.

Apollon77 commented 3 months ago

Bitte einen Log von so einem Adapter crash inkl. Stack trace bitte posten.

mc-0815 commented 3 months ago

Da habe ich mich vielleicht falsch ausgedrückt, er crashed nicht, er startet (vermutlich aufgrund des 500er SOAP Error) neu:

2024-06-29 09:34:49.086  - info: host.iobroker Restart adapter system.adapter.tr-064.0 because enabled
2024-06-29 09:35:19.152  - info: host.iobroker instance system.adapter.tr-064.0 started with pid 3081703
2024-06-29 09:35:22.311  - info: tr-064.0 (3081703) starting. Version 4.3.0 in /opt/iobroker/node_modules/iobroker.tr-064, node: v18.17.1, js-controller: 5.0.19
2024-06-29 09:35:23.820  - error: tr-064.0 (3081703) Error: sendSOAPActionRequest Error action=GetInfo serviceType=urn:dslforum-org:service:WLANConfiguration:1: 500 - {"code":500}
2024-06-29 09:35:23.821  - error: tr-064.0 (3081703) ~
2024-06-29 09:35:23.822  - error: tr-064.0 (3081703) ~~ Fatal error. Can not connect to your FritzBox.
2024-06-29 09:35:23.823  - error: tr-064.0 (3081703) ~~ If configuration, network, IP address, etc. ok, try to restart your FritzBox
2024-06-29 09:35:23.824  - error: tr-064.0 (3081703) ~
2024-06-29 09:35:23.825  - warn: tr-064.0 (3081703) Terminated (JS_CONTROLLER_STOPPED): Fatal error. Can not connect to your FritzBox.
2024-06-29 09:35:24.398  - error: host.iobroker instance system.adapter.tr-064.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
Tetraden commented 1 month ago

Ich habe exakt den selben Fehler. WLAN ist aber an. Es ging los, nachdem ich mich neulich von extern in die FritzBox eingeloggt habe und die Geräteliste aufgeräumt.

Apollon77 commented 1 month ago

Mal die FB neu gestartet?

Tetraden commented 1 month ago

Jap, das hatte nichts gebracht. Aber ich hab die Lösung: Die FritzBox liefert bei falschen Credentials nur beim ersten mal "invalid Credentials", bei weiteren Versuchen kommt die Log Meldung von weiter Oben. Das ist natürlich verwirrend für die Fehlersuche.