Skyost / Bonsoir

A Zeroconf library that allows you to discover network services and to broadcast your own. Based on Apple Bonjour and Android NSD.
http://bonsoir.skyost.eu/
Other
100 stars 43 forks source link

BonsoirDiscovery has null eventStream even after ready #56

Closed RubenGarcia closed 8 months ago

RubenGarcia commented 10 months ago

Describe the bug The code from https://pub.dev/packages/bonsoir

BonsoirDiscovery discovery = BonsoirDiscovery(type: type);
await discovery.ready;
discovery.eventStream!.listen((event) {
  ...
}

is sometimes giving me a null eventStream on Android

To Reproduce Steps to reproduce the behavior: 1 - Do not create any services 2 - Create a discovery 3 - check the value of eventStream after ready on android.

Expected behavior eventStream is never null Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Skyost commented 10 months ago

Do you have an error stacktrace or something like that ?

RubenGarcia commented 10 months ago

There is no stack trace, just eventStream is null, which it should not be.

Skyost commented 10 months ago

Yes, but I mean, if eventStream is null, it means that there is an error occurring at this line. So there must be a native stacktrace or something.

RubenGarcia commented 9 months ago

I am using version: "2.2.0+1" so it may be connected to bugs indicated at https://github.com/Skyost/Bonsoir/issues/57

Skyost commented 9 months ago

Well, #57 occurs to users who are using a version > 2.0.0+1.