Theia browser frontend refuses to start after reinstalling @theia dependencies.
After re-building Docker image with @theia packages today (5/29/17), my Theia app would no longer start.
Reverting back from next to latest versions of @theia packages, doesn't solve the problem, suggesting that the issue is with a transitive dependency.
Further, browser console reveals the following and only stacktrace:
index.js:73 Failed to start the frontend application.
(anonymous) @ index.js:73
index.js:75 Error: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "", query: "", fragment: ""}
at index.js:41
at t.e (index.js:142)
at new t (index.js:344)
at Function.e.parse (index.js:254)
at new e (uri.ts:29)
at mini-browser-open-handler.ts:63
at Object.<anonymous> (mini-browser-open-handler.ts:60)
at n (bootstrap:19)
at Object.<anonymous> (mini-browser-frontend-module.ts:30)
at n (bootstrap:19)
where index.js:41 links to webpack:///./node_modules/vscode-uri/lib/esm/index.js:41.
Indeed, it appears that 3 more versions (!) of microsoft/vscode-uri were released today - 1.0.7, 1.0.8, and 2.0.0.
To confirm this culprit (and provide a workaround), I reverted vscode-uri to 1.0.6, using
"resolutions": {
"vscode-uri": "<=1.0.6"
},
in package.json (using Yarn). After that, the app starts successfully.
OS and Theia version:
All Theia packages are using next version (which atm is 0.7.0-next.a963e8b5, from yarn.lock).
The Theia app is built in a Docker container based on node:10-alpine.
The host is Mac OS 10.13.6, Chrome 74.0.3729.157.
Diagnostics:

We should look into upgrading to use latest vscode-uri, but we can do it only after upgrading Monaco. Otherwise monaco APIs does not match to vscode URI APIs. Let's pin for now.
It's impossible to pin in Theia repo. Newer versions are pulled via vscode-languageserver-node. Clients will need to use yarn resolutions to work it around.
How to do this yarn resolutions ... to make it work in docker-containers too ?
because we just simply use package.json and build the theia editor on the fly.
thanks
turned out to be that 1.0.8 fixes API incompatibilities, an error happened at runtime, because URI expects scheme be always present by default, i've disabled it in #5322
Now its broken again while creating an theia extension ..
where should I add this
"resolutions": {
"vscode-uri": "<=1.0.6"
}
in browser-app/package.json
OR
myextension/package.json
in browser-app, since it's used by Theia itself
On Fri, May 31, 2019, 12:04 PM vilashProgrammr notifications@github.com
wrote:
Now its broken again while creating an theia extension ..
where should I add this
"resolutions": {
"vscode-uri": "<=1.0.6"
}in browser-app/package.json
OR
myextension/package.json—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/theia-ide/theia/issues/5308?email_source=notifications&email_token=AABBQ6LDTE56DHPOY6ZFCUDPYFEAXA5CNFSM4HQYKFDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWVU3SQ#issuecomment-497765834,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABBQ6KS74GSK7FZWL2UX4TPYFEAXANCNFSM4HQYKFDA
.
in browser-app, since it's used by Theia itself
…
On Fri, May 31, 2019, 12:04 PM vilashProgrammr @.*> wrote: Now its broken again while creating an theia extension .. where should I add this "resolutions": { "vscode-uri": "<=1.0.6" } in browser-app/package.json OR myextension/package.json — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#5308?email_source=notifications&email_token=AABBQ6LDTE56DHPOY6ZFCUDPYFEAXA5CNFSM4HQYKFDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWVU3SQ#issuecomment-497765834>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AABBQ6KS74GSK7FZWL2UX4TPYFEAXANCNFSM4HQY
Tried this but no success.
Should I build the theia again with new version?
Yes, it needs to be rebuilt of course.
On Sat, Jun 1, 2019, 12:01 AM dhananjayharel notifications@github.com
wrote:
in browser-app, since it's used by Theia itself
… <#m_-3846176260055553384_>
On Fri, May 31, 2019, 12:04 PM vilashProgrammr @.*> wrote: Now its
broken again while creating an theia extension .. where should I add this
"resolutions": { "vscode-uri": "<=1.0.6" } in browser-app/package.json OR
myextension/package.json — You are receiving this because you authored the
thread. Reply to this email directly, view it on GitHub <#5308
https://github.com/theia-ide/theia/issues/5308?email_source=notifications&email_token=AABBQ6LDTE56DHPOY6ZFCUDPYFEAXA5CNFSM4HQYKFDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWVU3SQ#issuecomment-497765834>,
or mute the thread <
https://github.com/notifications/unsubscribe-auth/AABBQ6KS74GSK7FZWL2UX4TPYFEAXANCNFSM4HQYTried this but no success.
Should I build the theia again with new version?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/theia-ide/theia/issues/5308?email_source=notifications&email_token=AABBQ6NZL54ENO5TNMMIXTTPYHYC5A5CNFSM4HQYKFDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWWYCNA#issuecomment-497910068,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABBQ6PQTTMA6P6TRMQ5YLLPYHYC5ANCNFSM4HQYKFDA
.
tried this just now but no luck.... :(
this is what im doing
again added "resolutions": {
"vscode-uri": "<=1.0.6"
},
in browser-app/package.json
then cd ..
yarn
yarn prepare
cd browsr-app
yarn run start
but still same issue.
Could you share a link to your package.json?
I’m asking because I’m not sure what yarn prepare script stands for in
your config. In mine, I just use yarn && yarn theia build.
Besides, looks like @akosyakov is working on a fix, so this may not be needed much longer.
On Sat, Jun 1, 2019 at 12:48 AM dhananjayharel notifications@github.com
wrote:
tried this just now but no luck.... :(
this is what im doing
- yo theia-extension xxxxx
- gives error then add skipLibCheck:true in tsconfig
- yarn prepare
- cd browser-app
- yarn run start
Giving URI error then again addedagain added "resolutions": {
"vscode-uri": "<=1.0.6"
},
in browser-app/package.json
then cd ..
yarn
yarn prepare
cd browsr-app
yarn run start
but still same issue.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/theia-ide/theia/issues/5308?email_source=notifications&email_token=AABBQ6JSRTOXHODBLQ2FA5TPYH5Q5A5CNFSM4HQYKFDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWWYU4Q#issuecomment-497912434,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABBQ6LLX4YKLHNKQANVJXDPYH5Q5ANCNFSM4HQYKFDA
.
package.json of my browser-app
{
"private": true,
"name": "browser-app",
"version": "0.0.0",
"dependencies": {
"@theia/core": "latest",
"@theia/filesystem": "latest",
"@theia/workspace": "latest",
"@theia/preferences": "latest",
"@theia/navigator": "latest",
"@theia/process": "latest",
"@theia/terminal": "latest",
"@theia/editor": "latest",
"@theia/languages": "latest",
"@theia/markers": "latest",
"@theia/monaco": "latest",
"@theia/typescript": "latest",
"@theia/messages": "latest",
"programmr_config": "0.0.0"
},
"resolutions": {
"vscode-uri": "<=1.0.6"
},
"devDependencies": {
"@theia/cli": "latest"
},
"scripts": {
"prepare": "theia build --mode development",
"start": "theia start",
"watch": "theia build --watch --mode development"
},
"theia": {
"target": "browser"
}
}
I dont know why it is still not working.
does it pull the latest code while building new theia extension ?
it seems that that the master-branch has merged the recent commits so I should get the updated code of theia editor but when I checked I can see the version of code where I cant see this "vscode URI compabilities.." fixes.
I am doing a new extension by typing the following command
yo theia-extension extensionname
so this should automatically pull the latest code.
but after build im seeing the same error in my browser console and when I check the typescript code in the source tab of browser I can see that the code is old I cant see the fix mentioned in the commit #5308
@dhananjayharel you should use next for nightly builds, latest is last stable release
@marcdumais-work maybe we can do bug fix release for latest?
I am using yo theia-extension command and there is no package.json
where should i do it.
After building hello world plugin I see the package json file in extension folder but it was looking different than usual theia editor application's packag jason.
Did the changes there but no luck
@dhananjayharel I'm not sure what you are trying to say. What change?
I've just generated an extension against next version and it works:
npx yo theia-extension --theia-version=next
cd browser-app/
yarn theia start .
To see all generator options:
npx yo theia-extension --help
Generated README.md file explains how to work with the generated extension.
Thnks its working now!!!
@akosyakov
maybe we can do bug fix release for latest
yes, sounds good. Do you know of other fixes, since last release, we should consider for inclusion?
@marcdumais-work I don't think anything breaking was merged so far. Could we release the current master state?