Skip to content
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

Unknown DBus data type on Flutter #84

Closed
long1eu opened this issue Aug 26, 2020 · 6 comments
Closed

Unknown DBus data type on Flutter #84

long1eu opened this issue Aug 26, 2020 · 6 comments

Comments

@long1eu
Copy link

long1eu commented Aug 26, 2020

Hi!

I was trying to interface with the NetworkManger via dbus to provide linux implementation for the flutter connectivity plugin.
The source code can be found here.
https://github.com/fluttercommunity/firebase_dart_sdk/blob/1dc2373b9524b8a429d6bad32a127eb497fc7b0f/connectivity_linux/lib/connectivity_linux.dart#L81

Note: This only happens when I run the flutter app. When I run it as a simple dart app everything worked well.

Thank you.

Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.5 LTS
Release:	18.04
Codename:	bionic
Launching lib/main.dart on Linux in debug mode...
Building Linux application...
Waiting for Linux to report its views...
Debug service listening on ws://127.0.0.1:46223/qySq3Oyb90M=/ws
Syncing files to device Linux...
[ERROR:flutter/lib/ui/ui_dart_state.cc(171)] Unhandled Exception: Unknown DBus data type '5fc6b82c95f466712
l����   �   =   ��s �   :1.297  ��u �  �g �s  ��s �   org.freedesktop.DBus    '
#0      DBusReadBuffer.readDBusValue (package:dbus/src/dbus_read_buffer.dart:253:7)
#1      DBusReadBuffer.readDBusVariant (package:dbus/src/dbus_read_buffer.dart:160:22)
#2      DBusReadBuffer.readDBusValue (package:dbus/src/dbus_read_buffer.dart:239:14)
#3      DBusReadBuffer.readDBusStruct (package:dbus/src/dbus_read_buffer.dart:169:19)
#4      DBusReadBuffer.readDBusValue (package:dbus/src/dbus_read_buffer.dart:251:14)
#5      DBusReadBuffer.readDBusArray (package:dbus/src/dbus_read_buffer.dart:184:19)
#6      DBusMessage.unmarshal (package:dbus/src/dbus_message.dart:125:26)
#7      DBusClient._processMessages (package:dbus/src/dbus_client.dart:488:18)
#8      DBusClient._processData (package:dbus/src/dbus_client.dart:463:20)
#9      _rootRunUnary (dart:async/zone.dart:1198:47)
#10     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#11     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
#12     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
#13     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
#14     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808:19)
#15     _StreamController._add (dart:async/stream_controller.dart:682:7)
#16     _StreamController.add (dart:async/stream_controller.dart:624:5)
#17     _Socket._onData (dart:io-patch/socket_patch.dart:2043:41)
#18     _rootRunUnary (dart:async/zone.dart:1206:13)
#19     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#20     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
#21     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
#22     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
#23     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808:19)
#24     _StreamController._add (dart:async/stream_controller.dart:682:7)
#25     _StreamController.add (dart:async/stream_controller.dart:624:5)
#26     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1579:33)
#27     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1075:14)
#28     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#29     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
@robert-ancell
Copy link
Collaborator

Thanks for reporting this! I've been seeing a similar issue when implementing #74 and also trying to contact NetworkManager.

@robert-ancell
Copy link
Collaborator

This should be fixed in 0.0.0-dev.16

@robert-ancell
Copy link
Collaborator

Actually I think this is multiple async calls occurring at once - the connect logic in DBusClient doesn't currently handle this correctly.

@long1eu
Copy link
Author

long1eu commented Aug 27, 2020

offtopic: since there is a notification package, do you think it would better if we would have a network_manager package?

@robert-ancell
Copy link
Collaborator

Yes I do. I'm working my way towards making that.

@robert-ancell
Copy link
Collaborator

OK, now I think it's fixed in 0.0.0-dev.17, please re-open if not!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants