Unity 5 + Parse + iOS = NSURLErrorDomain error -1012

Hi,

Seems like Unity 5 has a bug resulting in an NSURLErrorDomain error when trying to call the Parse API. According to what I have seen in other post from people with similar issues seems like this error happens with certain APIs (not just the Parse one) and Unity 5, but not with Unity 4.

Do you have any workaround that I could use while you are fixing this issue? I need to continue working on Unity 5 (switching back to Unity 4 is not an option) with the Parse API asap.

Please help!

Thank you
Antonio

@aparraga This is known bug, as confirmed in these threads Unity 5 API Authentication - Unity Engine - Unity Discussions NSUrlDomainError -1012 on iOS - Unity Engine - Unity Discussions .

Edit: a word

I see. Thank you for your clarification.
Does anybody have any “non-production ready” workaround while you are fixing the issue? e.g. to use a proxy server to avoid ssl, anything else?

Thank you
Antonio

we temporary stick to http (which is not an issue, since we’re using AES encryption anyway).

Did you mean that you are calling Parse via http? how?

thank you

Can you share with us how to?

Hi,
The bug has been fixed and the fix will likely to be released in 5.0.0p3 and 4.6.3p4.

@povilas Thanks for the heads-up!

Just installed the 5.0.0p3 and the error still occurs.
I’m unable to deploy my app to my customers because of this!!!

1 Like

FIX THIS PLZ, I was also waiting for this.

We thought this would be fixed with 5.0.0p3. But, we just tested and this is still not resolved.
With which patch and when will it be fixed?

1 Like

I’m unable to deploy my app to my customers because of this!!!
please fix it!

1 Like

I got this issue when try to load image from FB too. Without HTTPS it works well

We really need it, please fix it soon.

1 Like

The bug we knew about in this case was corrected in 5.0.0p3. However, this might be something slightly different. If possible, please try using the Api Compatibility Level with a value of .NET 2.0 Subset (if you are not already). The Subset profile takes a different code path through the HTTPs code which might work better.

Hi Josh,

I have tried them all (with or without Subset), it’s still there for iOS. This is what I do:

IEnumerator downloadByUrl(string url, string pathFile, Action<string, WWW> actionCallback, bool loadLocal) {
        bool isResult = true;
        url = url.Replace("\\/", "/");
        WWW www = new WWW("");

#if UNITY_WEBPLAYER
        if (loadLocal == false) {
#else
        if (!File.Exists(pathFile) || loadLocal == false) {
#endif
            isResult = false;

            www = new WWW(url);
            yield return www;
         
            if (www != null && www.error == null) {
                if (www.isDone) {
                    byte[] data = www.bytes;
                    if (data.Length > 0) {
                        isResult = true;
#if !UNITY_WEBPLAYER
                        File.WriteAllBytes(pathFile, data);
#endif
                    }
                }
            }
        }

        if (actionCallback != null && isResult) {
            actionCallback(pathFile, www);
        }
}

Use whatever image from FB:

Android is alright. Please give us some advises.
Thanks

@vinhquang

Thanks for trying these cases. I have one more for you to try (if you have not). Does this work with the Mono scripting backend? The original bug here was not specific to the IL2CPP scripting backend, but failed for both scripting backends. Thanks.

Does anyone have the Parse lib working with the p3?

@aparraga

I’ve not tried the Parse SDK with any 5.0 releases yet. However, Parse v1.3.5 does work with the latest 4.6 patch release, so it is probably worth trying with the 5.0.0p3 release, as it has the same IL2CPP code at the 4.6.3p4 release.

I have tried this thing and still got error:

@vinhquang

Thanks again for trying this. Could you submit a new bug for this issue? It seems that we thought the issue was corrected, but it is not.