Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PushSharp hangs after apnsBroker.QueueNotification() #928

Open
Poornima-singh opened this issue May 2, 2021 · 4 comments
Open

PushSharp hangs after apnsBroker.QueueNotification() #928

Poornima-singh opened this issue May 2, 2021 · 4 comments

Comments

@Poornima-singh
Copy link

What version of PushSharp are you using?

4.0.10

Describe your issue:

After apnsBroker.QueueNotification() the http request hangs. No response is received. I tried in Postman and also waited couple of hours but seems like the there is no response from APNs even failure is not received. Please can you help me solve this issue? Is this PushSharp service issue? certificate issue? or APNs issue?

What are the steps required to reproduce this issue?

Please provide any Exception Stack Traces

This is what I see in my debug console
APNS-Client[5]: Sending Batch ID=1, Count=1
2021-05-02 20:34:25.PM [INFO] APNS-Client[5]: Connecting (Batch ID=1)
2021-05-02 20:34:26.PM [INFO] APNS-Client[5]: Connected (Batch ID=1)
2021-05-02 20:34:26.PM [INFO] APNS-Client[5]: Sent Batch, waiting for possible response...
2021-05-02 20:34:26.PM [INFO] APNS-Client[5]: Data Available...
2021-05-02 20:34:26.PM [INFO] APNS-Client[5]: Finished Read.
2021-05-02 20:34:26.PM [INFO] APNS-Client[5]: Received 0 bytes response...
2021-05-02 20:34:26.PM [INFO] APNS-Client[5]: Server Closed Connection...
2021-05-02 20:34:26.PM [INFO] APNS-Client[5]: Disconnecting (Batch ID=1)
2021-05-02 20:34:26.PM [INFO] APNS-Client[5]: Disconnected (Batch ID=1)
2021-05-02 20:34:26.PM [INFO] APNS-Client[5]: Done Reading for Batch ID=1, reseting batch timer...

@Poornima-singh
Copy link
Author

Hello,
I have been debugging so the requests goes into hang state after
apnsBroker.Stop(); this command.

@21pg
Copy link

21pg commented May 3, 2021

@Poornima-singh We were also facing this issue in PushSharp,
Assuming its because of - https://developer.apple.com/news/?id=c88acm2b
so we discontinued and implemented dotAPNS which support HTTP/2 APNs API ..
https://github.com/alexalok/dotAPNS
Hope this will help

@Poornima-singh
Copy link
Author

@21pg Thank you so much for your response. I also implemented dotAPNS, but unfortunately, it works in local and gives error when published. My solution is an asp.net solution and is published in Azure as App Service. I get below error.
Failed to send a push. HTTP request failed: System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.\r\n ---> System.ComponentModel.Win32Exception (0x8009030D): The credentials supplied to the package were not recognized

I don't know if it's the right solution to share this issue, but are you aware of anything in this regard?

@21pg
Copy link

21pg commented May 3, 2021

@Poornima-singh Yes follow this thread-
We are just able to resolve our problem through it.. Hopefully it will work for you
#923
In addition to that follow-
setting Load User Profile option as True in IIS worked for US.
https://stackoverflow.com/questions/9951729/x509certificate-constructor-exception/10048789#10048789

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants