question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nbgitpuller link generator not working for Launch from Canvas

See original GitHub issue

Bug description

There are two issues making the nbgitpuller link generator not work for us for Launch from Canvas. Specifically,

  1. the redirect is not correct, with the LTIauthenticator and Canvas the redirect part of the link should be https://HUB_URL/hub/lti/launch?custom_next=/jupyter/hub/user-redirect/git-pull/... however, the nbgitpuller link generator provides https://HUB_URL/hub/lti/launch?next=%2Fhub%2Fuser-redirect%2Fgit-pull (the jupyter part might be specific to us, see my next point, however it should be custom_next and not next)

  2. We need our JupyterHub URL’s to have `/jupyter/ at the end, and the nbgitpuller link generator drop this when its included in the JupyterHub URL text box.

Specific example:

Link provided by nbgitpuller link generator which does not work:

https://course101.rudaux.com/hub/lti/launch?next=%2Fhub%2Fuser-redirect%2Fgit-pull%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252FUBC-STAT%252Fstat-201-student%26urlpath%3Dlab%252Ftree%252Fstat-201-student%252Fmaterials%252Fworksheet_01%252Fworksheet_01.ipynb%26branch%3Dmaster

Link that does work (well except for the lab part - still opens to classic notebook):

https://course101.rudaux.com/jupyter/hub/lti/launch?custom_next=/jupyter/hub/user-redirect/git-pull%3Frepo%3Dhttps%3A%2F%2Fgithub.com%2FUBC-STAT%2Fstat-201-students%26subPath%3Dmaterials%2Fworksheet_01%2Fworksheet_01.ipynb&app=lab

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
yuvipandacommented, Apr 23, 2021

@ttimbers you were very close! https://github.com/jupyterhub/nbgitpuller/pull/172 has the fix. Thanks a lot for the extra poke, and am sorry this has been unfixed for so long

1reaction
ttimberscommented, Feb 2, 2021

Update: we now can generate from Canvas Jupyter launch URLs by hand that work with Jupyter Lab, I will paste an example below. Note: this is use the ltiauthenticator with Canvas:

https://course101.rudaux.com/jupyter/hub/lti/launch?next=%2Fjupyter%2Fhub%2Fuser-redirect%2Fgit-pull%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252FUBC-STAT%252Fstat-201%26urlpath%3Dlab%252Ftree%252Fstat-201%252Fmaterials%252Fworksheet_01%252Fworksheet_01.ipynb%26branch%3Dmaster

However, the nbgitpuller tool still fails to handle our hub url’s ending in /jupyter (e.g., https://course101.rudaux.com/jupyter), for example instead of the correct url above, we get the url below that is missing jupyter/ before hub:

https://course101.rudaux.com/hub/lti/launch?next=%2Fhub%2Fuser-redirect%2Fgit-pull%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252FUBC-STAT%252Fstat-201%26urlpath%3Dlab%252Ftree%252Fstat-201%252Frelease%252Fworksheet_01%252Fworksheet_01.ipynb%26branch%3Dmaster
Read more comments on GitHub >

github_iconTop Results From Across the Web

nbgitpuller link generator - GitHub Pages
Consider using the nbgitpuller link generator browser extension instead! Available for Firefox and Chrome. JupyterHub; Launch from Canvas; Binder.
Read more >
Tip: speed up Binder launches by pulling github content in a ...
There's an nbgitpuller link generator at https://jupyterhub.github.io/nbgitpuller/link, and it just got a canvas option.
Read more >
Launch into interactive computing interfaces - Jupyter Book
Because Jupyter Books are built with Jupyter notebooks, you can allow users to launch live Jupyter sessions in the cloud directly from your...
Read more >
UC Berkeley JupyterHubs Documentation
We want to find solution to your interesting problems, so please bring us ... repo exists, but if they get their hands on...
Read more >
Jupyter (Python) notebook embedding - Instructure Community
Also the Click here to Generate [key and secret] link seems to work. ... I can launch a workspace, but it does not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found