derek82511 / cordova-azure-notification-hubs

Register and receive push notifications via Azure Notification Hub.
MIT License
10 stars 30 forks source link

Error in Register iOS Device #20

Closed hendrik244 closed 2 years ago

hendrik244 commented 3 years ago

Hi,

I'm currently receiving an error on the Xcode Console, when I try to register my iOS Device to the Azure Notification Hub:

To Native Cordova ->  PushNotification init PushNotification941744200 ["options": [{
    android =     {
        sound = 1;
    };
    connectionString = "Endpoint=sb://us.windows.net/;Sh+Fj/Yjw=";
    ios =     {
        alert = true;
        badge = 1;
        sound = false;
    };
    notificationHubPath = "XXXXXX";
}]]
2021-06-18 11:43:22.421389+0200 App[12507:3520878] Push Plugin register called
2021-06-18 11:43:22.421565+0200 App[12507:3520878] PushPlugin.register: setting badge to false
2021-06-18 11:43:22.421638+0200 App[12507:3520878] PushPlugin.register: clear badge is set to 0
2021-06-18 11:43:22.421707+0200 App[12507:3520878] PushPlugin.register: better button setup
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication registerUserNotificationSettings:]
PID: 12507, TID: 3520878, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   CordovaPlugins                      0x00000001054ae814 __19-[PushPlugin init:]_block_invoke + 2992
5   libdispatch.dylib                   0x00000001050a7ae8 _dispatch_call_block_and_release + 24
6   libdispatch.dylib                   0x00000001050a932c _dispatch_client_callout + 16
7   libdispatch.dylib                   0x00000001050abac8 _dispatch_queue_override_invoke + 884
8   libdispatch.dylib                   0x00000001050bae1c _dispatch_root_queue_drain + 376
9   libdispatch.dylib                   0x00000001050bb73c _dispatch_worker_thread2 + 148
10  libsystem_pthread.dylib             0x00000001f2561580 _pthread_wqthread + 212
11  libsystem_pthread.dylib             0x00000001f256486c start_wqthread + 8
2021-06-18 11:43:22.434095+0200 App[12507:3520878] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication registerUserNotificationSettings:]
PID: 12507, TID: 3520878, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   CordovaPlugins                      0x00000001054ae814 __19-[PushPlugin init:]_block_invoke + 2992
5   libdispatch.dylib                   0x00000001050a7ae8 _dispatch_call_block_and_release + 24
6   libdispatch.dylib                   0x00000001050a932c _dispatch_client_callout + 16
7   libdispatch.dylib                   0x00000001050abac8 _dispatch_queue_override_invoke + 884
8   libdispatch.dylib                   0x00000001050bae1c _dispatch_root_queue_drain + 376
9   libdispatch.dylib                   0x00000001050bb73c _dispatch_worker_thread2 + 148
10  libsystem_pthread.dylib             0x00000001f2561580 _pthread_wqthread + 212
11  libsystem_pthread.dylib             0x00000001f256486c start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication registerForRemoteNotifications]
PID: 12507, TID: 3520878, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   CordovaPlugins                      0x00000001054ae848 __19-[PushPlugin init:]_block_invoke + 3044
5   libdispatch.dylib                   0x00000001050a7ae8 _dispatch_call_block_and_release + 24
6   libdispatch.dylib                   0x00000001050a932c _dispatch_client_callout + 16
7   libdispatch.dylib                   0x00000001050abac8 _dispatch_queue_override_invoke + 884
8   libdispatch.dylib                   0x00000001050bae1c _dispatch_root_queue_drain + 376
9   libdispatch.dylib                   0x00000001050bb73c _dispatch_worker_thread2 + 148
10  libsystem_pthread.dylib             0x00000001f2561580 _pthread_wqthread + 212
11  libsystem_pthread.dylib             0x00000001f256486c start_wqthread + 8
2021-06-18 11:43:33.145167+0200 App[12507:3520878] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication registerForRemoteNotifications]
PID: 12507, TID: 3520878, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4   CordovaPlugins                      0x00000001054ae848 __19-[PushPlugin init:]_block_invoke + 3044
5   libdispatch.dylib                   0x00000001050a7ae8 _dispatch_call_block_and_release + 24
6   libdispatch.dylib                   0x00000001050a932c _dispatch_client_callout + 16
7   libdispatch.dylib                   0x00000001050abac8 _dispatch_queue_override_invoke + 884
8   libdispatch.dylib                   0x00000001050bae1c _dispatch_root_queue_drain + 376
9   libdispatch.dylib                   0x00000001050bb73c _dispatch_worker_thread2 + 148
10  libsystem_pthread.dylib             0x00000001f2561580 _pthread_wqthread + 212
11  libsystem_pthread.dylib             0x00000001f256486c start_wqthread + 8
APP ACTIVE

I changed the connectionString and notificationHubPath.

image

Anyone has any idea of how to get this fixed?

ANicholasson commented 2 years ago

@hendrik244 Did you manage to solve this one?

hendrik244 commented 2 years ago

@ANicholasson I forked the original one and its working with my version. Check my repo: https://github.com/hendrik244/cordova-azure-notification-hubs

Xiaoqing3707 commented 1 year ago

@hendrik244 The registration problem was solved, but the message could not be received. Is your app OK?

hendrik244 commented 1 year ago

Hi @Xiaoqing3707, for me everything is working fine.