shermp / NickelDBus

Monitor and control kobo Nickel via dbus
MIT License
24 stars 2 forks source link

NickelDBus not working with 4.37.21533 #15

Closed dgsiegel closed 1 year ago

dgsiegel commented 1 year ago

I recently upgraded my read to the 4.37.21533 firmware and found that NickelDBus doesn't seem to expose its DBus interface anymore:

# qndb 
interface not valid 
# qndb -m pfmRescanBooks
interface not valid 
failed with:  "method failed with err: org.freedesktop.DBus.Error.ServiceUnknown and message: The name com.github.shermp.nickeldbus was not provided by any .service files" 
# dbus-send --system --print-reply --dest=org.freedesktop.DBus  /org/freedesktop/DBus org.freedesktop.DBus.ListNames 
method return sender=org.freedesktop.DBus -> dest=:1.28 reply_serial=2
   array [
      string "org.freedesktop.DBus"
      string ":1.28"
      string "name.marples.roy.dhcpcd"
      string ":1.24"
      string ":1.0"
   ]

Could it be that we need a .service file in /usr/share/dbus-1/services/?

shermp commented 1 year ago

I just tested with my dev Glo, which is running FW 4.37.21533. It seems to work fine.

It sounds like the plugin hasn't loaded, can you check for errors via logread? Specifically, you'll be checking to see if it has aborted loading due to loading from a failsafe.

If this is the case, you will need to delete the failsafed libndb file from /usr/local/Kobo/imageformats, and reinstall NickelDBus. (you could also just try renaming the file back to libndb.so)

dgsiegel commented 1 year ago

You were absolutely right, somehow I must have triggered failsafe:

Jul  3 10:15:49 nickel: (NickelDBus) (NickelHook) initializing 'NickelDBus' (version: 0.2.0)
Jul  3 10:15:49 nickel: (NickelDBus) (NickelHook) ... desc: Observe and control Nickel over D-Bus
Jul  3 10:15:49 nickel: (NickelDBus) (NickelHook) creating failsafe
Jul  3 10:15:49 nickel: (NickelDBus) (NickelHook) ... failsafe: info: allocating memory
Jul  3 10:15:49 nickel: (NickelDBus) (NickelHook) ... failsafe: info: finding filenames
Jul  3 10:15:49 nickel: (NickelDBus) (NickelHook) ... failsafe: error: lib was loaded from the failsafe for some reason (check failed: !(d && !strcmp(d, ".failsafe")))
Jul  3 10:15:49 nickel: (NickelDBus) (NickelHook) ... error creating failsafe, returning
Jul  3 10:15:49 nickel: (NickelDBus) (NickelHook) done init

I've renamed libndb, rebooted and renamed it back to libndb.so. It seems to be working again, thanks!