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

Better error message when Che API is not reachable from Che Theia #18556

Open
azatsarynnyy opened this issue Dec 8, 2020 · 2 comments
Open
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/task Internal things, technical debt, and to-do tasks to be performed. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. severity/P2 Has a minor but important impact to the usage or development of the system.

Comments

@azatsarynnyy
Copy link
Member

Is your task related to a problem? Please describe.

When Che Theia can't reach Che API, it reports the error messages something like the following ones:

error message
at processTicksAndRejections (internal/process/task_queues.js:97:5)                                                                                                                                      │
│ 2020-12-07 13:58:08.606 root ERROR Error: Unable to get workspace containers. Cause: [object Object]                                                                                                         │
│     at CheServerWorkspaceServiceImpl. (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:193:31)                                               │
│     at step (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:62:23)                                                                                     │
│     at Object.throw (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:43:53)                                                                             │
│     at rejected (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:35:65)                                                                                 │
│     at processTicksAndRejections (internal/process/task_queues.js:97:5)                                                                                                                                      │
│ 2020-12-07 13:58:20.894 root ERROR Error: Unable to get workspace containers. Cause: [object Object]                                                                                                         │
│     at CheServerWorkspaceServiceImpl. (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:193:31)                                               │
│     at step (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:62:23)                                                                                     │
│     at Object.throw (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:43:53)                                                                             │
│     at rejected (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:35:65)                                                                                 │
│     at processTicksAndRejections (internal/process/task_queues.js:97:5)                                                                                                                                      │
│ 2020-12-07 13:58:33.182 root ERROR Error: Unable to get workspace containers. Cause: [object Object]                                                                                                         │
│     at CheServerWorkspaceServiceImpl. (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:193:31)                                               │
│     at step (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:62:23)                                                                                     │
│     at Object.throw (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:43:53)                                                                             │
│     at rejected (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:35:65)                                                                                 │
│     at processTicksAndRejections (internal/process/task_queues.js:97:5)                                                                                                                                      │
│ 2020-12-07 13:58:49.566 root ERROR Error: Unable to get workspace containers. Cause: [object Object]                                                                                                         │
│     at CheServerWorkspaceServiceImpl. (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:193:31)                                               │
│     at step (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:62:23)                                                                                     │
│     at Object.throw (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:43:53)                                                                             │
│     at rejected (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:35:65)                                                                                 │
│     at processTicksAndRejections (internal/process/task_queues.js:97:5)                                                                                                                                      │
│ 2020-12-07 13:59:05.950 root ERROR Error: Unable to get workspace containers. Cause: [object Object]                                                                                                         │
│     at CheServerWorkspaceServiceImpl. (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:193:31)                                               │
│     at step (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:62:23)                                                                                     │
│     at Object.throw (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:43:53)                                                                             │
│     at rejected (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:35:65)                                                                                 │
│     at processTicksAndRejections (internal/process/task_queues.js:97:5)                                                                                                                                      │
│ 2020-12-07 13:59:18.238 root ERROR Uncaught Exception:  Params: [object Object]                                                                                                                              │
│ 2020-12-07 13:59:26.430 root ERROR Error: Unable to get workspace containers. Cause: [object Object]                                                                                                         │
│     at CheServerWorkspaceServiceImpl. (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:193:31)                                               │
│     at step (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:62:23)                                                                                     │
│     at Object.throw (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:43:53)                                                                             │
│     at rejected (/home/theia/node_modules/@eclipse-che/theia-remote-api/lib/node/che-server-workspace-service-impl.js:35:65)

With such messages, it's hard to recognize the real problem without knowledge of Che Theia internals.

Describe the solution you'd like

Add more details when logging the Error: Unable to get workspace containers. Cause: [object Object].

Describe alternatives you've considered

Show some warning to the user with a meaningful message.

Additional context

@azatsarynnyy azatsarynnyy added kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system. area/editor/theia Issues related to the che-theia IDE of Che labels Dec 8, 2020
@tsmaeder
Copy link
Contributor

tsmaeder commented Dec 9, 2020

The root problem with many such problems, IMO, is that many components in Che-Theia try to reach the Che API when they are being constructed, for example in the constructor or in "post construct" method. That leads to the whole IDE startup process being interrupted.
I would propose as a rule that all UI components need to handle errors while being constructed and report errors through proper channels.

@che-bot
Copy link
Contributor

che-bot commented Jun 7, 2021

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 7, 2021
@che-bot che-bot closed this as completed Jun 18, 2021
@azatsarynnyy azatsarynnyy reopened this Jun 18, 2021
@benoitf benoitf added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/task Internal things, technical debt, and to-do tasks to be performed. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants