-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Is Push Sharp Dead? #880
Comments
honestly its not "dead" it still works, the issue your describing has been fixed in a variety of Pull Requests, but they have not been merged to master, and i doubt they will be. So you can take the code people have written to fix the issue and build your own version of the push sharp dlls. Hope this helps. |
@Redth really needs to hand the project off to someone that can manage the pull requests. |
Just saw this comment here that notes @Redth is no longer maintaining the project; +1 to hand the project off to someone (or a few folks) to manage the PR's. #870 (comment) |
I'm happy to take suggestions for people to work on the various PR's out there... One thing to note is that until The other part of this is, Azure/AWS/* all do a great job at this problem for next to nothing. I'd encourage people to use those services instead. |
@Redth Hi 😀 It looks like the (brand new) version of .NET Core 2.1 supports Still trying to read through it all but there's a few details here if you ctrl+f for |
Ahh darn, now I'm running out of excuses! In all seriousness, I'm not sure I'll have the time to implement and maintain all of this. It would certainly be easier if someone else made a HTTP/2 client library. I also think push sharp really should be rewritten with the new System.IO.Pipeline stuff. But for some reason I don't have > 24 hours in a day.... |
@Redth Ive also looked at, instead of using client certificate (sslstream), using JWT for APNS tokenization. This would drop the need to have ALPN support i think (i could be wrong), and instead use their new auth system. And you "might" be able to use your httptwo client for it. But honestly push sharp has been working well for me, with a few PR's i merged in from the PR list. :D |
@Redth I hope you don't think I'm throwing you under the bus by any means; the project's large and maintaining / updating is non-trivial. I'm happy it exists at all 😄 there's really no open source replacement that I've found. The pipeline stuff would be nice, but probably not critical for casual users. My knowledge on the HTTP/2 stuff is zero; I just saw they came out with support for it. I'm in the same camp as @ajprala; generally everything works great. The only things I'd like to maybe see are: Some sort of fix for the service broker -- seems to hang sometimes -- could be the same problem @kg6zgj is having?
Maybe some FCM stuff -- but changing the endpoint works fine ( #870 (comment) ) |
Is there alternative for PushSharp for sending mdm push notifications (device wake up calls)? |
We've mostly migrated to AWS SNS and will be adding in support for Azure. $0.50 to send 1m push notifications is basically free. |
THIS ^^^ SO MUCH THIS ^^^ It's SO cheap now to use Azure or AWS to send notifications, just do it this way, please!!! Almost anyone who argues they can't use these services because something something security, is probably not making a strong case because you shouldn't be sending sensitive data over push notifications ANYWAY, as they go through Apple's/Google's servers regardless. If you have sensitive info to relay, you send a notification that tells the app to securely go fetch that sensitive information. Folks, I loved making PushSharp, but I really don't have the time to spend on it these days. I'm going to try and do a minor update soon which includes a couple PR's to help mitigate some bugs. I may even try and work in HTTP/2 support for APNS now that SslStream can set ALPN in .NET Core 2.1+, however it's still not a great story for devs (requiring .NET Core 2.1+). Do yourselves a favour... Go use a third party service to do this, it's super cheap. |
And if you want completely free, there is also https://onesignal.com/ |
What version of PushSharp are you using?
4.0.10
Describe your issue:
Unable to write data to the transport connection
basically once an apple notification gets queued that has a bad token the broker becomes unable to send any tokens.
I see PushSharp has not been updated for 2 years... is this a dead library?
What are the steps required to reproduce this issue?
Please provide any Exception Stack Traces
2018-07-18 14:47:44.PM [INFO] APNS-Client[1]: Sending Batch ID=338, Count=1
2018-07-18 14:47:44.PM [INFO] APNS-Client[1]: Can Write? True
2018-07-18 14:47:45.PM [INFO] APNS-CLIENT[1]: Retrying Batch: Batch ID=338, Error=System.IO.IOException: Unable to write data to the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
at System.Net.Sockets.Socket.BeginSend(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, AsyncCallback callback, Object state)
at System.Net.Sockets.NetworkStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
at System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback asyncCallback, Object asyncState)
at System.Net.Security.SslStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncCallback asyncCallback, Object asyncState)
at System.IO.Stream.<>c.b__53_0(Stream stream, ReadWriteParameters args, AsyncCallback callback, Object state)
at System.Threading.Tasks.TaskFactory
1.FromAsyncTrim[TInstance,TArgs](TInstance thisRef, TArgs args, Func
5 beginMethod, Func`3 endMethod)at System.IO.Stream.BeginEndWriteAsync(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Stream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
at System.IO.Stream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count)
at PushSharp.Apple.ApnsConnection.d__21.MoveNext()
2018-07-18 14:47:45.PM [INFO] APNS-Client[1]: Disconnecting (Batch ID=338)
2018-07-18 14:47:45.PM [INFO] APNS-Client[1]: Disconnected (Batch ID=338)
The text was updated successfully, but these errors were encountered: