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

Fatal error: 'try!' expression unexpectedly raised an error: PrebidMobile.ErrorCode.prebidServerURLInvalid("https://example.com") #1052

Open
briantci opened this issue Sep 13, 2024 · 0 comments

Comments

@briantci
Copy link

Describe the bug

When trying to set a custom prebid server, I always get the following error:

Fatal error: 'try!' expression unexpectedly raised an error: PrebidMobile.ErrorCode.prebidServerURLInvalid("https://example.com")

I have followed the steps from the official docs, but I am always getting the same error message, no matter what URL I am using.

When looking at the root of this problem, I see that in the Pods -> PrebidMobile -> core -> Host file, there's a verifyUrl method that contains the following line of code:

return UIApplication.shared.canOpenURL(url)

This line is causing the error to be thrown, because of the canOpenURL method returning false.

After thoroughly reading the Apple docs regarding this function, I still don't understand why it returns false when using regular URL, like https://example.com

To Reproduce

  1. Set up a new swift app
  2. Follow the steps from the official docs

Expected behavior

A successful connection to my self-hosted prebid server.

Desktop:

  • OS: macOS Sonoma 14.6.1

Smartphone:

  • Device: iPhone 15 Pro (Simulator)
  • OS: iOS 17.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage
Development

No branches or pull requests

1 participant