IOS (objective C) tracker does not send requests with error 'unsupported URL'

Hi all,

We recently updated from objective C tracker 1.04 to 1.3.1. With this change, the snowplow events don’t seem to get sent anymore due to error message:

SPLog: Error: Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo={NSLocalizedDescription=unsupported URL, NSUnderlyingError=0x28156f150 {Error Domain=kCFErrorDomainCFNetwork Code=-1002 "(null)"}}

The error seems to occur as a result of the function - (NSMutableURLRequest *) getRequestGetWithString:(NSString *)url within the tracker library, failing to create a valid NSURL from a valid snowplow URL string (we checked it in a browser and it gave a status 200) that it receives as a parameter, after which it becomes ‘null’. This seems to be a bug within the Snowplow tracker library, but since I cannot find other issues related to this maybe there is something that we can actually do to fix it ourselves?

FYI: when we reverted to version 1.2.0 of the objective C tracker we stopped having the error.

Versions:

  • Project compiled for iOS13 SDK
  • SnowplowTracker version 1.3.1

Hi @dvdvoorn , sorry to hear that.

Thanks for the detail about v.1.2.0, I’ve rapidly checked in the changelog and I think the issue could be caused by https://github.com/snowplow/snowplow-objc-tracker/issues/493 .

We updated the code for urlEncodeString: and probably the url you provide is not correctly processed (like it was in the previous version).

We are debugging it to spot any issue with that, meanwhile if you have any further detail about the issue, please, let us know.

2 Likes

An update on the issue reported.
It should be fixed in the last iOS tracker version 1.4.0.

Here the release post: Snowplow iOS Tracker 1.4.0 released

Here the GitHub issue discussed above: https://github.com/snowplow/snowplow-objc-tracker/issues/525