Giter Site home page Giter Site logo

Getting Invalid Response about pynetgear HOT 8 CLOSED

matmaul avatar matmaul commented on August 13, 2024
Getting Invalid Response

from pynetgear.

Comments (8)

VincentMasselis avatar VincentMasselis commented on August 13, 2024 2

Same issue here, you're not alone..

from pynetgear.

ossgeek314 avatar ossgeek314 commented on August 13, 2024

So, gathering more information on this issue. If I run a second script on a second machine(I was running it to sniff the packets), the error does not happen on either machine. Within minutes of stopping the second script, the error returns to the original.

My gut is telling me the netgear itself is corrupting the XML somehow. I'm going to do more testing but the running theory now is 35 second polling time causes instability. I'm going to try and reduce the polling interval on the single machine and see if this causes the error to go away.

from pynetgear.

gruijter avatar gruijter commented on August 13, 2024

Concerning instability of the router, see my post: #62 (comment)

from pynetgear.

ossgeek314 avatar ossgeek314 commented on August 13, 2024

Setting the time interval to 15 seconds resulted in both scripts giving the error. I was able to capture the packets. The netgear itself is sending the corrupted XML

0600  65 76 69 63 65 3e 0d 0a 3c 2f 6d 3a 47 65 74 41   evice>..</m:GetA
0610  74 74 61 63 68 44 65 76 69 63 65 52 65 73 70 6f   ttachDeviceRespo
0620  6e 73 65 3e 0d 0a 3c 52 65 73 70 6f 6e 73 65 43   nse>..<ResponseC
0630  6f 64 65 3e 30 30 30 3c 2f 52 65 73 70 6f 6e 3c   ode>000</Respon<
0640  2f 53 4f 41 50 2d 45 4e 56 3a 42 6f 64 79 3e 0d   /SOAP-ENV:Body>.
0650  0a 3c 2f 53 4f 41 50 2d 45 4e 56 3a 45 6e 76 65   .</SOAP-ENV:Enve
0660  6c 6f 70 65 3e 0d 0a                              lope>..

So, I'd say this is not an issue with pynetgear (though since you aren't validating the XML but just checking for the <ResponseCode>000</ResponseCode> string... maybe a super hacky way is to just check for <ResponseCode>000</ and ignore the closing tag??)

from pynetgear.

ctrl50 avatar ctrl50 commented on August 13, 2024

Setting the time interval to 15 seconds resulted in both scripts giving the error. I was able to capture the packets. The netgear itself is sending the corrupted XML

0600  65 76 69 63 65 3e 0d 0a 3c 2f 6d 3a 47 65 74 41   evice>..</m:GetA
0610  74 74 61 63 68 44 65 76 69 63 65 52 65 73 70 6f   ttachDeviceRespo
0620  6e 73 65 3e 0d 0a 3c 52 65 73 70 6f 6e 73 65 43   nse>..<ResponseC
0630  6f 64 65 3e 30 30 30 3c 2f 52 65 73 70 6f 6e 3c   ode>000</Respon<
0640  2f 53 4f 41 50 2d 45 4e 56 3a 42 6f 64 79 3e 0d   /SOAP-ENV:Body>.
0650  0a 3c 2f 53 4f 41 50 2d 45 4e 56 3a 45 6e 76 65   .</SOAP-ENV:Enve
0660  6c 6f 70 65 3e 0d 0a                              lope>..

So, I'd say this is not an issue with pynetgear (though since you aren't validating the XML but just checking for the <ResponseCode>000</ResponseCode> string... maybe a super hacky way is to just check for <ResponseCode>000</ and ignore the closing tag??)

Thanks for this. i did the super hacky edit to the file and its working again. after months without it..

from pynetgear.

ctrl50 avatar ctrl50 commented on August 13, 2024

Reinstalled this again and same error.. Guess ill lay it out here, for anyone new. with the same issue..
re-hacking the code again:

file:

lib/python3.7/site-packages/pynetgear/__init__.py

line:465 :

("<ResponseCode>0000</ResponseCode>" in resp.text or
change to:

("<ResponseCode>0000</" in resp.text or

line:466:

"<ResponseCode>000</ResponseCode>" in resp.text))
to:
"<ResponseCode>000</" in resp.text))

Working again, HA 0.101.2

@MatMaul is this abandoned?

from pynetgear.

LintHart avatar LintHart commented on August 13, 2024

Reinstalled this again and same error.. Guess ill lay it out here, for anyone new. with the same issue..
re-hacking the code again:

file:

lib/python3.7/site-packages/pynetgear/__init__.py

line:465 :

("<ResponseCode>0000</ResponseCode>" in resp.text or
change to:

("<ResponseCode>0000</" in resp.text or

line:466:

"<ResponseCode>000</ResponseCode>" in resp.text))
to:
"<ResponseCode>000</" in resp.text))

Working again, HA 0.101.2

@MatMaul is this abandoned?

Hey @ctrl50, do you know if it’s possible to edit this in hass.io where there is seemingly no root file structure access? Running into similar problems on my D7800

Thank you, Linton

from pynetgear.

MatMaul avatar MatMaul commented on August 13, 2024

Thanks all for the detailed analysis, I have incorporated the suggested changes. Sorry for the tremendous delay, but I have been a quite more busy than usual and also don't own anymore any Netgear devices with stock firmware.

from pynetgear.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.