phonegap/phonegap-plugin-push

UI API called from background thread Group

RPhillips9 opened this issue · 0 comments

Expected Behaviour

All the called threads for sending push notifications being handled properly

Actual Behaviour

The treads being used close the socket and thus disrupt being able to have action buttons' functionality not work. The action buttons show up, but the functionality doesn't work because the “nw_read_request_report [C19] Receive failed with error “Socket is not connected”" and “Socket SO_ERROR [9: Bad file descriptor]”.

Reproduce Scenario (including but not limited to)

-ionic cordova prepare ios

  • open workspace in xcode
  • run on test phone connected via cord (not a simulator)

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

android - 7.1.1. ios- 5.1.1 (focusing on ios)

Cordova CLI version and cordova platform version

cordova --version          9.0.0 
cordova platform version ios 5.1.1  

Plugin version

cordova plugin version | grep phonegap-plugin-push   2.3.0

Logs taken while reproducing problem

2020-04-15 16:15:08.894551-0400 AppName[3009:5355133] [] nw_socket_handle_socket_event [C20.1:3] Socket SO_ERROR [9: Bad file descriptor]
2020-04-15 16:15:08.896191-0400 AppName[3009:5355133] [] nw_read_request_report [C20] Receive failed with error "Bad file descriptor"
2020-04-15 16:15:08.896537-0400 AppName[3009:5355133] [] nw_socket_get_input_frames [C20.1:3] recvmsg(fd 16, 1024 bytes) [57: Socket is not connected]
2020-04-15 16:15:08.904400-0400 AppName[3009:5351189] Push Plugin handleActionWithIdentifier checkin
2020-04-15 16:15:08.904525-0400 AppName[3009:5355133] [] nw_read_request_report [C20] Receive failed with error "Socket is not connected"
2020-04-15 16:15:08.905277-0400 AppName[3009:5355133] [] nw_socket_handle_socket_event [C19.1:3] Socket SO_ERROR [9: Bad file descriptor]
2020-04-15 16:15:08.905417-0400 AppName[3009:5351189] Push Plugin userInfo {
    actionCallback = checkin;
    aps =     {
        alert = "Hello Dev Team, are you OK?";
        badge = 2;
        category = checkin;
        sound = "presto.wav";
    };
    "content-available" = 1;
    "force-start" = 1;
    "gcm.message_id" = 1586981678628370;
    "gcm.notification.content-available" = 1;
    "gcm.notification.force-start" = 1;
    "gcm.notification.no-cache" = 1;
    "gcm.notification.notId" = 5243;
    "google.c.a.e" = 1;
    "google.c.sender.id" = 979315924726;
    info = "{\"notification\":\"5e972b13490a0\",\"checkin\":true,\"user_id\":\"5e6a5b389c9d3\",\"push_id\":\"5e976b470a37c\",\"message\":\"Hello Dev Team, are you OK?\"}";
    "no-cache" = 1;
    notId = 5158;
}
2020-04-15 16:15:08.906519-0400 AppName[3009:5351189] Push Plugin notId 5158
2020-04-15 16:15:08.906637-0400 AppName[3009:5351189] Notification received
2020-04-15 16:15:08.906680-0400 AppName[3009:5351189] Push Plugin key: category
2020-04-15 16:15:08.906709-0400 AppName[3009:5351189] Push Plugin key: alert
2020-04-15 16:15:08.906736-0400 AppName[3009:5351189] Push Plugin key: badge
2020-04-15 16:15:08.908095-0400 AppName[3009:5351189] Push Plugin key: sound
2020-04-15 16:15:08.908481-0400 AppName[3009:5355133] [] nw_read_request_report [C19] Receive failed with error "Bad file descriptor"
2020-04-15 16:15:08.909577-0400 AppName[3009:5355133] [] nw_socket_get_input_frames [C19.1:3] recvmsg(fd 17, 1024 bytes) [57: Socket is not connected]
2020-04-15 16:15:08.910779-0400 AppName[3009:5355133] [] nw_read_request_report [C19] Receive failed with error "Socket is not connected"
2020-04-15 16:15:08.911314-0400 AppName[3009:5355133] [] nw_read_request_report [C20] Receive failed with error "Socket is not connected"
2020-04-15 16:15:08.911838-0400 AppName[3009:5355133] [] nw_read_request_report [C20] Receive failed with error "Socket is not connected"
2020-04-15 16:15:08.924339-0400 AppName[3009:5355133] [] nw_read_request_report [C19] Receive failed with error "Socket is not connected"
2020-04-15 16:15:08.924392-0400 AppName[3009:5355133] [] nw_read_request_report [C19] Receive failed with error "Socket is not connected"

And this from xcode:
Screen Shot 2020-04-15 at 7 04 56 PM