-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Note: This issue was constructed with the assistance of AI analysis of native iOS logs.
Environment
- Platform: iOS (all versions)
- SDK Version: @qonversion/[email protected]
- React Native: 0.81.5
- Expo: 54.0.21
Description
The Qonversion SDK is attempting to make HTTP requests to incomplete/malformed URLs that are missing the API hostname. This causes DNS resolution failures on iOS.
Root Cause
The SDK is constructing URLs like:
https://v1/user/inithttps://v3/users/QON_3ec1e2018a9a4c419b5c33dc59996f46/properties
Instead of properly formed URLs like:
https://api.qonversion.io/v1/user/inithttps://api.qonversion.io/v3/users/QON_3ec1e2018a9a4c419b5c33dc59996f46/properties
Error Details
Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." NSErrorFailingURLStringKey=https://v1/user/init _NSURLErrorNWResolutionReportKey=Resolved 0 endpoints in 2ms using unknown from cache
The DNS resolver is unable to find a hostname for v1 because it's not a valid domain.
Stack Trace
Task .<2> HTTP load failed Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." NSErrorFailingURLStringKey=https://v1/user/init NSErrorFailingURLKey=https://v1/user/init
Reproduction Steps
- On any iOS device
- Call Qonversion.initialize() with valid project key
- Observe: Network error with malformed URLs in logs
Expected Behavior
The SDK should construct complete, valid URLs with the proper API hostname (e.g., api.qonversion.io).
Actual Behavior
The SDK constructs incomplete URLs missing the hostname, causing DNS resolution failures.
Key Observations
- ✅ Works on Android (likely uses different URL construction or has fallback logic)
- ❌ Fails on iOS (malformed URLs)
- The issue is in the SDK's URL construction logic, not in the app's configuration
- The project key and configuration are correct (user ID is generated:
QON_3ec1e2018a9a4c419b5c33dc59996f46)
Possible Root Causes
- Missing API Base URL Configuration - The SDK may not be properly initializing the base URL for API requests
- Platform-Specific URL Construction - iOS implementation differs from Android
- Configuration Issue - Base URL not being set during initialization
- SDK Bug - URL construction logic is stripping the hostname
Workaround
None available - this is a critical SDK issue that prevents initialization entirely.