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

Incorrect fetch demand result when internet connection is not available #668

Closed
linean opened this issue Aug 16, 2023 · 2 comments · Fixed by #760
Closed

Incorrect fetch demand result when internet connection is not available #668

linean opened this issue Aug 16, 2023 · 2 comments · Fixed by #760
Assignees

Comments

@linean
Copy link
Contributor

linean commented Aug 16, 2023

Describe the bug
I have noticed unexpected SDK behavior when I disconnect the device from the network when Prebid ad is auto-refreshing. MediationBannerAdUnit.fetchDemand returns FetchDemandResult.SERVER_ERROR and I think the correct one should be either NETWORK_ERROR or TIMEOUT.

I've checked implementation details and FetchDemandResult is parsed from the error message which in my case is:

SDK internal error: Invalid bid response: Initialization failed: No internet connection detected

I propose we change FetchDemandResult.parseErrorMessage to check if the message contains No internet connection detected and return NETWORK_ERROR.

To Reproduce
Steps to reproduce the behavior:

  1. Show Prebid banner with auto refresh enabled
  2. Disable network connection
  3. Observe FetchDemandResult from `MediationBannerAdUnit.fetchDemand
  4. You get FetchDemandResult.SERVER_ERROR suggesting there is some issue with the server

Expected behavior
SDK should return NETWORK_ERROR because the network is not available.

Smartphone

  • SDK Version: 2.1.0
@jsligh
Copy link
Collaborator

jsligh commented Jun 3, 2024

@linean is this still an issue?

@linean
Copy link
Contributor Author

linean commented Jun 3, 2024

I don't use Prebid anymore and unfortunately I can't tell. Repro steps are pretty simple, you should be able to reproduce it on your end.

@jsligh jsligh moved this from Triage to Ready for Dev in Prebid Mobile Prioritization Jun 4, 2024
@jsligh jsligh linked a pull request Jun 4, 2024 that will close this issue
@jsligh jsligh moved this from Ready for Dev to In Progress in Prebid Mobile Prioritization Jun 4, 2024
@jsligh jsligh added in review and removed in review labels Jun 4, 2024
@jsligh jsligh self-assigned this Jun 4, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Prebid Mobile Prioritization Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants