ibm-bluemix-mobile-services / bms-clientsdk-cordova-plugin-push

Cordova Push notifications Plugin for IBM Cloud Mobile Services
Apache License 2.0
9 stars 9 forks source link

Thread 9: Fatal error: Unexpectedly found nil while unwrapping an Optional value #114

Closed andaqui closed 5 years ago

andaqui commented 5 years ago

Building app with latest xcode 10.2.1, calling bmspush registerDevice the app hangs and throws this error: Thread 9: Fatal error: Unexpectedly found nil while unwrapping an Optional value.

Below screenshot of the exact line and error.

Screenshot 2019-05-28 at 15 37 47

AnanthaKrish commented 5 years ago

@gitsaysno Hi, That's a config issue I think . Did you add the appgUID, ClientSecret and region in push plugin init method. Please refer this - https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-push#register-for-push-notifications

andaqui commented 5 years ago

Yea, its added but now i noticed that xcode logs the following error msg when initialising:

2019-05-29 09:21:56.025918+0200 Plus Connect Pro[319:11321] ERROR: Method 'initialize:' not defined in Plugin 'BMSClient'

2019-05-29 09:21:56.026054+0200 Plus Connect Pro[319:11321] FAILED pluginJSON = ["BMSClient477522305","BMSClient","initialize",[".eu-de.bluemix.net"]]

Screenshot 2019-05-29 at 09 49 39

I also ran a new clean cordova create project and installed only bms push and i get the same error. (im choosing swift v 4 in the build settings)

AnanthaKrish commented 5 years ago

@gitsaysno There is an issue with the Core plugin (https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-core). I will fix it ASAP and let you know. Thank you for reporting this issue. 👍

AnanthaKrish commented 5 years ago

@gitsaysno I have released a new version of core plugin. The latest core plugin version is bms-core -> 2.6.0. Update your dependencies, that will fix the above issue. Thanks .

andaqui commented 5 years ago

That release solved the issue. Thanks for quick response. 👍