Cordova-Network-Manager icon indicating copy to clipboard operation
Cordova-Network-Manager copied to clipboard

addNetwork API fails

Open gailu opened this issue 6 years ago • 2 comments

Issue type

Select all that apply

  • [x ] Bug
  • [ ] Enhancement
  • [ ] Task
  • [ ] Question
  • [ ] Other

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

gailu avatar Jul 25 '18 07:07 gailu

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

arsenal942 avatar Jul 25 '18 21:07 arsenal942

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

gailu avatar Jul 26 '18 07:07 gailu