NSErrorFailingURLKey is null
Hello. I just created a new NativeScript test application. When I run "tns run ios --syncAllFiles" and then do a request behind a proxy (which fails because the emulator is not behind that proxy) the plugin throws an error. In https.ios.js on line 64 "error.userInfo.objectForKey('NSErrorFailingURLKey')" evaluates to "null" which crashes the app because "null is not an object (evaluating 'error.userInfo.objectForKey('NSErrorFailingURLKey').description')".
I am getting the same issue. Is this plugin still being working on?
I'm facing the same issue in one of our applications. Any inputs or workarounds on how this can be resolved?
I was just hit by this, and after fighting a bit with it i found the issue in my case.
When passing, "Content-Type": "application/json" and another header (in my case an auth token) make sure the response returns parseable json otherwise you get those crashes. Alternatively put another header like text/html
I will fix this!
@farfromrefug , thanks. As long as the responses are ok it should be fine anyway, my guess it's AFJSONResponseSerializer that explodes on invalid responses.
@PolCPP fixed in the repo. @EddyVerbruggen needs to publish it
Oh, awesome! Thanks!