Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal Launcher Error Unhandled Error #15566

Open
winsumloosesum opened this issue Dec 26, 2023 · 7 comments
Open

Terminal Launcher Error Unhandled Error #15566

winsumloosesum opened this issue Dec 26, 2023 · 7 comments

Comments

@winsumloosesum
Copy link

winsumloosesum commented Dec 26, 2023

When creating a terminal, TerminalLauncher produces an error if the result is anything other than 200 OK. Allow extensions to use HTTP response codes to indicate errors that can show up in the UI.

(Edited per @asoriano-stratio 's comment below: #15566 (comment) )

@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Dec 26, 2023
Copy link

welcome bot commented Dec 26, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@winsumloosesum
Copy link
Author

I opened Jupyter Lab from the Anaconda Prompt (Run As Administrator)
Jupyter Lab open in the Chrome browser
Everything works great except when I click the Terminal Icon where I receive the following message:
Terminal Launcher Error Unhandled Error.

Thank you

@JasonWeill
Copy link
Contributor

@winsumloosesum Thanks for opening this issue! Can you please share the OS and version, the JupyterLab version, and the Chrome version you're running? In addition, when you try to open a terminal and you see this error, do you see any error messages in your browser's console or in the Anaconda command-line prompt? If so, please add those to this issue.

@JasonWeill
Copy link
Contributor

@winsumloosesum Can you please share the info requested above? Thanks!

@asoriano-stratio
Copy link

asoriano-stratio commented Jan 18, 2024

Hi!
I have seen an error that may be related to the title of this issue.

I'm working on developing a custom TerminalManager (https://github.com/jupyter-server/jupyter_server_terminals/blob/93a84aabb51f477a5b3eb90ce88a2366cdccdb48/jupyter_server_terminals/terminalmanager.py#L25) that allows to set a maximum number of open terminals; when the máximum number is reached, a tornado.web.HTTPError(409, ..) is raised when calling to create method.

A "Uncaught (in promise) Error:" is seen in the Chrome console:
image

image

It seems that the initial point of this casuistry is at:

if (response.status !== 200) {

I have seen the same casuistry working with JupyterLab 3.6.6 and 4.0.10.

@JasonWeill JasonWeill added enhancement and removed bug status:Needs Info status:Needs Triage Applied to new issues that need triage labels Jan 23, 2024
@krassowski
Copy link
Member

@asoriano-stratio are you suggesting that JupyterLab should catch this error?

@asoriano-stratio
Copy link

I don't have much knowledge of Javascript, but reviewing the browser console traces and looking at the JupyterLab code I seem to understand that there are certain operations related to the TerminalManager that are not "protected" against possible errors in the request to the back server (Http code error other than 200 OK), as it seems to happen in the operation of creating a new terminal session ("async startNew" function in the manager.ts file); it seems to me that other functions (such as async requestRunning) do catch errors in the request to the back and are shown in the UI.
I understand that it would make sense for any errors between front/back communication to be caught and displayed in the UI; it seems a bit ugly to see an "error Uncaugh (in promise)" trace in the browser console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants