openhsr / connect

Die offene HSR Mapper Alternative
GNU General Public License v3.0
6 stars 2 forks source link

Crash falls Keyring noch nicht entschlüsselt #46

Open fabianhauser opened 7 years ago

fabianhauser commented 7 years ago

Auf meinem System wird der Keyring nicht beim Login entschlüsselt, sondern bei der ersten Benutzung (da er ein anderes Passwort hat als mein Benutzer).

Wenn ich openhsr-connect sync nach dem Login das erste Mal eingebe, geht also das Passwort-Eingabefenster vom Gnome Keyring auf, aber gleichzeitig stürzt der Connect im Hintergrund ab:

openhsr-connect sync
WARNUNG: NOCH IST DIESE SOFTWARE IN ENTWICKLUNG - ALSO NICHT FÜR DEN PRODUKTIVEN EINSATZ GEEIGNET!
Traceback (most recent call last):
  File "/usr/bin/openhsr-connect", line 9, in <module>
    load_entry_point('openhsr-connect==0.1.12', 'console_scripts', 'openhsr-connect')()
  File "/usr/lib/python3.5/site-packages/openhsr_connect/__main__.py", line 91, in main
    cli(standalone_mode=False)
  File "/usr/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib64/python3.5/contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python3.5/site-packages/click/core.py", line 87, in augment_usage_errors
    yield
  File "/usr/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/openhsr_connect/__main__.py", line 50, in sync_command
    config = configuration.load_config()
  File "/usr/lib/python3.5/site-packages/openhsr_connect/configuration.py", line 128, in load_config
    get_password(config)
  File "/usr/lib/python3.5/site-packages/openhsr_connect/configuration.py", line 169, in get_password
    password = keyring.get_password('openhsr-connect', config['login']['username'])
  File "/usr/lib/python3.5/site-packages/keyring/core.py", line 42, in get_password
    return _keyring_backend.get_password(service_name, username)
  File "/usr/lib/python3.5/site-packages/keyring/backends/SecretService.py", line 51, in get_password
    collection = self.get_default_collection()
  File "/usr/lib/python3.5/site-packages/keyring/backends/SecretService.py", line 43, in get_default_collection
    collection.unlock()
  File "/usr/lib/python3.5/site-packages/secretstorage/collection.py", line 63, in unlock
    return unlock_objects(self.bus, [self.collection_path], callback)
  File "/usr/lib/python3.5/site-packages/secretstorage/util.py", line 168, in unlock_objects
    return exec_prompt_glib(bus, prompt)[0]
  File "/usr/lib/python3.5/site-packages/secretstorage/util.py", line 134, in exec_prompt_glib
    exec_prompt(bus, prompt, callback)
  File "/usr/lib/python3.5/site-packages/secretstorage/util.py", line 122, in exec_prompt
    prompt_iface.connect_to_signal('Completed', new_callback)
  File "/usr/lib64/python3.5/site-packages/dbus/proxies.py", line 544, in connect_to_signal
    dbus_interface, **keywords)
  File "/usr/lib64/python3.5/site-packages/dbus/proxies.py", line 369, in connect_to_signal
    **keywords)
  File "/usr/lib64/python3.5/site-packages/dbus/bus.py", line 148, in add_signal_receiver
    path, **keywords)
  File "/usr/lib64/python3.5/site-packages/dbus/connection.py", line 400, in add_signal_receiver
    self._require_main_loop()
RuntimeError: To make asynchronous calls, receive signals or export objects, D-Bus connections must be attached to a main loop by passing mainloop=... to the constructor or calling dbus.set_default_main_loop(...)

Systemangaben: openhsr-connect 0.1.12, installation via Fedora-Repository. Fedora 25, Python 3.5.2, Keyring 9.0.

raphiz commented 7 years ago

Das scheint mir eine Race-Condition zu sein...habe es unter Ubuntu Xenial getestet und mal gehts, mal kommt diese Exception 😞 Wäre wohl besser, wenn wir das direkt an python-keyring weiterleiten.

EDIT: Ist aber eine alte Version von Python-Keyring (7.3) - aktuell ist 10.3 🤔