Ulauncher: Unexpected error when adding extension

Created on 12 Apr 2020  路  7Comments  路  Source: Ulauncher/Ulauncher

Steps to reproduce:
_your steps to reproduce here_

Ulauncher version:
Linux distro:
Desktop environment:

Logs:

_To get the logs please do the following:_
_* Close the app_
_* Run "ulauncher -v" from the console_
_* Copy output to https://gist.github.com/_
_* Link to the gist here_

enhancement

Most helpful comment

An improvement released in v5.7.5
Closing this issue now.

All 7 comments

@tdalis you've missed to fill in the description form.

Ulauncher v5.7.0
When I add extension: https://github.com/brpaz/ulauncher-file-search
Thanks

2020-04-18 09:50:06,556 | INFO | ulauncher.ui.windows.PreferencesUlauncherDialog: prefs_extension_get_all() | Handling /extension/get-all
file:///usr/share/ulauncher/preferences/dist/static/js/app.c484d9c1e1930f8681fd.js:4919:18: CONSOLE ERROR TypeError: e.cancel is not a function. (In 'e.cancel()', 'e.cancel' is undefined)
2020-04-18 09:50:09,116 | INFO | ulauncher.ui.windows.PreferencesUlauncherDialog: prefs_extension_add() | Add extension: https://github.com/brpaz/ulauncher-file-search
2020-04-18 09:50:09,174 | ERROR | ulauncher.ui.windows.PreferencesUlauncherDialog: on_scheme_callback() | Unexpected API error. URLError: <urlopen error [Errno 111] Connection refused>
Traceback (most recent call last):
  File "/usr/lib/python3.7/urllib/request.py", line 1317, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/lib/python3.7/http/client.py", line 1252, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1298, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1247, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1026, in _send_output
    self.send(msg)
  File "/usr/lib/python3.7/http/client.py", line 966, in send
    self.connect()
  File "/usr/lib/python3.7/http/client.py", line 1414, in connect
    super().connect()
  File "/usr/lib/python3.7/http/client.py", line 938, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.7/socket.py", line 727, in create_connection
    raise err
  File "/usr/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 198, in on_scheme_callback
    resp = rt.dispatch(self, scheme_request.get_uri())
  File "/usr/lib/python3/dist-packages/ulauncher/utils/Router.py", line 49, in dispatch
    return callback(context, url_params)
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 422, in prefs_extension_add
    ext_id = downloader.download(url)
  File "/usr/lib/python3/dist-packages/ulauncher/api/server/ExtensionDownloader.py", line 75, in download
    commit = gh_ext.find_compatible_version()
  File "/usr/lib/python3/dist-packages/ulauncher/api/server/GithubExtension.py", line 71, in find_compatible_version
    for ver in self.read_versions():
  File "/usr/lib/python3/dist-packages/ulauncher/api/server/GithubExtension.py", line 110, in read_versions
    versions = self._read_json('master', 'versions.json')
  File "/usr/lib/python3/dist-packages/ulauncher/api/server/GithubExtension.py", line 101, in _read_json
    return json.loads(urlopen(url).read().decode('utf-8'))
  File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib/python3.7/urllib/request.py", line 543, in _open
    '_open', req)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 1360, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/usr/lib/python3.7/urllib/request.py", line 1319, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>

I confirm this issue on the Fedora 32. Ulauncher 5.7.4.

Message: 'com.github.nesivmi.ulauncher-translate'
Error Name: UnhandledError
Type: KeyError

Stacktrace:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 198, in on_scheme_callback
    resp = rt.dispatch(self, scheme_request.get_uri())
  File "/usr/lib/python3.8/site-packages/ulauncher/utils/Router.py", line 49, in dispatch
    return callback(context, url_params)
  File "/usr/lib/python3.8/site-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 433, in prefs_extension_update_prefs
    controller = ExtensionServer.get_instance().get_controller(ext_id)
  File "/usr/lib/python3.8/site-packages/ulauncher/api/server/ExtensionServer.py", line 76, in get_controller
    return self.controllers[extension_id]
KeyError: 'com.github.nesivmi.ulauncher-translate'

I get the same thing with the GitLab plugin. In my case, not when adding the extension, but when trying to save extension settings.

  • Ulauncher version: 5.7.4
  • Linux distro: elementary OS (5.1.3)
  • Desktop environment: Pantheon

Message: 'com.github.brpaz.ulauncher-gitlab'
Error Name: UnhandledError
Type: KeyError

Stacktrace:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 198, in on_scheme_callback
    resp = rt.dispatch(self, scheme_request.get_uri())
  File "/usr/lib/python3/dist-packages/ulauncher/utils/Router.py", line 49, in dispatch
    return callback(context, url_params)
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 433, in prefs_extension_update_prefs
    controller = ExtensionServer.get_instance().get_controller(ext_id)
  File "/usr/lib/python3/dist-packages/ulauncher/api/server/ExtensionServer.py", line 76, in get_controller
    return self.controllers[extension_id]
KeyError: 'com.github.brpaz.ulauncher-gitlab'

EDIT: Same with Todoist plugin.

All these issues have the same cause: the extensions have dependencies on Python packages that are not installed in the system.
I'm going to release an improvement today that will show which package is missing and how to install it.
It'll look like this:
image
Hope the instructions are clear enough there.

Meanwhile you guys can check out a Github page of an extension you're trying to install. There's a chance author left a comment in a readme file with a name of a required package.

An improvement released in v5.7.5
Closing this issue now.

I can confirm that this solved the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ibot3 picture ibot3  路  6Comments

fossfreedom picture fossfreedom  路  5Comments

frdrk picture frdrk  路  4Comments

cirala picture cirala  路  3Comments

sebastian-65 picture sebastian-65  路  5Comments