Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.AggregateException: One or more errors occurred. (corrupted stream - out of bounds length found: 147 >= 48)
---> System.IO.IOException: corrupted stream - out of bounds length found: 147 >= 48
at Org.BouncyCastle.Asn1.Asn1InputStream.ReadLength(Stream s, Int32 limit, Boolean isParsing) in //crypto/src/asn1/Asn1InputStream.cs:line 306
at Org.BouncyCastle.Asn1.Asn1InputStream.ReadObject() in //crypto/src/asn1/Asn1InputStream.cs:line 185
at Org.BouncyCastle.Asn1.Asn1Object.FromByteArray(Byte[] data) in //crypto/src/asn1/Asn1Object.cs:line 22
at Org.BouncyCastle.Security.PrivateKeyFactory.CreateKey(Byte[] privateKeyInfoData) in //crypto/src/security/PrivateKeyFactory.cs:line 33
at CorePush.Utils.AppleCryptoHelper.GetEllipticCurveAlgorithm(String privateKey) in /src/Inotify/ThridPart/CorePush/Utils/AppleCryptoHelper.cs:line 13
at CorePush.Apple.ApnSender.CreateJwtToken() in /src/Inotify/ThridPart/CorePush/Apple/ApnSender.cs:line 134
at CorePush.Apple.ApnSender.b90(String ) in /src/Inotify/ThridPart/CorePush/Apple/ApnSender.cs:line 115
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at CorePush.Apple.ApnSender.GetJwtToken() in /src/Inotify/ThridPart/CorePush/Apple/ApnSender.cs:line 115
at CorePush.Apple.ApnSender.SendAsync(Object notification, String deviceToken, String apnsId, Int32 apnsExpiration, Int32 apnsPriority, Boolean isBackground, CancellationToken cancellationToken) in /src/Inotify/ThridPart/CorePush/Apple/ApnSender.cs:line 86
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at CorePush.Apple.ApnSender.Send(Object notification, String deviceToken, String apnsId, Int32 apnsExpiration, Int32 apnsPriority, Boolean isBackground, CancellationToken cancellationToken) in /src/Inotify/ThridPart/CorePush/Apple/ApnSender.cs:line 63
at Inotify.Sends.Products.BarkSendTemplate.SendMessage(SendMessage message) in /src/Inotify/Sends/Products/BarkSendTemplate.cs:line 67
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Inotify.Sends.SendTaskManager.SendWork(Thread thread) in /src/Inotify/Sends/SendTaskManager.cs:line 179
at Inotify.Sends.SendTaskManager.<>cDisplayClass12_0.b__0(Object e) in /src/Inotify/Sends/SendTaskManager.cs:line 85
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AggregateException: One or more errors occurred. (corrupted stream - out of bounds length found: 147 >= 48) ---> System.IO.IOException: corrupted stream - out of bounds length found: 147 >= 48 at Org.BouncyCastle.Asn1.Asn1InputStream.ReadLength(Stream s, Int32 limit, Boolean isParsing) in //crypto/src/asn1/Asn1InputStream.cs:line 306 at Org.BouncyCastle.Asn1.Asn1InputStream.ReadObject() in //crypto/src/asn1/Asn1InputStream.cs:line 185 at Org.BouncyCastle.Asn1.Asn1Object.FromByteArray(Byte[] data) in //crypto/src/asn1/Asn1Object.cs:line 22 at Org.BouncyCastle.Security.PrivateKeyFactory.CreateKey(Byte[] privateKeyInfoData) in //crypto/src/security/PrivateKeyFactory.cs:line 33 at CorePush.Utils.AppleCryptoHelper.GetEllipticCurveAlgorithm(String privateKey) in /src/Inotify/ThridPart/CorePush/Utils/AppleCryptoHelper.cs:line 13 at CorePush.Apple.ApnSender.CreateJwtToken() in /src/Inotify/ThridPart/CorePush/Apple/ApnSender.cs:line 134 at CorePush.Apple.ApnSender.b90(String ) in /src/Inotify/ThridPart/CorePush/Apple/ApnSender.cs:line 115
at System.Collections.Concurrent.ConcurrentDictionaryb__0(Object e) in /src/Inotify/Sends/SendTaskManager.cs:line 85
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
2.GetOrAdd(TKey key, Func
2 valueFactory) at CorePush.Apple.ApnSender.GetJwtToken() in /src/Inotify/ThridPart/CorePush/Apple/ApnSender.cs:line 115 at CorePush.Apple.ApnSender.SendAsync(Object notification, String deviceToken, String apnsId, Int32 apnsExpiration, Int32 apnsPriority, Boolean isBackground, CancellationToken cancellationToken) in /src/Inotify/ThridPart/CorePush/Apple/ApnSender.cs:line 86 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at CorePush.Apple.ApnSender.Send(Object notification, String deviceToken, String apnsId, Int32 apnsExpiration, Int32 apnsPriority, Boolean isBackground, CancellationToken cancellationToken) in /src/Inotify/ThridPart/CorePush/Apple/ApnSender.cs:line 63 at Inotify.Sends.Products.BarkSendTemplate.SendMessage(SendMessage message) in /src/Inotify/Sends/Products/BarkSendTemplate.cs:line 67 --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Inotify.Sends.SendTaskManager.SendWork(Thread thread) in /src/Inotify/Sends/SendTaskManager.cs:line 179 at Inotify.Sends.SendTaskManager.<>cDisplayClass12_0.