• 0

[C#/XAML] Universal Windows Phone App Certification Issue


Question

Hey Guys,

Apologies in advance for this one, it's a tad bit obtuse.

I've recently created an app for Windows Phone 8.1 in C# and XAML. The app is pretty basic:

  1. Pulls down a website's source code
  2. Parses the code to find 2 GUIDs
  3. Uses the GUIDs to query an atom feed
  4. Feeds the results of the atom feed into a PivotItem
  5. Displays the information including a set of images.

Now, as best I can tell, there is nothing in there that could cause an exception. I've got the app running on 4 different phones (including my own), in emulators etc etc.

 

I keep failing certification as my app crashes on open during certification -_- I've been completely unable to replicate the issue.. I've completed a total rewrite in a new namespace and am still encountering the certification issue.

 

I'm just wondering if anyone has encountered anything similar in their work or has any suggestions on where I start looking etc etc.

 

I can provide source code if required, but given the nature of the issue I'd need to give you access to all the source code.

 

Thanks :(

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Are you running this code in OnLaunched or are you waiting for the app to load then firing off your process?

 

A common mistake is putting this in your OnLaunched entry point and the app doesn't respond in time so gets closed by the OS. MS are pretty strict on this and will reject the app.

 

The other thing to try is re-submit the app. Sometimes you get a dodgy tester and sails through cert next time around.

  • Like 1
Link to comment
Share on other sites

  • 0

I'm launching all of my code from MainPage.MainPage(), essentially once the page has initialised.

 

Unfortunately I've submitted a dozen or so times, and all of them are reporting the same thing, so I think there is something more to it.

 

Out of curiosity, Microsoft are apparently meant to present you a crash dump if the app is crashing, I haven't seen one thus far. Is this normal?

Link to comment
Share on other sites

  • 0

Can be a bit hard to get a crash dump out of them but no harm in asking in your notes to the tester.

 

Once you're app is in the store you'll have access to crash dumps from whatever users allow them to be uploaded.

 

Have you got a generic error handler in place? Without one even a minor untrapped error will kill your app. There's two types here standard unhandled exceptions and also exceptions thrown from async tasks. You can catch both with the following events:

        public App()
        {
            this.InitializeComponent();
            this.Suspending += this.OnSuspending;
            this.UnhandledException += App_UnhandledException;
            TaskScheduler.UnobservedTaskException += OnUnobservedTaskException;
        }

        void OnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
        {
            
        }
        void App_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            
        }

  • Like 1
Link to comment
Share on other sites

  • 0

 

Can be a bit hard to get a crash dump out of them but no harm in asking in your notes to the tester.

 

Once you're app is in the store you'll have access to crash dumps from whatever users allow them to be uploaded.

 

Have you got a generic error handler in place? Without one even a minor untrapped error will kill your app. There's two types here standard unhandled exceptions and also exceptions thrown from async tasks. You can catch both with the following events:

        public App()
        {
            this.InitializeComponent();
            this.Suspending += this.OnSuspending;
            this.UnhandledException += App_UnhandledException;
            TaskScheduler.UnobservedTaskException += OnUnobservedTaskException;
        }

        void OnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
        {
            
        }
        void App_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            
        }

Oh dude, you're a god send.

 

I submitted my app without code yesterday to ensure that my app wasn't failing due to security/reference issues. It passed, so I've started to re-implement code blocks.

 

I'll add what you have suggested and run the code locally to see if I can catch it. Just infuriating that the code runs happily locally and is failing certification.

 

Thanks very much for the suggestion, I'll implement now :)

Link to comment
Share on other sites

  • 0

Forgot to add that you need to mark the exception as handled as well...

        void OnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
        {
            Debug.WriteLine(e.Exception.ToString());
            e.SetObserved();
        }

        void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            Debug.WriteLine(e.Exception.ToString());
            e.Handled = true;
        }
Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.