Closed sajonCC closed 4 months ago
I think I see the issue.
In application.py
the D-Bus connection is setup and in line131 (latest git master, commit 49922ce59c) the following line is called:
cmgr_version = str(cmgr_prop.Get('net.openvpn.v3.configuration','version'))
Before that, the self.dbus.get_object()
and dbus.Interface()
calls prepares the cmgr_prop
object. The tricky detail here is that these two calls may not necessarily trigger the net.openvpn.v3.configuration
service to start. If they do, the cmgr_prop.Get()
calls comes too quickly, before the service has been able to properly start up and settle.
These calls here is actually doing something outside of the openvpn3.ConfigurationManager
class in the openvpn3
Python module. All the methods in this class will call self.__ping()
before doing any calls - just to ensure the service is available.
I'm also wondering if we should expose a new GetVersion()
method or maybe even re-implement the CheckFeatures()
and the set_feature_flags()
helper methods from the C++ proxy in the Python code. That would give a standard way to check for features.
These new methods are a stretch goal to actually solve the crux of this particular issue .... since it's about retrieving information about features openvpn3-indicator
requires or have support for.
As a very ugly short-term fix for openvpn3-indicator
right now ... would be to just call the private __ping()
method ... which can be inserted around line 126-ish:
self.config_manager._ConfigurationManager__ping()
Thoughts? Would you be willing to try porting the CheckFeatures()
to the openvpn3
Python module, @grzegorz-gutowski ?
@sajonCC How did you install openvpn3-indicator
. You seem to be running a little older code. In newer versions, the whole Get Backend Version code is run with proper exception catching.
@dsommers Nevertheless, I added a ping
as you suggested.
@dsommers I was hoping to propose a more pytonish API for openvpn3
at some point in the future. Let me think about it a little more.
@grzegorz-gutowski I'm really open to improve the openvpn3
module all together ... I've unfortunately just been way too busy to dig into it myself yet. I'm also open to extract it out of the openvpn3-linux project and have it as a separate Python specific project which can be published in PyPi too. That could help to unleash the Python updates from the openvpn3-linux release cadence.
@sajonCC How did you install
openvpn3-indicator
. You seem to be running a little older code. In newer versions, the whole Get Backend Version code is run with proper exception catching.
Source code, it was couple of weeks ago and I didn't update it yet (version devel-20240415172226-a00ecaa).
I just updated in to the last code from the git. I will test it and let you know.
@grzegorz-gutowski I'm really open to improve the
openvpn3
module all together ... I've unfortunately just been way too busy to dig into it myself yet. I'm also open to extract it out of the openvpn3-linux project and have it as a separate Python specific project which can be published in PyPi too. That could help to unleash the Python updates from the openvpn3-linux release cadence.
I'm ready to invest some time into this. I already have some prototypes, but I'm not happy with them yet.
I'm ready to invest some time into this. I already have some prototypes, but I'm not happy with them yet.
You know how to reach me! :wink:
Hi,
First of all I would like to thank you for this applet. It's great.
I've found an issue with starting openvpn3-indicator for the first time after computer reboot. I'm not a programmer so I'm not sure how to solve the problem.
This is what I can see in the console when starting for the first time - applet will do not run.
When starting for the second time - applet is starting but still throwing some errors.
Info about my system: