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

[BUG] Crash on NUGET #330

Open
3 tasks
harrypotter06 opened this issue Sep 28, 2024 · 0 comments
Open
3 tasks

[BUG] Crash on NUGET #330

harrypotter06 opened this issue Sep 28, 2024 · 0 comments

Comments

@harrypotter06
Copy link

Describe the bug
Crash is Send notification to fcmV1

Exception or Stack Trace
Error: Unhandled Exception
System.Exception: CurrentDomainOnUnhandledException
--->
Microsoft.Azure.NotificationHubs.Messaging.MessagingException: Unexpected exception encountered TrackingId:3ccc6775-0918-414d-904d-ab6630396339,TimeStamp:2024-09-28T19:33:25.7687821Z
--->
System.Net.Http.HttpRequestException: An error occurred while sending the request.
--->
System.Net.Http.HttpIOException: The response ended prematurely. (ResponseEnded)

at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)

--- End of inner exception stack trace ---

at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)

at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)

at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)

at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)

at Microsoft.Azure.NotificationHubs.NotificationHubClient.SendRequestAsync(HttpRequestMessage request, String trackingId, HttpStatusCode[] successfulResponseStatuses, CancellationToken cancellationToken)

--- End of inner exception stack trace ---

at Microsoft.Azure.NotificationHubs.ExceptionsUtility.HandleUnexpectedException(Exception ex, String trackingId)

at Microsoft.Azure.NotificationHubs.NotificationHubClient.SendRequestAsync(HttpRequestMessage request, String trackingId, HttpStatusCode[] successfulResponseStatuses, CancellationToken cancellationToken)

at Microsoft.Azure.NotificationHubs.NotificationHubClient.<>c__DisplayClass203_0.<b__0>d.MoveNext()

--- End of stack trace from previous location ---

at Microsoft.Azure.NotificationHubs.NotificationHubRetryPolicy.d__4`1[[Microsoft.Azure.NotificationHubs.NotificationOutcome, Microsoft.Azure.NotificationHubs, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext()

at Microsoft.Azure.NotificationHubs.NotificationHubRetryPolicy.d__4`1[[Microsoft.Azure.NotificationHubs.NotificationOutcome, Microsoft.Azure.NotificationHubs, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext()

at Microsoft.Azure.NotificationHubs.NotificationHubClient.SendNotificationImplAsync(Notification notification, String tagExpression, String deviceHandle, CancellationToken cancellationToken)

at EU_Schwerbehinderung_Premium.BackHelpers.BW5AzureServices.SendRawNotificationAsync(String toast)

at EU_Schwerbehinderung_Premium.BackHelpers.GeofenceTransitionsIntentService.AlertSender()

at EU_Schwerbehinderung_Premium.BackHelpers.GeofenceTransitionsIntentService.GeofenceUpdatesCheck(Intent intent)
at System.Threading.Tasks.Task.<>c.b__128_1(Object state)

at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()

at System.Threading.ThreadPoolWorkQueue.Dispatch()

at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

--- End of inner exception stack trace ---

To Reproduce
NotificationHubClient hub;
string HUB_NAME = "MyHub";
string HUB_LISTEN_SECRET = "MySecret";
hub = new NotificationHubClient(HUB_LISTEN_SECRET, HUB_NAME);
var toast = MyTextMessage
var MyMessage = "{ 'message': { 'notification': { 'body' : '" + toast + "'} } }";
var PF_Message = hub.SendFcmV1NativeNotificationAsync(MyMessage);

Code Snippet
see To Reproduce

Expected behavior
sometimes it works, sometimes not - think NUGET es no Errorroutine, so it make a crash

Screenshots
If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS:Android 14
  • IDE : Visual Studio 2022
  • Version: 4.2.0

Additional context
Add any other context about the problem here.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
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

1 participant