-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[ui_next] [Meta-issue] Failed to execute 'Send' on Websocket: Still in CONNECTING state. #8596
Comments
Yea, I hit this by spamming the relaunch button 5-10 times |
Important Note: this same error is appearing when you click the Relaunch button from the job output screen. |
Only attempt to reconnect socket if connection wasn't closed cleanly SUMMARY link #8596 After some investigation, I believe that this error is caused by the reconnect logic that we have. When the component that references the ws hook unmounts, we disconnect the socket. There's some logic in the onclose method that attempts to reconnect the socket but if we've disconnected cleanly we shouldn't try to reconnect (because we probably meant to disconnect in the first place). This should clean up the console errors that we've been seeing about the socket already being in a connected state since we won't have timers running past the lifecycle of the component. cc @keithjgrant does this sound good to you? Here's the spec for the disconnect event https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#properties ISSUE TYPE Bugfix Pull Request COMPONENT NAME UI Reviewed-by: Keith Grant <[email protected]> Reviewed-by: Tiago Góes <[email protected]>
Old topic and people have probably moved away and use latest AWX but for those still stuck in 17.1 - or around that version - with similar error, the reason for the Job Events panel to not reload is due to the jobSocketCounter not being updated properly... The websocket works, you can see in the Network tab that it gets updated and receives messages (if you don't then your error is not this issue and you should look at the nginx proxy conf - that might be the problem for you) Othwerwise for this see below: In here update to:
And voila. If you want to fix that error
I doubt the AWX team will ever release a fix (feel free to submit a PR with my code, but I won't), so you will need to rebuild ui_next yourself and update AWX. Hope that helps someone, I spent a day looking into this as I was frustrated to not be able to see live updates. But also can't upgrade to latest AWX. |
Hi my2ter, |
ISSUE TYPE
SUMMARY
Multiple ways to trigger Failed to execute 'Send' on Websocket: Still in CONNECTING state.
ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
No errors
ACTUAL RESULTS
Unhandled error
ADDITIONAL INFORMATION
The text was updated successfully, but these errors were encountered: