build-monitor-plugin
build-monitor-plugin copied to clipboard
Auto refresh page on: "Sorry to bother you [..]" message
Hi,
We have a couple of tablets running 24/7 as build monitor with this great plugin. However fairly often we get presented with the "Sorry to bother you, but there is a slight issue ...". It has a "reload the page" button that simply reloads the page :) After a reload it works again.
However it get's really annoying because we have to do this fairly often.
So: I connected the tablet to Chrome debugger so I could see what happens. After xx calls the call to Jenkins will result in a 403 (forbidden). That is strange because after a reload it works again.
By checking the nginx accesslog of our Jenkins server I've noticed that for any reason the tablet does 10k calls through it's IPv6 address and then (and I've seen both cases) it either does a call from IPv4 or from a NEW IPv6 address resulting in the 403 error.
You might ask: what has this to do with this plugin? Well, nothing, however I have no idea if this is generic android stuff or our network but is it possible to auto-refresh the page when the app detects an error? This would solve our problems as we no longer have to click the refresh button manually :)
Thanks for your consideration!
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hey @Mattie112 ! It looks like a network quirk; maybe some proxy somewhere? Or maybe something to do with Jenkins session cookie?
What you could try, is to add the behaviour you need here and see if that helps?
I suppose a reload is a sensible strategy to handle a 403.
Hi @jan-molak thanks for your reply. Yeah it as something to do with the tablets we use. As a quick-and-dirty proof of concept I simply added a "window.location.reload" in our Jenkins installation last friday. (Right around here: https://github.com/jan-molak/jenkins-build-monitor-plugin/blob/495d38f597ea1e923927f2638dfcd10837353704/build-monitor-plugin/src/main/webapp/scripts/services.js#L56)
I will let you know if this solves our problem :) If it does that the place you suggest would be great to handle this problem.
Cool, please keep me posted :)
Hi @jan-molak, this solution works perfectly for us. About once a day I see the error shortly on the screen and after that it will quickly refresh.
I'd be happy to create a pull request. Can you please let me know what you prefer?
- Simply do a refresh upon a 403
- Use the "lost connections" handler and keep trying in the background
That's good to hear! I think lost connections might be a bit cleaner if the problem is intermittent.
Any movement on this? This has sadly made the Build Monitor view completely unusable in practice at my work :(