ubopod / ubo_app

This repo contains code for Ubo system app to control Raspberry Pi utilities and Ubo based functionalities
7 stars 2 forks source link

permission denied error when deleting a WiFi network #183

Open mehrdadfeller opened 2 weeks ago

mehrdadfeller commented 2 weeks ago

I cannot delete a WiFi network on software v1.0. I see the following errors in the logs.

I got this also on sentry.

1728702093.742532 [ERROR] Event loop exception
Traceback (most recent call last):
  File "/opt/ubo/env/lib/python3.11/site-packages/ubo_app/services/030-wifi/wifi_manager.py", line 379, in forget_wireless_connection
    await wait_for(network_connection_settings.delete())
  File "/usr/lib/python3.11/asyncio/tasks.py", line 479, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/opt/ubo/env/lib/python3.11/site-packages/sdbus/dbus_proxy_async_method.py", line 107, in _dbus_async_call
    reply_message = await bus.call_async(call_message)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sdbus_async.networkmanager.exceptions.NmSettingsPermissionDeniedError: Insufficient privileges - extra: {
  "error_message": "Task exception was never retrieved",
  "future": "<Task finished name='Task-17565' coro=<forget_wireless_connection() done, defined at /opt/ubo/env/lib/python3.11/site-packages/ubo_app/services/030-wifi/wifi_manager.py:362> exception=NmSettingsPermissionDeniedError('Insufficient privileges')>",
  "loop": "<_UnixSelectorEventLoop running=True closed=False debug=False>",
  "parent_stack": "None"
}
zytegalaxy commented 1 week ago

@sassanh I suggest we try to find a temporary solution that allows us to keep ubo as sudoer and address permission issue with polkit settings; later we should separate login and deskop users and let the pod owner give a user sudo access via GUI as discussed: https://github.com/orgs/ubopod/projects/1/views/1?pane=issue&itemId=83704218&issue=ubopod%7Cubo_app%7C184