nbinteract icon indicating copy to clipboard operation
nbinteract copied to clipboard

404 JS console errors on page load

Open choldgraf opened this issue 6 years ago • 2 comments

Just tried loading the nbinteract widgets and saw some errors I hadn't seen before. Just wanted to bring this to your attention @SamLau95 :-)

image

choldgraf avatar Mar 06 '18 10:03 choldgraf

Thanks for bringing this up! We're aware of this issue; it happens when we check for a cached kernel that Binder has shut down for inactivity. We should just catch this error in the JS instead of letting it display a scary looking console message.

SamLau95 avatar Mar 07 '18 06:03 SamLau95

Just took another look and we're catching the errors properly AFAIK but these errors are still showing up. On further investigation, it looks like these errors are automatically logged in the console even when we catch them in the JS: https://bugs.chromium.org/p/chromium/issues/detail?id=124534

It doesn't seem like we can get around this on our end—we have to make a request to Binder to check whether a kernel is still running but that URL returns a 404 if the server was already shut down.

@choldgraf - If there's a Binder API endpoint that returns the status of kernel given its ID we would be able to avoid making requests to nonexistent URLs. I put this as a low priority for me since everything is working as expected aside from some scary-looking console messages on startup.

SamLau95 avatar Mar 08 '18 20:03 SamLau95