jupyterhub / binderhub

Run your code in the cloud, with technology so advanced, it feels like magic!
https://binderhub.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2.57k stars 390 forks source link

Can't launch repos in mybinder.org UI: `Uncaught TypeError: URL constructor: /build/gh/binder-examples/conda/HEAD is not a valid URL.` #1747

Closed manics closed 1 year ago

manics commented 1 year ago

Bug description

I had to revert https://github.com/jupyterhub/mybinder.org-deploy/pull/2746 (which includes https://github.com/jupyterhub/binderhub/pull/1741) as it causes a Javascript error on the main mybinder.org page. This seems to prevent launching any repository.

How to reproduce

The occurred after entering https://github.com/binder-examples/conda into mybinder.org (deployment has since been reverted and is working again). It failed to launch, and this error was in the browser console:

Uncaught TypeError: URL constructor: /build/gh/binder-examples/conda/HEAD is not a valid URL.

The browser debugger indicated https://github.com/jupyterhub/binderhub/blob/527ac45a377d2470dfa101823fbd8d3a00193bc5/js/packages/binderhub-client/lib/index.js#L28 is the source

image

Note this is not reproducible using the test configurations in https://github.com/jupyterhub/binderhub/tree/main/testing

yuvipanda commented 1 year ago

Sorry about missing this @manics. I've now opened https://github.com/jupyterhub/binderhub/pull/1758, which starts adding JS unit tests here as well. There's going to be a bit of work needed before the unit tests can 'fully' catch things, but it's a start.

yuvipanda commented 1 year ago

This has since been fixed