WifiWizard2: Plugin returns "Not avaiable" error

Prerequisites

Check all boxes if you have done the following:

Issue type

Select all that apply

  • Bug
  • Enhancement
  • Task
  • Question
  • Other

Description

Plugin returns returns “Not avaiable” error on iOS 13 when getConnectedSSID() is called, same application was working just fine on iOS 12. Also checked the app permissions and updated dependencies, but problem persists.

Steps to Reproduce

  1. Build Ionic application and install on a device running iOS 13.1.3
  2. Connect to any wifi network on the iOS device
  3. Trigger the getConnectedSSID() method from anywhere in the code (make sure promise gets called after device is ready) e.g.
WifiWizard2.getConnectedSSID()
      .then(result => alert(JSON.stringify(result)))
      .catch(error => alert(JSON.stringify(error)))

Expected behavior: The method should resolve successfully and result should be shown in the alert message

Actual behavior: The method does not resolve and the catch callback is called, the message shown in the device is “Not available”

Reproduces how often: 100%

Versions

  • iPhone 7
  • iOS 13.1.3
  • WifiWizard2 3.1.1

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 4
  • Comments: 26

Most upvoted comments

@arsenal942 @andreareidel @digaus Call WifiWizard2.getConnectedSSID() will throw Not available error on device of iOS 14 Beta.

The following is the console log:

2020-07-07 15:04:45.414730+0800 SmartHome[77847:3122999] Supported interfaces: (
    en0
)
2020-07-07 15:04:45.430937+0800 SmartHome[77847:3122999] [] nehelper sent invalid result code [1] for Wi-Fi information request
2020-07-07 15:04:45.431060+0800 SmartHome[77847:3122999] en0 => (null)
2020-07-07 15:04:45.431224+0800 SmartHome[77847:3122999] THREAD WARNING: ['WifiWizard2'] took '64.452148' ms. Plugin should use a background thread.
2020-07-07 15:04:45.447312+0800 SmartHome[77847:3122999] ERROR: Not available

package.json

"cordova-plugin-wifiwizard2": "git+https://github.com/tripflex/WifiWizard2.git"

Then, I tried to switch the npm package to digaus

"cordova-plugin-wifiwizard2": "git+https://github.com/digaus/WifiWizard2.git"

Still throws this error.

I have checked the location authorization and I have connected a WiFi hotspot.

This may be fatal, because Apple will release the official version of its iOS 14 system in the near future.

If I still need to provide any information, I can provide it immediately.