arsenal942 / Cordova-Network-Manager

Cordova Network Manager enables Wifi management for both Android and iOS applications within Cordova/Phonegap projects.
Other
16 stars 8 forks source link

addNetwork API fails #17

Open gailu opened 6 years ago

gailu commented 6 years ago

Issue type

Select all that apply

Description

On Some Android Phones (Samsung J2 2016) addNetwork API fails while trying to connect to open network

Steps to Reproduce

Run Following coode var config = cordovaNetworkManager.formatWifiConfig('se3110000312'); cordovaNetworkManager.addNetwork(config, function win() {}, function fail() {console.log('Failed to add WiFi Network: ');}

Expected behavior: function win should have been called

Actual behavior:

function fail is called.

Reproduces how often: Consistently on specific phone model.

Plugin version: 2.5.0

Additional Information

LOGS 07-25 11:56:05.539 10689 10754 D cordovaNetworkManager: cordovaNetworkManager: addNetwork entered. 07-25 11:56:05.780 10689 10754 E JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 68) 07-25 11:56:05.790 10689 10754 W WifiManager: Caught RemoteException trying to get configured networks: android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died 07-25 11:56:05.790 10689 10754 D cordovaNetworkManager: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference 07-25 11:56:05.790 10689 10754 W PluginManager: THREAD WARNING: exec() call to cordovaNetworkManager.addNetwork blocked the main thread for 244ms. Plugin should use CordovaInterface.getThreadPool(). 07-25 11:56:05.790 10689 10754 W CordovaPlugin: Attempted to send a second callback for ID: cordovaNetworkManager258703579 07-25 11:56:05.790 10689 10754 W CordovaPlugin: Result was: "Invalid action" 07-25 11:56:05.800 10689 10689 D SystemWebChromeClient: file:///android_asset/www/build/main.js: Line 1 : Failed to add WiFi Network: se3110000312 07-25 11:56:05.800 10689 10689 I chromium: [INFO:CONSOLE(1)] "Failed to add WiFi Network: se3110000312", source: file:///android_asset/www/build/main.js (1) 07-25 11:58:55.695 1202 1540 I InputDispatcher: Delivering touch to (10689): action: 0x0, toolType: 1 07-25 11:58:55.695 10689 10689 D ViewRootImpl: ViewPostImeInputStage processPointer 0 07-25 11:58:55.835 1202 1540 I InputDispatcher: Delivering touch to (10689): action: 0x1, toolType: 1 07-25 11:58:55.835 10689 10689 D ViewRootImpl: ViewPostImeInputStage processPointer 1

arsenal942 commented 6 years ago

@gailu Do you know the version of Android that the phone is running?

gailu commented 6 years ago

Android version 6.0.1 Kernel Version 3.10.65-9873414 Build Number MMB29QJ210FXXU0APK4 Model: Samsung Galaxy J2 (2016)