joshuar / go-hass-agent

A Home Assistant, native app for desktop/laptop devices.
MIT License
144 stars 11 forks source link

[BUG] go-hass-agent does not start after updated to v10.3.0 #309

Open DaVinylSmith opened 1 day ago

DaVinylSmith commented 1 day ago

Go Hass Agent Version v10.3.0 (from Arch AUR)

Describe the bug go-hass-agent crashes on launch

To Reproduce Steps to reproduce the behaviour:

  1. Start go-hass-agent
  2. register with home assistant
  3. profit? (doesn't happen sadly)
  4. error is seen after registration as well as any attempts to start afterwards

Expected behaviour go-hass-agent starts and reports sensor data to home assistant

Screenshots N/A (application does not start)

Logs go-hass-agent run --log-level debug
Oct 8 08:59:48.541 DBG Setting language. lang=[en-US]
Oct 8 08:59:48.544 WRN Could not add worker. linux.controller=sensor worker=abrt_problems_sensor error="unable to fetch ABRT problems from D-Bus: SystemBus: unable to get data org.freedesktop.problems.GetProblems from org.freedesktop.problems: The name is not activatable"
Oct 8 08:59:48.544 DBG Running controller controller=scripts
Oct 8 08:59:48.544 DBG Running controller controller=device_controller
Oct 8 08:59:48.544 DBG Starting worker worker=agent_version_sensor
Oct 8 08:59:48.544 DBG Starting worker worker=external_ip
Oct 8 08:59:48.544 DBG Starting worker worker=connection_latency
Oct 8 08:59:48.544 DBG Running controller controller=linux_sensors
Oct 8 08:59:48.544 DBG Starting worker worker=disk_usage_sensors
Oct 8 08:59:48.544 DBG Starting worker worker=app_sensors
Oct 8 08:59:48.544 DBG Starting worker worker=network_connection_sensors
Oct 8 08:59:48.544 DBG Starting worker worker=power_state_sensor Oct 8 08:59:48.544 DBG Starting worker worker=screen_lock_sensor Oct 8 08:59:48.544 DBG Starting worker worker=load_averages_sensors Oct 8 08:59:48.544 DBG Starting worker worker=memory_usage_sensors Oct 8 08:59:48.544 DBG Starting worker worker=network_stats_worker Oct 8 08:59:48.544 DBG Starting worker worker=battery_sensors Oct 8 08:59:48.544 DBG Starting worker worker=power_profile Oct 8 08:59:48.544 DBG Starting worker worker=cpu_usage Oct 8 08:59:48.544 DBG Starting worker worker=hwmon Oct 8 08:59:48.544 DBG Starting worker worker=cpu_vulnerabilities Oct 8 08:59:48.544 DBG Starting worker worker=system_info Oct 8 08:59:48.544 DBG Starting worker worker=desktop_settings_sensors Oct 8 08:59:48.544 DBG Starting worker worker=disk_rates_sensors Oct 8 08:59:48.544 DBG Starting worker worker=network_addresses Oct 8 08:59:48.544 DBG Starting worker worker=time Oct 8 08:59:48.544 DBG Processing sensor updates. Oct 8 08:59:48.544 DBG Watching for network connections. linux.controller=sensor worker=network_connection_sensors Oct 8 08:59:48.545 DBG Could not retrieve a device model for chip. chip=nvme error= Oct 8 08:59:48.545 WRN Sensor not found in registry. sensor_id=agent_version Oct 8 08:59:48.545 WRN Sensor not found in registry. sensor_id=agent_version Oct 8 08:59:48.546 DBG Could not retrieve a device model for chip. chip=nvme error= Oct 8 08:59:48.547 DBG Monitoring connection. connection=Ethernet panic: reflect: call of reflect.Value.Type on zero Value

goroutine 130 [running]: reflect.Value.typeSlow({0x0?, 0x0?, 0xf67640?}) /usr/local/go/src/reflect/value.go:2687 +0x10e reflect.Value.Type(...) /usr/local/go/src/reflect/value.go:2682 github.com/godbus/dbus/v5.setDest({0xf9af60?, 0xc00044a9dc?, 0xc0006cdc20?}, {0x0?, 0x0?, 0xc00011c590?}) /go/pkg/mod/github.com/godbus/dbus/v5@v5.1.0/dbus.go:87 +0x8a github.com/godbus/dbus/v5.storeBase(...) /go/pkg/mod/github.com/godbus/dbus/v5@v5.1.0/dbus.go:83 github.com/godbus/dbus/v5.store({0xf9af60?, 0xc00044a9dc?, 0x10?}, {0x0?, 0x0?, 0x419d6b?}) /go/pkg/mod/github.com/godbus/dbus/v5@v5.1.0/dbus.go:78 +0x108 github.com/godbus/dbus/v5.store({0xfae1c0?, 0xc00044a9dc?, 0x0?}, {0x0?, 0x0?, 0xc0006cdce8?}) /go/pkg/mod/github.com/godbus/dbus/v5@v5.1.0/dbus.go:70 +0xde github.com/godbus/dbus/v5.storeInterfaces({0x0?, 0x0?}, {0xfae1c0?, 0xc00044a9dc?}) /go/pkg/mod/github.com/godbus/dbus/v5@v5.1.0/dbus.go:62 +0xdd github.com/godbus/dbus/v5.Variant.Store(...) /go/pkg/mod/github.com/godbus/dbus/v5@v5.1.0/variant.go:149 github.com/joshuar/go-hass-agent/pkg/linux/dbusx.VariantToValue[...]({{{0x0, 0x0}}, {0x0, 0x0}}) /workspace/pkg/linux/dbusx/dbus.go:203 +0x75 github.com/joshuar/go-hass-agent/internal/linux/system.(*fwupdWorker).Sensors(0xc00011d890, {0x12c3958?, 0xc000448960?}) /workspace/internal/linux/system/fwupdmgr.go:99 +0x325 github.com/joshuar/go-hass-agent/internal/linux.handleOneShot.func1() /workspace/internal/linux/worker.go:214 +0x87 created by github.com/joshuar/go-hass-agent/internal/linux.handleOneShot in goroutine 92 /workspace/internal/linux/worker.go:211 +0xab

Desktop (please complete the following information):

Additional context reproducible on similar desktop running Fedora 40 with rpm package. Oddly, this version works fine on my laptop running LMDE with deb package

joshuar commented 23 hours ago

Oh dear, thank you for reporting. I believe I have fixed the problem with 3bb3849bc802264c480c45ca9ab2f20ce290151f. If you are keen, I'd appreciate it if you could test the release candidate found in this archive from CI build 430, which contains the fix. The archive contains the packages for all distros, please choose the appropriate one for your needs. Let me know if it fixes the issue!

DaVinylSmith commented 16 hours ago

The issue is fixed on Fedora. Didn't even have to re-register, it just started right up.

I'm not smart enough to get it past the PGP signature error on Arch but I suspect it will work there too.

Thanks for the quick response!