What causes the Preferences view to display 'That search query has returned no results'?

When I create a new ‘hello world’ extension using ‘yo theia-extension’ I don’t see any preferences listed on the preference screen when launching via the browser or Electron:

Browser

Electron

They will display in Electron by adding ‘@theia/external-terminal’ as a dependency (adding it as a dependency for the browser doesn’t make a difference - they still aren’t displayed).

So I’m not sure:

  1. why the preferences aren’t listed initially for browser or electron despite the dependency on ‘@theia/preferences’
  2. why adding @theia/external-terminal to electron triggers them to display?

Here’s the package.json for the electron app:

{
    "private": true,
        "name": "electron-app",
        "version": "0.0.0",
        "dependencies": {
            "@theia/core": "latest",
            "@theia/editor": "latest",
            "@theia/electron": "latest",
            "@theia/external-terminal": "latest", // Preference options not displayed after removing this
            "@theia/filesystem": "latest",
            "@theia/markers": "latest",
            "@theia/messages": "latest",
            "@theia/monaco": "latest",
            "@theia/navigator": "latest",
            "@theia/preferences": "latest",
            "@theia/process": "latest",
            "@theia/terminal": "latest",
            "@theia/workspace": "latest",
            "preferences-test": "0.0.0"
        },
        "devDependencies": {
            "@theia/cli": "latest"
        },
        "scripts": {
            "prepare": "theia build --mode development",
            "start": "theia start",
            "watch": "theia build --watch --mode development"
        },
        "theia": {
            "target": "electron"
        }
    }

@jweb thank you for the report, it looks like it might be a regression as a previous version worked correctly:

{
  "private": true,
  "name": "electron-app",
  "version": "0.0.0",
  "main": "src-gen/frontend/electron-main.js",
  "dependencies": {
    "@theia/core": "~1.10.0",
    "@theia/editor": "~1.10.0",
    "@theia/electron": "~1.10.0",
    "@theia/filesystem": "~1.10.0",
    "@theia/markers": "~1.10.0",
    "@theia/messages": "~1.10.0",
    "@theia/monaco": "~1.10.0",
    "@theia/navigator": "~1.10.0",
    "@theia/preferences": "~1.10.0",
    "@theia/process": "~1.10.0",
    "@theia/terminal": "~1.10.0",
    "@theia/workspace": "~1.10.0"
  },
  "devDependencies": {
    "@theia/cli": "~1.10.0"
  },
  "scripts": {
    "prepare": "theia build --mode development",
    "start": "theia start",
    "watch": "theia build --watch --mode development"
  },
  "theia": {
    "target": "electron"
  }
}

The following issue should now be fixed thanks to https://github.com/eclipse-theia/theia/pull/9403 :+1:

1 Like