*EDIT* 20 June 2013 This information has since been amended and published as KB Article 2859130.
So, you tested your application using the Windows Phone SDK tools. Everything ran flawlessly. You publish your app. You download your published app. Users download your app and report that the app crashes during its splash screen on start-up. What to do?
This scenario may occur if:
- the app was published to Marketplace, but the app is failing on a phone model that the marketplace testers did not use when validating your app.
- you have deployed your own private Company app distribution, and therefore the task of testing the app after it has been signed and published is up to you.
Here is a checklist to help you identify the root cause and solve it.
- Make sure that when you built your solution, you did so in Release mode, i.e. not Debug mode. In Visual Studio, check this using BUILD->Configuration Manager…
- Make sure you built your solution targeting the Device not the Emulator. The Emulator compiles to the X86 platform while the device compiles to ARM.
- Make sure the XAP file contains all the DLLs needed. For example if using the Windows Phone Toolkit or other third party libraries, make sure the references to those DLLs indicate CopyLocal=True.
- In Visual Studio, under the PROJECT menu, choose Open Store Test Kit. Execute the automated and manual tests. Make any necessary corrections. More information is available here.
- Your XAP file can be found in the Bin/Release folder of your project. Inspect its contents by renaming it from .XAP to .ZIP. Then double click on the newly named file to inspect its contents. You also can inspect it by using a third party tool such as WinZip.
- Also while inspecting the XAP, make sure all the DLLs that are present are known, expected DLLs, and those DLLs have been compiled specifically for use with your particular version of Windows Phone app and build environment. You might need to launch a clean build to ensure there are no stray DLLs.
- In the Dashboard, inspect the list of Capabilities for your published app, and ensure that Marketplace didn’t remove any. This problem can occur owing to the various ways Marketplace audits the app in order to identify what capabilities are needed. The solution depends on which capability is missing. As a Windows Phone 7 example, for MediaElement to be detected, its name needs to exist in the xaml itself (x:name). Find more information about Capabilities here.
- Make sure all debug APIs such as ScheduledActionService.LaunchForTest are not included in your release build.
- Do not write to the InstalledLocation folder in your production application release submitted for certification. The folder is readable and writable before it is published, but in the published app, the folder is read-only. You can however read and write to the Local Folder. For more information, refer to Data for Windows Phone.
- See if the failure is specific to a particular phone model or manufacturer. For example, determine if the problem is related to the amount of memory available in the phone.
- Before Marketplace deploys the app, its ingestion process changes the ProductID in the WMAppManifest.xml. Perhaps your app has some dependency on the ProductID that existed beforehand. An example is if your app has a hard copy of the old ProductID in a string constant. Your app may need to explicitly open WMAppManifest.xml and then inspect the ProductID in order to get the correct value.
- You can submit to Marketplace an “instrumented” version of their app as a private Beta app, which is not distributed to the public. This version could have logging etc. to make it easier to analyze; particularly if the failure is occurring after the main page has successfully launched.
You should be able to download the call stacks for the crash, by reviewing your App Hub Dashboard crash dump logs. However, sometimes the log results are of limited value. Follow the procedure below in order to enable crash reporting.
- For the phone being tested, go to settings->feedback and set it to ON.
- Make sure the phone has Wi-Fi access.
- Launch the app.
- Inspect the crash dumps in your App Hub dashboard.
Hope this helps!
Follow the Windows Store Developer Solutions team on Twitter @wsdevsol