tripflex / WifiWizard2

A Cordova plugin for managing Wifi networks (new version of WiFiWizard) - Latest is version 3+

Home Page:https://www.npmjs.com/package/cordova-plugin-wifiwizard2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught (in promise): TypeError: WifiWizard2.getConnectedSSID is not a function

surajrao opened this issue · comments

Prerequisites

Check all boxes if you have done the following:

Issue type

Select all that apply

  • Bug
  • Enhancement
  • Task
  • Question
  • Other

Description

Error in global functions

Steps to Reproduce

  1. Install plugin in Ionic 3 project
  2. Use WifiWizard2.getConnectedSSID(success, fail)
    Or
    WifiWizard2.getConnectedSSIDAsync()

Expected behavior:

Get success or fail error based on connection according to Docs.

Actual behavior:

ERROR Error: Uncaught (in promise): TypeError: WifiWizard2.getConnectedSSID is not a function
TypeError: WifiWizard2.getConnectedSSID is not a function
at 8.js:76
at t.invoke (polyfills.js:3)
at Object.onInvoke (vendor.js:4982)
at t.invoke (polyfills.js:3)
at r.run (polyfills.js:3)
at polyfills.js:3
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (vendor.js:4973)
at t.invokeTask (polyfills.js:3)
at r.runTask (polyfills.js:3)
at 8.js:76
at t.invoke (polyfills.js:3)
at Object.onInvoke (vendor.js:4982)
at t.invoke (polyfills.js:3)
at r.run (polyfills.js:3)
at polyfills.js:3
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (vendor.js:4973)
at t.invokeTask (polyfills.js:3)
at r.runTask (polyfills.js:3)
at c (polyfills.js:3)
at polyfills.js:3
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (vendor.js:4973)
at t.invokeTask (polyfills.js:3)
at r.runTask (polyfills.js:3)
at o (polyfills.js:3)
at

Reproduces how often:
Everytime.

Additional Information

According to the code it probably needs to be getCurrentSSID etc. Either the docs or the js file needs to be updated depending on how you want to keep it.

@surajrao thanks for reporting this, can you please try using the 3.0.0 branch and let me know if you still have issues?

https://github.com/tripflex/WifiWizard2/tree/3.0.0

Note that a lot has changed, so make sure to read the README doc as well:
https://github.com/tripflex/WifiWizard2/blob/3.0.0/README.md

@surajrao you are correct, i must have forgot to update that in the README docs to say getCurrentSSID instead of getConnectedSSID, but try 3.0.0 branch as that has HUGE updates and improvements, and i will be merging it very soon (once I work out the bind issues)

You can see the progress here:
#8

Looks like I had this wrong in the 3.0.0 branch too, so i've updated that one, and i'll update the master as well, it should be getConnectedSSID and getConnectedBSSID as in the README

@tripflex I think you missed the async version of those methods though. Thanks for the quick response. I created a pull request for it. #12