Skip to content

Parse Crash on NameResolutionFailure #81

@habermeier

Description

@habermeier

I got the below crash report from my app -- from a tester in India.

Unclear to me where it's coming from. The only Parse Code calls I'm making from iOS is as follows:

        public AppDelegate()
        {
            var info = ParseHelper.GetInfo(App.ReleaseType);
            ParseClient.Initialize(info.AppId, info.NetKey);
        }
...
        public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken) 
        {

            Console.WriteLine("RegisteredForRemoteNotifications");
            ParseInstallation installation = ParseInstallation.CurrentInstallation;
            installation.SetDeviceTokenFromData(deviceToken);
            installation.SaveAsync().ContinueWith(t => {
                if (t.IsFaulted) {
                    Console.WriteLine("Push SaveAsync Exception: {0}", t.Exception);
                }
            });

        }
...

        public override void ReceivedRemoteNotification(
            UIApplication application,
            NSDictionary userInfo
        ) {
            // We need this to fire userInfo into ParsePushNotificationReceived.
            ParsePush.HandlePush(userInfo);
        }

        void HandleParsePushNotificationReceived(object sender, ParsePushNotificationEventArgs args)
        {
            Console.WriteLine("Got a Push Notification!");
        }

...

        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
          ...
          ParsePush.ParsePushNotificationReceived += HandleParsePushNotificationReceived;
          ...
        }

The exception I get is as follows...

*** Terminating app due to uncaught exception 'System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread.', reason: 'System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.Net.WebException: Error: NameResolutionFailure
  at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) [0x00045] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net/HttpWebRequest.cs:829 
  at System.Threading.Tasks.TaskFactory`1[System.IO.Stream].FromAsyncCoreLogic (IAsyncResult iar, System.Func`2 endFunction, System.Action`1 endAction, System.Threading.Tasks.Task`1 promise, Boolean requiresSynchronization) [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61 
  at Parse.Internal.InternalExtensions+<OnSuccess>c__AnonStorey2`1[System.Threading.Tasks.Task].<>m__0 (System.Threading.Tasks.Task t) [0x0003c] in <filename unknown>:0 
  at System.Threading.Tasks.ContinuationResultTaskFromTask`1[System.Threading.Tasks.Task`1[System.Threading.Tasks.Task]].InnerInvoke () [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.Execute () [0x00016] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2523 
  --- End of inner exception stack trace ---
---> (Inner Exception #0) System.Net.WebException: Error: NameResolutionFailure
  at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) [0x00045] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net/HttpWebRequest.cs:829 
  at System.Threading.Tasks.TaskFactory`1[System.IO.Stream].FromAsyncCoreLogic (IAsyncResult iar, System.Func`2 endFunction, System.Action`1 endAction, System.Threading.Tasks.Task`1 promise, Boolean requiresSynchronization) [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61 
  at Parse.Internal.InternalExtensions+<OnSuccess>c__AnonStorey2`1[System.Threading.Tasks.Task].<>m__0 (System.Threading.Tasks.Task t) [0x0003c] in <filename unknown>:0 
  at System.Threading.Tasks.ContinuationResultTaskFromTask`1[System.Threading.Tasks.Task`1[System.Threading.Tasks.Task]].InnerInvoke () [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.Execute () [0x00016] in /Users/builder/data/lanes/2320/1f068b49/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/threading/Tasks/Task.cs:2523 <---

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions