Open sevicbb opened 4 years ago
The error line appears to be here: https://github.com/becvert/cordova-plugin-zeroconf/blob/master/src/android/net/becvert/cordova/ZeroConf.java#L555
Enumeration<String> names = service.getPropertyNames();
while (names.hasMoreElements()) {
I suppose the service.getPropertyNames()
method is returning an unexpected result. A solution might be just to try/catch this call. We should also look at service
that gets passed into jsonifyService(ServiceInfo service)
too, it could be that service itself is empty and doesn't have any propertyNames to iterate. The mystery then becomes "what kind of service was returned from registrationManager.register()
that is invalid?
Does Android 9 change or update app permission structures?
Does anyone have a clue on how to resolve this? It's also not working on Android 11. Are there any alternative plugins to obtain local network devices?
Yes, as per my previous comment, https://github.com/becvert/cordova-plugin-zeroconf/blob/master/src/android/net/becvert/cordova/ZeroConf.java#L555 needs error handling and investigation. Apologies, I don't have capacity to do this at the moment :(
Same code works on iOS. It was working on Android but suddenly it stopped. Any suggestions? Getting this error in failure callback:
Error: Attempt to invoke interface method 'boolean java.util.Enumeration.hasMoreElements()' on a null object reference