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
Timeout Exception on Bus Reply. #244
Comments
This is a weird one:
Can you double check if rolling back to 0.3 fixes the issues? |
Ok. I've reverted my changes in a separate branch, and the test runs with the expected results. Maybe there's a way I can isolate two packages that replicate the issue? |
Can you make a small project that reproduces the issue and does nothing else? |
I'll try my best this weekend. |
I finally got around to it. I reduced the code to review by a lot in this repo. https://github.com/Piero512/broken_dbus |
Thanks @Piero512. I can confirm running that here gives |
I've tried https://github.com/Piero512/broken_dbus by using dbus 0.3.3 by changing the following in the pubspec.yaml and modifying the code to work with the older dbus API: dependencies:
dbus: ^0.3.3 I can confirm that exactly the same behaviour works in 0.3.3 (i.e. the timeout error is received), so this is not a bug in dbus.dart, and is indeed coming from the Avahi daemon. It may be have been your were ignoring the error in older code, which now generates an exception in dbus.dart 0.5. If that is the case, you should update your code to something like: DBusMethodSuccessResponse result;
try {
result = await server.callResolveService(...);
} on DBusMethodResponseException catch (e) {
if (e.response.errorName == 'org.freedesktop.Avahi.TimeoutError') {
// Handle this error
} else {
rethrow;
}
} |
Thanks for the help diagnosing this issue. I think I might migrate to ServiceResolver since ignoring the exception doesn't work, neither does retrying, and it's weird that it also happened on dbus 0.3.3 but the services resolved nonetheless. Update: Moving to Service Resolver didn't solve the issue in dbus 0.5.1 😭 |
Hi
I've been recently bitten by an update in DBus, as now it seems that syncronous DBus calls receive a Timeout from the server, in about 5 seconds.
The problem happens on Ubuntu 20.04 LTS, with a default install of flutter and dbus 0.5.x. This issue did not happen on dbus 0.3.x
I receive the following unexpected exception from the server:
org.freedesktop.Avahi.TimeoutError: TimeoutReached
As I traced back into my code, this happens when calling the method org.freedesktop.Avahi.Server.ResolveService using the avahi service files.
The stack trace is the following:
My test file and entire source code is public at https://github.com/Piero512/bonsoir_linux_dbus
It seems like DBus is missing a timeout parameter for the method call and now that it parses the error messages correctly, this happens.
The text was updated successfully, but these errors were encountered: