pbakondy/cordova-plugin-sim

TM.Error when retrieving SIM info from a deactivated Android 6.x

Opened this issue · 0 comments

Expected behaviour

simSerialNumber, countryCode and phoneNumber should return nothing.

Actual behaviour

The above values return TM.Error which throws an error in the Chrome Inspector Console when the SIM plugin attempts to retrieve those non-existent values (because the phone is no longer on a carrier network (it previously was on T-Moble)). Makes me wonder if this would also happen on an Android Tablet (assuming the tablet was not on a carrier network).

I'm seeing this behaviour on

  • iOS device
  • iOS simulator
  • [x ] Android device
  • Android emulator

I am using

  • [x ] cordova
  • [x ] ionic
  • PhoneGap
  • PhoneGap Developer App
  • Intel XDK
  • Intel App Preview
  • Telerik
  • Other:

Hardware models

Samsung Galaxy S5

OS versions

Android 6+

I've checked these

  • It happens on a fresh Cordova CLI project as well.
  • I'm waiting for deviceready to fire.
  • My JavaScript has no errors (window.onerror catches nothing).
  • [ x] I'm using the latest cordova library, Android SDK, Xcode, etc.

So how can we reproduce this?

I deactivated my Samsung Galaxy S5 and now use it to primarily run test code. The SIM plugin returns TM.Error when trying to retrieve the above values from a device that is no longer on a carrier network.

Provide the steps to reproduce the issue.

Provide files, sources if available.