Startup loop
seb2010 opened this issue · 4 comments
Describe the bug
When starting up the adapter, an endless startup loop is created. There is NO DEBUG LOG available, regardless of the log-level set.
To Reproduce
It is unknown how this occurs. It first happened with a 3rd freshly installed instance with version 4.1.0. First the instance could not startup because of an object-creation error. After downgrading to version 4.0.0, I was able to start the instance.
Now another instance stopped starting up, trapped in a startup loop.
As the first debug.log message comes after the processing of the objects.js, I suspect problem with it. Please add more debug messages in between, so I can pinpoint the issue with you.
Expected behavior
Instance startup or debug messages highlighting the error
Versions:
- Adapter version: 4.1.0
- JS-Controller version: 5.0.16
- Node version: 18.17.1
- vacuum cleaner: 2x m1s, 1x v1
I added debug.point myself and it does not go past the "// create default States" section of the main() function. There is something wrong with the objects.js in the lib folder. That is also why I was able to install with version 4.0.0, with an older objects.js...
It seems to work fine with SOME existing installation, but has problem with new fresh installs and certain combinations -> resulting in startup loops
another thing to look at: when extending the search for the issue: the code seems not to be able to get past the "super()" call in the function to create the miio-class...
it also seems to be connected to the number of vacuums and their models I try to connect. Also currently am able to fire up only 2 of my 3 instances, where only 1 instance can be active for the model m1s. If I try to start 2 instances with different m1s-models, it does not get past the super() call
Oh man. Found one of the errors :D I used the same port for 2 of the instances. Maybe the port occupation can be catched somehow