You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
11:35PM INF Go Hass Agent: v9.3.0-75-gbfc0c89-dirty
Describe the bug
Crash at startup (SIGSEGV) when Geoclue2 is not installed.
To Reproduce
Steps to reproduce the behaviour:
Don't install Geoclue2.
Register using the GUI (go-hass-agent register --force)
go-hass-agent run
See error.
Expected behaviour
It shouldn't crash, and instead should just ignore the location sensor.
Logs
10:03PM WRN Could not activate a worker. error="unable to monitor for active applications: no portal present"
10:03PM WRN Could not activate a worker. error="unable to monitor for desktop settings: no portal present"
10:03PM WRN Could not activate a worker. error="unsupported hardware for laptop sensor monitoring"
10:03PM ERR Could not set up a geoclue client. error="SystemBus: unable to get data org.freedesktop.GeoClue2.Manager.GetClient from org.freedesktop.GeoClue2: The name org.freedesktop.GeoClue2 was not provided by any .service files"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0xd19a9d]
goroutine 83 [running]:
github.com/joshuar/go-hass-agent/pkg/linux/dbusx.WatchBus({0x11b9198, 0xc00071c2d0}, 0x0)
/home/whitelynx/Development/Other/go-hass-agent/pkg/linux/dbusx/dbus.go:250 +0x3d
github.com/joshuar/go-hass-agent/internal/linux.(*SensorWorker).Updates(0xc000716270, {0x11b9198, 0xc00071c2d0})
/home/whitelynx/Development/Other/go-hass-agent/internal/linux/worker.go:137 +0x10d
github.com/joshuar/go-hass-agent/internal/agent.runWorkers({0x11b9160, 0xc00044d080}, {0x11b8f30, 0xc0005322e0}, {0x11b8f68, 0xc0005322d0})
/home/whitelynx/Development/Other/go-hass-agent/internal/agent/runners.go:58 +0x3f1
github.com/joshuar/go-hass-agent/internal/agent.(*Agent).Run.func2.2()
/home/whitelynx/Development/Other/go-hass-agent/internal/agent/agent.go:104 +0x65
created by github.com/joshuar/go-hass-agent/internal/agent.(*Agent).Run.func2 in goroutine 29
/home/whitelynx/Development/Other/go-hass-agent/internal/agent/agent.go:102 +0x19a
Desktop:
OS: Linux
Distribution: Void
Version: rolling
Additional context
I encountered this because there's no go-hass-agent package on Void Linux, and when building manually, the documentation doesn't mention Geoclue2 being a prerequisite. Even after installing it, I'm unable to get Geoclue2 to actually run, so I'm still blocked by this error. (some of the specifics changed, of course - it now says Launch helper exited with unknown return code 253 instead of The name org.freedesktop.GeoClue2 was not provided by any .service files but the logs otherwise look practically identical)
For use on a desktop, it doesn't make sense to require a location sensor. (related to the first part of #171)
The text was updated successfully, but these errors were encountered:
Firstly thank you for trying out Go Hass Agent and also reporting this issue!
I can see what is the issue here, I recently performed some code clean-up and refactoring that's introduced this bug. Hopefully, commit aeca410 fixes the crash and commit acac8d7 adds the functionality to not start a location sensor when not running on a laptop. Would you be able to try checking out the latest source, building and seeing if that fixes the issue for you?
Would it also be useful if the releases contained a binary archive? i.e., just an amd64 binary in a tar.gz? You'd still need to install the additional libraries the agent needs but this might make it easier on distros I don't have a package for?
I pulled the latest (Updating bfc0c89..2b60928) and it seems to have worked. Thanks for fixing that so quickly!
As far as the location sensor being created, I am on a laptop, but I use it as a desktop - it's always plugged into an external keyboard, mouse, and monitor, and I don't move it. It would still be nice to be able shut off the location sensor, but I think #171 covers that. :)
Go Hass Agent Version
Describe the bug
Crash at startup (
SIGSEGV
) when Geoclue2 is not installed.To Reproduce
Steps to reproduce the behaviour:
go-hass-agent register --force
)go-hass-agent run
Expected behaviour
It shouldn't crash, and instead should just ignore the location sensor.
Logs
Desktop:
Additional context
I encountered this because there's no
go-hass-agent
package on Void Linux, and when building manually, the documentation doesn't mention Geoclue2 being a prerequisite. Even after installing it, I'm unable to get Geoclue2 to actually run, so I'm still blocked by this error. (some of the specifics changed, of course - it now saysLaunch helper exited with unknown return code 253
instead ofThe name org.freedesktop.GeoClue2 was not provided by any .service files
but the logs otherwise look practically identical)For use on a desktop, it doesn't make sense to require a location sensor. (related to the first part of #171)
The text was updated successfully, but these errors were encountered: