codota / tabnine-jupyterlab

JupyterLab client for Tabnine. https://pypi.org/project/jupyterlab-tabnine/
https://www.tabnine.com/install/jupyterlab
36 stars 8 forks source link

Tabnine on Jupyter Lab within Docker results in connection errors #36

Open andypfau opened 9 months ago

andypfau commented 9 months ago

Hi,

I have JupyterLab 4.0.6 inside a Docker container, which in turn is exposed to the internet. I also installed Jupyter Lab with pip install jupyterlab_tabnine.

There is a "Tabnine" button in the bottom bar of Jupyterlab, but when I click on it I get "Something went wrong / Please try again or contact us via support@tabnine.com". When I open the Firefox developer tools, I discover hundreds of failed HTTP connections to 127.0.0.1:1123, which I suspect is some server that Tabnine spawns. In the Firefox log I get hundreds of erros like "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://127.0.0.1:1123/sec-wgrjiqgnwagysdbzpfee/api_key_settings. (Reason: CORS request did not succeed). Status code: (null)."

Note that I added c.NotebookApp.allow_origin='*' to my JupyterLab config file already. I also tried to expose port 1123 from the container, with no success.

I suspect that a couple of things are happening here:

Is there any way to fix that...?

I found a ticket that sounds more-or-less similar (https://github.com/codota/tabnine-jupyterlab/issues/22), which suggests to open "tabnine::config", but when I enter that string into File->Open From Path, or File->Open from URL, it says "Cannot open". I suspect that was perhaps for an older version of Jupyter.

Let me know if any logs would be of help.

Thanks a lot :-)