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

[windows] TypeError: uri.withoutFragment is not a function when starting Theia in debug mode #6733

Open
kittaakos opened this issue Dec 11, 2019 · 3 comments
Labels
bug bugs found in the application help wanted issues meant to be picked up, require help outline issues related to the outline

Comments

@kittaakos
Copy link
Contributor

kittaakos commented Dec 11, 2019

Description

This is what I get when I start Theia in debug mode on Windows:

navigatable.ts:93 Uncaught (in promise) TypeError: uri.withoutFragment is not a function
    at EditorManager.../node_modules/@theia/core/lib/browser/navigatable.js.NavigatableWidgetOpenHandler.serializeUri (navigatable.ts:93)
    at EditorManager.../node_modules/@theia/core/lib/browser/navigatable.js.NavigatableWidgetOpenHandler.createWidgetOptions (navigatable.ts:85)
    at EditorManager.../node_modules/@theia/core/lib/browser/widget-open-handler.js.WidgetOpenHandler.getOrCreateWidget (widget-open-handler.ts:163)
    at EditorManager.<anonymous> (widget-open-handler.ts:81)
    at step (widget-open-handler.ts:15)
    at Object.next (widget-open-handler.ts:15)
    at widget-open-handler.ts:15
    at new Promise (<anonymous>)
    at ../node_modules/@theia/core/lib/browser/widget-open-handler.js.__awaiter (widget-open-handler.ts:15)
    at EditorManager.../node_modules/@theia/core/lib/browser/widget-open-handler.js.WidgetOpenHandler.open (widget-open-handler.ts:80)

I have added this to my launch config:

"windows": {
  "env": {
    "NODE_ENV": "development",
    "NODE_PRESERVE_SYMLINKS": "1"
  }
},

to workaround #3590. And probably, the uri.withoutFragment error is related to the incorrect version of vsodee-uri at runtime: #6712.

Reproduction Steps

OS and Theia version:

Diagnostics:

@akosyakov akosyakov added bug bugs found in the application help wanted issues meant to be picked up, require help labels Dec 11, 2019
@akosyakov
Copy link
Member

I've tried to debug it once, it somehow related to restoring the outline view. It fails to restore URIs properly on the page reload.

@akosyakov akosyakov added the outline issues related to the outline label Dec 11, 2019
@JanKoehnlein
Copy link
Contributor

Also reproducible on macOS

@JanKoehnlein
Copy link
Contributor

I confirm: The outline tree model is persisted and on widget restore just loaded. codeUris in the nodes are just objects, not URIs.

I see two possible fixes here:

  • not persist the outline's model at all. It refers to the open editor anyway.
  • properly restore the model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application help wanted issues meant to be picked up, require help outline issues related to the outline
Projects
None yet
Development

No branches or pull requests

3 participants