# The server extension appears to be missing, when launching with mybinder.org

**URL:** <https://discourse.jupyter.org/t/the-server-extension-appears-to-be-missing-when-launching-with-mybinder-org/9910>\
**Category:** JupyterLab\
**Created:** [July 9, 2021, 5:10pm UTC](https://discourse.jupyter.org/t/the-server-extension-appears-to-be-missing-when-launching-with-mybinder-org/9910 "2021-07-09T17:10:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![adpatter](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/adpatter/32/21229_2.png) [@adpatter](https://discourse.jupyter.org/u/adpatter)\
**Post date:** [July 9, 2021, 5:10pm UTC](https://discourse.jupyter.org/t/the-server-extension-appears-to-be-missing-when-launching-with-mybinder-org/9910/1 "2021-07-09T17:10:20Z")

</div>

When I create a JupyterLab extension that has a server component and launch it in [mybinder.org](http://mybinder.org), I see the error, “The jupyterlab\_ext server extension appears to be missing.” in the console. `jupyterlab_ext` is the name of this test extension.

This is a summary of the actions that I take in creating the extension and pushing it to Github.

```auto
conda create -n jupyterlab-ext --override-channels --strict-channel-priority -c conda-forge -c anaconda jupyterlab=3 cookiecutter nodejs jupyter-packaging git
conda activate jupyterlab-ext
cookiecutter https://github.com/jupyterlab/extension-cookiecutter-ts
cd jupyterlab_ext
git init
git add .
git commit -m 'first commit'
git branch -M main
git remote add origin git@github.com:educational-technology-collective/jupyterlab-ext.git
git push -u origin main
pip install -ve .
jupyter labextension develop --overwrite .
jupyter server extension enable jupyterlab_ext
jlpm run build
git add .
git commit -m 'commit'
git push origin main

```

For reference, this is the resulting test repo: [GitHub - educational-technology-collective/jupyterlab-ext](https://github.com/educational-technology-collective/jupyterlab-ext)

At this point I click the binder button in the README.md file. JupyterLab launches, however the cookiecutter request to the server fails.

When I open a terminal in Binder and run `jupyter server extension list` I do **not** see the server extension listed.

Hence, I add the line `_(sys.executable, "-m", "jupyter", "server", "extension", "enable", "jupyterlab_ext")` to ./binder/postBuild. And, I commit and push the repo to GitHub.

At this point I click the binder button in the README.md file. JupyterLab launches, however the cookiecutter request to the server fails.

When I open a terminal in Binder and run `jupyter server extension list` **I see the server extension listed** :

```auto
jupyterlab_ext enabled
    - Validating jupyterlab_ext...
      jupyterlab_ext 0.1.0 OK

```

However, as I indicated, the request to the server extension that is made in the `activate` function fails.

It appears that after adding the code to postBuild, the server extension is found, however, perhaps, there is something wrong with the path of the request - I’m not sure.

The same test extension runs as expected on my local machine i.e., the request to the server component works.

Can anyone assist with this? You can observe the phenomenon by launching the Binder from the repo that I posted. If I should create an Issue, can you tell me which repo I should make the Issue in?

---

<div class="post-metadata">

**Author:** ![adpatter](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/adpatter/32/21229_2.png) [@adpatter](https://discourse.jupyter.org/u/adpatter)\
**Post date:** [July 9, 2021, 5:16pm UTC](https://discourse.jupyter.org/t/the-server-extension-appears-to-be-missing-when-launching-with-mybinder-org/9910/2 "2021-07-09T17:16:26Z")

</div>

I thought I should add that when I create a Binder using a Dockerfile and launch it on [mybinder.org](http://mybinder.org), the server extension works fine. In that scenario I am installing prebuilt extensions from wheels.

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [July 9, 2021, 6:36pm UTC](https://discourse.jupyter.org/t/the-server-extension-appears-to-be-missing-when-launching-with-mybinder-org/9910/3 "2021-07-09T18:36:17Z")

</div>

This might be due to the difference between launching JupyterLab via jupyter-notebook (as done on mybinder and JupyterHub by default) vs jupyter-server. I’m pretty sure there’s other posts about it on this forum but I can’t find them…

If this is the problem then if you run `jupyter-notebook` locally and go to `/lab` you should have the same issue. You can try making your extension compatible with both methods of launching JupyterLab:  
[https://jupyter-server.readthedocs.io/en/latest/developers/extensions.html#migrating-an-extension-to-use-jupyter-server](https://jupyter-server.readthedocs.io/en/latest/developers/extensions.html#migrating-an-extension-to-use-jupyter-server)

---

<div class="post-metadata">

**Author:** ![adpatter](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/adpatter/32/21229_2.png) [@adpatter](https://discourse.jupyter.org/u/adpatter)\
**Post date:** [July 9, 2021, 7:19pm UTC](https://discourse.jupyter.org/t/the-server-extension-appears-to-be-missing-when-launching-with-mybinder-org/9910/4 "2021-07-09T19:19:49Z")

</div>

@manics Thank you. I checked the thread, [Backward compatibility for server extension on jupyterhub by SarunasAzna · Pull Request #863 · jupyterlab/jupyterlab-git · GitHub](https://github.com/jupyterlab/jupyterlab-git/pull/863/commits/7790f0d1bc2540313b12c6f94e4436959970a57c), and it appears that all the changes that need to be implemented for compatibility have been implemented.

---

<div class="post-metadata">

**Author:** ![adpatter](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/adpatter/32/21229_2.png) [@adpatter](https://discourse.jupyter.org/u/adpatter)\
**Post date:** [July 9, 2021, 7:31pm UTC](https://discourse.jupyter.org/t/the-server-extension-appears-to-be-missing-when-launching-with-mybinder-org/9910/5 "2021-07-09T19:31:56Z")

</div>

Could it be that installing an extension in development mode doesn’t work for `jupyter-notebook`?

Something that I think supports that hypothesis is that everything works perfectly when the extension is installed as a prebuilt extension.

```auto
_(sys.executable, "-m", "pip", "install", "-e", ".")

_(sys.executable, "-m", "jupyter", "labextension", "develop", "--overwrite", ".")

_(sys.executable, "-m", "jupyter", "server", "extension", "enable", "jupyterlab_ext")

```

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [July 9, 2021, 8:51pm UTC](https://discourse.jupyter.org/t/the-server-extension-appears-to-be-missing-when-launching-with-mybinder-org/9910/6 "2021-07-09T20:51:00Z")

</div>

> [@adpatter](#):
>
> Could it be that installing an extension in development mode doesn’t work for `jupyter-notebook` ?

That sounds plausible- hopefully one of the JupyterLab developers can explain!

---

<div class="post-metadata">

**Author:** ![adpatter](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/adpatter/32/21229_2.png) [@adpatter](https://discourse.jupyter.org/u/adpatter)\
**Post date:** [July 9, 2021, 9:00pm UTC](https://discourse.jupyter.org/t/the-server-extension-appears-to-be-missing-when-launching-with-mybinder-org/9910/7 "2021-07-09T21:00:51Z")

</div>

I was able to get the server extension to run on [mybinder.org](http://mybinder.org) by just changing \_(sys.executable, “-m”, “pip”, “install”, “-e”, “.”) to \_(sys.executable, “-m”, “pip”, “install”, “.”) in postBuild.

---

<div class="post-metadata">

**Author:** ![adpatter](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/adpatter/32/21229_2.png) [@adpatter](https://discourse.jupyter.org/u/adpatter)\
**Post date:** [July 9, 2021, 9:09pm UTC](https://discourse.jupyter.org/t/the-server-extension-appears-to-be-missing-when-launching-with-mybinder-org/9910/8 "2021-07-09T21:09:07Z")

</div>

@jtp Would you like for me to create an Issue in the cookiecutter repo regarding this issue?
