uunicorn / python-validity

Validity fingerprint sensor prototype
MIT License
993 stars 83 forks source link

Python 3.12 breaks compatibility #192

Closed maxulm closed 6 months ago

maxulm commented 7 months ago

After an upgrade from Python 3.11 to 3.12 python-validity does not longer work:

Apr 30 10:50:08 limaxpad dbus-service[907]: return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH, Apr 30 10:50:08 limaxpad dbus-service[907]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Apr 30 10:50:08 limaxpad dbus-service[907]: File "/usr/lib/python3.12/site-packages/dbus/connection.py", line 634, in call_blocking Apr 30 10:50:08 limaxpad dbus-service[907]: reply_message = self.send_message_with_reply_and_block( Apr 30 10:50:08 limaxpad dbus-service[907]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Apr 30 10:50:08 limaxpad dbus-service[907]: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: The name does not have an owner Apr 30 10:50:08 limaxpad dbus-service[907]: During handling of the above exception, another exception occurred: Apr 30 10:50:08 limaxpad dbus-service[907]: Traceback (most recent call last): Apr 30 10:50:08 limaxpad dbus-service[907]: File "/usr/lib/python-validity/dbus-service", line 303, in <module> Apr 30 10:50:08 limaxpad dbus-service[907]: main() Apr 30 10:50:08 limaxpad dbus-service[907]: File "/usr/lib/python-validity/dbus-service", line 287, in main Apr 30 10:50:08 limaxpad dbus-service[907]: bus.get_object('net.reactivated.Fprint', '/net/reactivated/Fprint/Manager') Apr 30 10:50:08 limaxpad dbus-service[907]: File "/usr/lib/python3.12/site-packages/dbus/bus.py", line 237, in get_object Apr 30 10:50:08 limaxpad dbus-service[907]: return self.ProxyObjectClass(self, bus_name, object_path, Apr 30 10:50:08 limaxpad dbus-service[907]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Apr 30 10:50:08 limaxpad dbus-service[907]: File "/usr/lib/python3.12/site-packages/dbus/proxies.py", line 250, in __init__ Apr 30 10:50:08 limaxpad dbus-service[907]: self._named_service = conn.activate_name_owner(bus_name) Apr 30 10:50:08 limaxpad dbus-service[907]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Apr 30 10:50:08 limaxpad dbus-service[907]: File "/usr/lib/python3.12/site-packages/dbus/bus.py", line 178, in activate_name_owner Apr 30 10:50:08 limaxpad dbus-service[907]: self.start_service_by_name(bus_name) Apr 30 10:50:08 limaxpad dbus-service[907]: File "/usr/lib/python3.12/site-packages/dbus/bus.py", line 273, in start_service_by_name Apr 30 10:50:08 limaxpad dbus-service[907]: return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH, Apr 30 10:50:08 limaxpad dbus-service[907]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Apr 30 10:50:08 limaxpad dbus-service[907]: File "/usr/lib/python3.12/site-packages/dbus/connection.py", line 634, in call_blocking Apr 30 10:50:08 limaxpad dbus-service[907]: reply_message = self.send_message_with_reply_and_block( Apr 30 10:50:08 limaxpad dbus-service[907]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Apr 30 10:50:08 limaxpad dbus-service[907]: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: Could not activate remote peer 'net.reactivated.Fprint': startup job failed

Filz0r commented 7 months ago

I had the same issue on a Arch Linux system after the update, but after checking the wiky, I found that we can manually copy the modules from one place to the other it then starts working, its not ideal but in a pinch it helped me

Qpernicus commented 7 months ago

I had the same issue on a Arch Linux system after the update, but after checking the wiky, I found that we can manually copy the modules from one place to the other it then starts working, its not ideal but in a pinch it helped me

Well I tried this and it made it work..I think.. But my SDDM and Hyprlock don't ask for/activate my sensor.. So the service seems active but somewhere the mechanism changed perhaps? I had this which worked:

in /etc/pam.d/hyprlock:

auth        [success=1 new_authtok_reqd=1 default=ignore]   pam_unix.so try_first_pass likeauth nullok
auth        sufficient  pam_fprintd.so
auth        include     login

in /etc/pam.d/sddm:

auth        [success=1 new_authtok_reqd=1 default=ignore]   pam_unix.so try_first_pass likeauth nullok
auth        sufficient  pam_fprintd.so
auth        include     system-login

Which worked.. but now doesn't .. And i don't have a common-auth file as described in the manual (Also running Arch).

Just for the hell of it I did this (after enrolling my finger again) and it seems to fix it...somehow..

$ sudo systemctl enable open-fprintd-resume open-fprintd-suspend

betomoretti commented 6 months ago

Hi everyone, Haven´t tried the workaround yet. But just wanna confirm that I'm having issues with python 3.12.3

maxulm commented 6 months ago

The last update solved the problem for me