osociety / network_tools

Networking Tools library which can help you discover open ports, devices on subnet and many other things.
https://pub.dev/packages/network_tools
BSD 3-Clause "New" or "Revised" License
45 stars 13 forks source link

Updated Android phone to Android14 and ping is not working now #157

Closed kostadin24 closed 1 year ago

kostadin24 commented 1 year ago

Using version 4.0.1 of network_tools plugin, dart_ping 9.0.1

This is error in console:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: GetIt: Object/factory with type ARPService is not registered inside GetIt. E/flutter ( 7506): (Did you accidentally do GetIt sl=GetIt.instance(); instead of GetIt sl=GetIt.instance; E/flutter ( 7506): Did you forget to register it?) E/flutter ( 7506): #0 throwIfNot (package:get_it/get_it_impl.dart:12:19) E/flutter ( 7506): #1 _GetItImplementation._findFactoryByNameAndType (package:get_it/get_it_impl.dart:396:5) E/flutter ( 7506): #2 _GetItImplementation.get (package:get_it/get_it_impl.dart:424:29) E/flutter ( 7506): #3 _GetItImplementation.call (package:get_it/get_it_impl.dart:464:12) E/flutter ( 7506): #4 HostScanner.arpServiceFuture (package:network_tools/src/host_scanner.dart:15:41) E/flutter ( 7506): #5 HostScanner.arpServiceFuture (package:network_tools/src/host_scanner.dart) E/flutter ( 7506): #6 HostScanner._getHostFromPing (package:network_tools/src/host_scanner.dart:125:35) E/flutter ( 7506):

kostadin24 commented 1 year ago

My bad

I just lost somehow code: final appDocDirectory = await getApplicationDocumentsDirectory(); await configureNetworkTools(appDocDirectory.path, enableDebugging: true);

Adding it fixed all.