Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
Description
Sending message from UPS Console and delivering via MPNS to cordova WP8 app that is on foreground causes NullReferenceException:
System.NullReferenceException was unhandled HResult=-2147467261 Message=Object reference not set to an instance of an object. Source=org.jboss.aerogear.unifiedpush.HelloWorld StackTrace: at AeroGear.Push.Registration.OnPushNotification(String message, IDictionary`2 data) at AeroGear.Push.MpnsRegistration.PushChannel_ShellToastNotificationReceived(Object sender, NotificationEventArgs e) at Microsoft.Phone.Notification.HttpNotificationChannel.OnToastNotificationReceived(IntPtr blob, UInt32 blobSize) at Microsoft.Phone.Notification.HttpNotificationChannel.ChannelHandler(UInt32 eventType, IntPtr blob1, UInt32 int1) at Microsoft.Phone.Notification.HttpNotificationChannel.Dispatch(Object threadContext) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() InnerException:
The issue is here: https://github.com/aerogear/aerogear-cordova-push/blob/2.0.3/src/wp8/shared/Registration.cs#L72
because the wp:Param parameter is not specified: https://github.com/aerogear/aerogear-cordova-push/blob/2.0.3/src/wp8/cordova/MpnsRegistration.cs#L35