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
Networktables connection stuck #87
Comments
It seems to work sometimes and sometimes it hangs. |
We are having some issues with the NT Client calling our robot connection listener with a disconnect notification despite our cameras being loaded and NT being enabled. It may be related to this, so we're going to do some debugging today. |
@Repulser one question, are you running your dashboard on windows or MacOS. Most of our problems occur on windows. |
Would assume Windows, unless the driverstation has been ported to MacOS since I graduated. |
Sadly, the Driver Station is still Windows-only. |
😢 |
The dashboard does seem to also run won MacOS, and it happens on both platforms. |
Do you know if your network tables server on the robot is running on the default port? |
@AndrewLester it is |
Try starting the debugger with |
@Repulser try removing the client.start() call which tries to connect to localhost. (in main.js with the comment above it saying "attempts to connect to localhost"). That fixed our windows connection problem. |
Note that deleting that line will prevent you from connecting to the simulator. |
My team's getting the same error. We tried removing the |
Can't connect on both windows and Linux. |
After a bunch of testing, attempting to connect anywhere from 3-10 times makes it work, not really sure what that is, but it does actually attempt a connection and succeeds after several attempts. |
@Repulser @CrispyBacon1999 Try checking our main.js file for this season. It connects to the robot on the first try with macos and windows. We've made a few changes from the main.js file in FRCDashboard, so I'll probably do a git diff and find out what we may have fixed unintentionally at some point. It also doesn't use the connect.js file to initiate the connection. The only real changes seem to be the restriction of the sim to Mac, connecting to the robot in main.js, and this line, which I forget why I added in all honesty. |
Since our competition was yesterday I quickly ported things over to the pynetworktables2js framework which was rather a breeze. But I will definitely look into this for the next competition and let you know. Thanks! |
FRCDashboard used to use |
That explains why porting it over was so simple, the API seems to have stayed between the two versions, pynetworktables2js has proven very stable for us in a competition environment, I support moving back to it. This means it'll be much easier to maintain over the years and can focus more on Dashboard functionality. |
@AndrewLester can you work with @Repulser to migrate back to pynetworktables2js? |
I've been having the same problem for the past 2 days, so I gave in and started from scratch (I didn't do much so I'm not too cut up about it). I found out that this problem always happens when I delete the example value from index.html. I decided to keep and just hide it behind some stuff. works fine now. |
What's the process look like to switch back to pynetworktables? My team's debating between that or trying to get a fix going with the nodejs version. |
How about a new branch is made for the pynetworktables2js version, but the main build still uses wpilib-nt-client. I feel like the NodeJS implementation just fits in nicely with the electron app code, should it work properly. Since it does work on occasion (e.x. for us), I don't think we should just remove it. |
Up to you on the implementation, just get it done soon if you can. Although I don't know how much it will actually matter given the status of certain competitions... |
Hey, we're experiencing an issue where once we hit connect it gets stuck on "Trying to connect" in the console and the callback never gets called.
Already tried using direct ip, mDNS, etc. Anyone have any idea what's going on?
Love the project btw!
The text was updated successfully, but these errors were encountered: