-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial snap #1
Initial snap #1
Conversation
I get the following error after starting the service:
|
Did you perform a clean install or a refresh on the old version? The issue can not be reproduced on my machine:
The reason for causing different behaviors on different machines is still unclear |
Same with both. Why should it make a difference? The snap has no install/refresh hooks. |
Co-authored-by: Farshid Tavakolizadeh <email@farshid.ws>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Works as expected.
I noticed the following error and AppArmor denials, but they don't seem to affect functionality of the text cases.
2023-08-25T13:42:31+02:00 matter-mqtt-bridge.matter-mqtt-bridge[58118]: [1692963751.168702][58118:58119] CHIP:DL: TRACE: Bus acquired for name MATTER-3840
2023-08-25T13:42:31+02:00 matter-mqtt-bridge.matter-mqtt-bridge[58118]: [1692963751.168752][58118:58119] CHIP:DL: CREATE service object at /chipoble/e306/service
2023-08-25T13:42:31+02:00 matter-mqtt-bridge.matter-mqtt-bridge[58118]: [1692963751.168917][58118:58119] CHIP:DL: Create characteristic object at /chipoble/e306/service/c1
2023-08-25T13:42:31+02:00 matter-mqtt-bridge.matter-mqtt-bridge[58118]: [1692963751.169052][58118:58119] CHIP:DL: Create characteristic object at /chipoble/e306/service/c2
2023-08-25T13:42:31+02:00 matter-mqtt-bridge.matter-mqtt-bridge[58118]: [1692963751.169112][58118:58119] CHIP:DL: CHIP BTP C1 /chipoble/e306/service
2023-08-25T13:42:31+02:00 matter-mqtt-bridge.matter-mqtt-bridge[58118]: [1692963751.169115][58118:58119] CHIP:DL: CHIP BTP C2 /chipoble/e306/service
2023-08-25T13:42:31+02:00 matter-mqtt-bridge.matter-mqtt-bridge[58118]: [1692963751.169117][58118:58119] CHIP:DL: CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING is FALSE
2023-08-25T13:42:31+02:00 matter-mqtt-bridge.matter-mqtt-bridge[58118]: [1692963751.169997][58118:58119] CHIP:DL: FAIL: Error getting object manager client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.164" (uid=0 pid=58118 comm="/snap/matter-mqtt-bridge/x1/bin/chip-bridge-app" label="snap.matter-mqtt-bridge.matter-mqtt-bridge (enforce)") interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" error name="(unset)" requested_reply="0" destination=":1.12" (uid=0 pid=1296 comm="/usr/lib/bluetooth/bluetoothd" label="unconfined")
= Seccomp =
Time: 2023-08-25T13:4
Log: auid=4294967295 uid=0 gid=0 ses=4294967295 subj=snap.matter-mqtt-bridge.matter-mqtt-bridge pid=57974 comm="gmain-matter" exe="/snap/matter-mqtt-bridge/x1/bin/chip-bridge-app" sig=0 arch=c000003e 314(sched_setattr) compat=0 ip=0x7fb696f4ca3d code=0x50000
Syscall: sched_setattr
Suggestion:
* add 'process-control' to 'plugs'
= AppArmor =
Time: 2023-08-25T13:4
Log: apparmor="DENIED" operation="dbus_method_call" bus="system" path="/" interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" mask="send" name=":1.12" pid=57974 label="snap.matter-mqtt-bridge.matter-mqtt-bridge" peer_pid=1296 peer_label="unconfined"
DBus access
= Seccomp =
Time: 2023-08-25T13:4
Log: auid=4294967295 uid=0 gid=0 ses=4294967295 subj=snap.matter-mqtt-bridge.matter-mqtt-bridge pid=58118 comm="gmain-matter" exe="/snap/matter-mqtt-bridge/x1/bin/chip-bridge-app" sig=0 arch=c000003e 314(sched_setattr) compat=0 ip=0x7f00ef6dda3d code=0x50000
Syscall: sched_setattr
Suggestion:
* add 'process-control' to 'plugs'
= AppArmor =
Time: 2023-08-25T13:4
Log: apparmor="DENIED" operation="dbus_method_call" bus="system" path="/" interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" mask="send" name=":1.12" pid=58118 label="snap.matter-mqtt-bridge.matter-mqtt-bridge" peer_pid=1296 peer_label="unconfined"
DBus access
Note that there is no MQTT client reconnection logic, so if the connection to broker is lost for a moment, the client will not reconnect. It needs to have auto reconnection set. |
Co-authored-by: Farshid Tavakolizadeh <farshid.tavakolizadeh@canonical.com>
Co-authored-by: Farshid Tavakolizadeh <email@farshid.ws>
Testing
Open a new terminal to subscribe messages:
Open a new terminal to pair and control the app:
Check the messages: