Closed friar6123 closed 1 year ago
Hi @friar6123 ! Thanks for the report!
Which SDK version do you use? Unfortunately I can't reproduce the issue.
Also, please, pay attention that in the next release the support of custom server endpoints will be changed as described here: https://github.com/prebid/prebid-mobile-ios/issues/786.
I am using 2.0.8
Have you changed anything in the SDK code? I can reproduce the output only if I change the code in checkServerStatus
method to
guard let serverURLHost = URL(string: try Host.shared.getHostURL(host: Prebid.shared.prebidServerHost))?.absoluteString else {
completion(.failed, PBMError.error(description: "Provided host URL is not valid"))
return
}
....
Change: the .host
was changed to .absoluteString
.
In this case I see the same output that you reported. But with original code I still can't reproduce the issue. Unfortunately, this line is not visible on your screenshot in the report.
What version of Xcode and iOS do you use?
You are correct, I had changed .host to .absoluteString in an effort to find a solution to the problem. On my end, when I use the original prebid-mobile-ios code (.host) I still see the following problem which is the actual issue I was trying to resolve when I unlocked the cocoapod
The /aCustomPrebidServer goes away and the endpoint requested becomes https://www.mydomain.com/status instead of https://www.mydomain.com/aCustomPrebidServer/status
Do you see this behaviour? xcod 14.2 ios 16 simulator
As in, when initializing the sdk with https://www.myDomain.com/aCustomPrebidServer/ the host gets changed to https://www.myDomain.com/
I see.
In this case, you should wait for the next release, 2.0.9
, and utilize the new property customStatusEndpoint
. The details and motivation in #786.
Long story short - Prebid Server doesn't provide any policy for the location of /status
endpoint. So SDK can't guess it. And the best solution is just to provide SDK with an actual, complete /status
endpoint.
Note: even if SDK signals about initialization error due to the malformed status endpoint, it still works correctly.
In this task's scope, I will review the design of the initialization callback to make a status error notification manageable.
Ok gotcha, so even though a swift error is thrown during prebid initialization due to /status failure I can continue to utilize the sdk?
I have not checked yet, but will the same problem with /aCustomPrebidServer at the end of server URL cause the same issue with the other endpoints prebid mobile calls as part of the header bidding process?
Is there a timeline for 2.0.9 release?
/auction
endpoint to the SDK via Prebid.shared.setCustomPrebidServer
. This is the single endpoint used for running hb auction. 2.0.9
this weekHi @friar6123 ! Is this issue still actual?
Hi @YuriyVelichkoPI thank you for your help on this. 2.0.9 status changes worked for our situation
Describe the bug The path builder has a bug in it which makes the endpoint URL broken.
To Reproduce Steps to reproduce the behavior:
Expected behavior
Should the request URL be this? https://www.myDomain.com/aCustomPrebidServer/status
Screenshots
Desktop (please complete the following information):
Additional context We need to have the /aCustomPrebidServer part on the URL, that is a design requirement