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]: HTTPClientError OneSignal Server Side Error #1291

Closed
1 task done
MobIS1User opened this issue Aug 8, 2023 · 10 comments
Closed
1 task done

[Bug]: HTTPClientError OneSignal Server Side Error #1291

MobIS1User opened this issue Aug 8, 2023 · 10 comments

Comments

@MobIS1User
Copy link

MobIS1User commented Aug 8, 2023

What happened?

One Signal,

Our production monitoring system for one of our apps has noticed an incident like this 12 times in the last month:
https://hunter-industries-mz.sentry.io/share/issue/d4f300dfa5e94863b4bddd9d4cce2bbe/

PerAI analysis and our analysis of the stack track, it appears to be an issue occurring in OneSignal servers:
“This is a log for an HTTP Client Error with a 500 status code that occurred on an iPhone 8 Plus device.

HTTP status codes in the 500 range typically indicate a server-side error, meaning the problem is not with your request or your device, but rather with the server that you're trying to connect to.

In this case, it appears that the error occurred during a POST request to a URL from the OneSignal API (https://api.onesignal.com/players/e6ae5d4e-8480-4223-a2e5-c38c82e3a480/on_session). OneSignal is a service for push notifications, email, and in-app messages.

The 500 status code indicates a "server error." This means that the server encountered an unexpected condition which prevented it from fulfilling the request. The server logs should provide more insight into what went wrong on the server-side to cause the error.

The error appears to have been triggered when calling _CFNetworkErrorGetLocalizedRecoverySuggestion, part of the CFNetwork framework, which provides a set of high-performance, asynchronous, object-oriented APIs for networking.

The event log also provides detailed information about the device, the application, and the specific event (with breadcrumbs showing the sequence of events leading up to the error).

To fix this issue, you might want to ensure that the server-side service is working correctly. If you don't have control over the server-side service, you might need to reach out to the service provider for support.”

Thoughts?
Thanks for your time!

P.S. One Signal App Id is "97061e06-ebd9-41cd-8e9b-9afc478c0ab1"

Steps to reproduce?

Register a user programmatically in a mobile app and sometimes get back a 500 error

What did you expect to happen?

Not to error out

OneSignal iOS SDK version

onesignal_flutter version 3.5.1

iOS version

15

Specific iOS version

* 16.2
* 16.5
* 16.3.1
* 16.6

Relevant log output

see link above

Code of Conduct

  • I agree to follow this project's Code of Conduct
@MobIS1User
Copy link
Author

history

@MobIS1User
Copy link
Author

@MobIS1User
Copy link
Author

Another incident this week: https://hunter-industries-mz.sentry.io/share/issue/d4f300dfa5e94863b4bddd9d4cce2bbe/

AI analysis...

Issue ID: FLUTTER-2J
Environment: Production
Status: Ongoing
Level: Error
Error Description: HTTP Client Error with status code 502
Event Information:

Event ID: ea23e069
Date and Time: Sep 13, 7:50 PM
Users affected: 2
Event Origin: iOS
OS Version: iOS 16.6.1
Device: iPhone 13 Pro Max
Mechanism: HTTPClientError
Event Details:

The error is related to a network request with a status code 502 (Bad Gateway).
The URL causing the error is https://api.onesignal.com/players/4c031217-87ac-4644-8219-040227189e60/on_session.
The error appears to be occurring in a thread related to CFNetwork.
Additional Information:

The application is running in production environment.
The issue has been observed on iOS devices, particularly on iPhone 13 Pro Max.
The application version is 1.72.110213.
The error level is categorized as "error."
The device is not rooted.
The error seems to be associated with the SDK sentry.cocoa.flutter.
To address this issue, you may want to consider the following steps:

Check Server Status: Since this error is related to a network request, ensure that the server at https://api.onesignal.com is functioning correctly and that there are no issues on their end.

Network Configuration: Review your network configuration and make sure there are no issues with connectivity. A 502 error often indicates a problem with the server or network infrastructure.

SDK and Library Updates: Check if there are any updates available for the SDK (sentry.cocoa.flutter) and any relevant libraries. Updating to the latest versions might resolve compatibility issues.

Error Handling: Implement proper error handling in your application to gracefully handle HTTP errors like 502. You can provide user-friendly error messages or retry mechanisms.

Load Testing: Consider load testing your application and server to ensure that they can handle the expected load without encountering such errors.

Logging and Monitoring: Implement comprehensive logging and monitoring to track and diagnose such issues in real-time. This will help you identify patterns and potential causes.

Remember to consult with your development and operations teams to investigate and address this issue effectively. Additionally, if you have access to support resources from the service at https://api.onesignal.com, consider reaching out to them for assistance with this specific error.

@MobIS1User
Copy link
Author

Unfortunately it looks like this has happened again 11 more times for our users in the past 24 hours.
https://hunter-industries-mz.sentry.io/share/issue/d4f300dfa5e94863b4bddd9d4cce2bbe/

@MobIS1User
Copy link
Author

Several more instances of this in the last 24 hours:
https://hunter-industries-mz.sentry.io/share/issue/f6b4485b7f094995b5ded9767567b65c/

@MobIS1User
Copy link
Author

Seeing about 18 occurrences in the last 24 hours
https://hunter-industries-mz.sentry.io/share/issue/f6b4485b7f094995b5ded9767567b65c/

@MobIS1User
Copy link
Author

@Austin117
Copy link

10 times for our app in the last 24 hours:
https://hunter-industries-mz.sentry.io/share/issue/f6b4485b7f094995b5ded9767567b65c/

@nan-li
Copy link
Contributor

nan-li commented Jan 17, 2024

Hi @MobIS1User and @Austin117, thank you for reporting,

The 500-range errors (as well as all HTTP errors) are monitored by our backend teams. When the SDK encounters these responses from https://api.onesignal.com/players/PLAYER_ID/on_session, it does indeed have a retry system in place to retry failed requests up to 3 times with delays and backoffs.

Hope this information helps!

@nan-li nan-li closed this as completed Jan 17, 2024
@MobIS1User
Copy link
Author

Sounds good thanks!

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

3 participants