Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation says an UWP Crash preview is available, but on nuget it is not. #544

Closed
Trolldemorted opened this issue Dec 10, 2017 · 14 comments
Labels

Comments

@Trolldemorted
Copy link

The App Center's changelog says:

UWP Crash preview released: Visual Studio App Center now offers a preview of our support for getting Crash data from your UWP apps.

The Crashes documentation has an article describing how to use it on UWP:

PM> Install-Package Microsoft.AppCenter.Crashes
AppCenter.Start("{Your App Secret}", typeof(Crashes));

But when I do that, AppCenter states that Crashes is not yet supported:

[AppCenter] ASSERT: App Center SDK configured successfully.
[AppCenter] WARN: Crashes service is not yet supported on this platform.

Is the preview really available? Also I searched this repo for the error message and could not find a thing - where is it logged?

@myokeeh
Copy link

myokeeh commented Dec 11, 2017

Yes, preview is available. I've added it and have seen crashes show up in App Center. I also have the same issue with docs and messages not being up-to-date.

@Trolldemorted
Copy link
Author

Where can we get it? Nuget offers 1.0.1, and it prints the "not yet supported" warning and does not submit crashes.

@achocron
Copy link
Contributor

You can ignore the message; it needs to be removed. In order for your application to send crashes, it needs to be in the Windows Store.

@Trolldemorted
Copy link
Author

Trolldemorted commented Dec 11, 2017

My app is in the store (promo-code only so far) and my self-built instance is properly connected to the store, but a test crash I triggered yesterday does not appear in the app center.

Edit: Crashes.Instance.InstanceEnabled is false after calling AppCenter.Start. Is that intended?

AppCenter.Start("XXX", typeof(Crashes));
Debug.WriteLine(Crashes.Instance.InstanceEnabled);

@achocron
Copy link
Contributor

Yeah, false is intended. For UWP, the Crashes APIs don't actually do anything. It's strange that the crashes aren't appearing, but it doesn't sound like it's SDK related. Could you please open a support ticket on the App Center portal? Just start a conversation with the message bubble in the bottom right. Thank you!

@Trolldemorted
Copy link
Author

I have sent them a message, let's hope they can shed some light onto this.

Some minor things I have noticed while typing my support request:

  • my control panel's "security and maintenance" page lists the crashes properly
  • the problem details page for each crash says "The report has been sent"
  • I have set a callback to Crashes.GetErrorAttachments that writes to my logfile, but apparently the method never gets called as the message never appears in the logs

@guperrot
Copy link
Member

guperrot commented Dec 13, 2017

Hi, as mentioned in a previous comment, none of the advanced Crashes APIs work on UWP (we support only starting Crashes in AppCenter.Start to register crash at Windows system level), other APIs work only on Xamarin.

Crash attachments on UWP are not yet supported. I will let @achocron answer on the other aspects of the issue.

Also we released version 1.1.0 which removes the message about crash not being supported in UWP. It will instead print an error if the registration to the system level crash reporting fails.

Please note that crash reporting on UWP works only if your application is associated to the store and if the device runs Windows 10 Creators update at minimum. Also Windows 10 is sending crashes only when the device is plugged to power.

Crashes sent from an adhoc release build will appear in portal unsymbolicated. Symbolication can occur only if the application has been installed from windows store.

@Trolldemorted
Copy link
Author

Crashes.GetErrorAttachments is not marked as deprecated on UWP, you might want to mark it as I assumed that it worked since it was not. Can you estimate when we will get attachments?

I have updated to 1.1.0 but I don't see any changes. If I let the app crash without a debugger attached, with both versions a .dmp is created in ApplicationData.Current.LocalCacheFolder\AC, but it is not uploaded to appcenter.

If I start&crash the app with a debugger attached, the sdk prints the following:
pre-crash:

[AppCenter] DEBUG: No named identifier found in appSecret; using as-is
[AppCenter] DEBUG: AddChannel(core)
[AppCenter] ASSERT: App Center SDK configured successfully.
[AppCenter] INFO: 'Crashes' service started.
[AppCenter] DEBUG: triggerIngestion(core) pendingLogCount=1
[AppCenter] DEBUG: Trying to get up to 50 logs from storage for core
[AppCenter] DEBUG: The SID/ID pairs for returning logs are:
(null) / 56
[AppCenter] DEBUG: CheckPendingLogs(core) pending log count: 0
[AppCenter] DEBUG: Deleting logs from storage for channel 'core' with batch id '478369da-7439-4245-a5ab-a1ac2ee5ae42'
[AppCenter] DEBUG: The IDs for deleting log(s) is/ are:
56

post-crash:

[AppCenter] DEBUG: No named identifier found in appSecret; using as-is
[AppCenter] DEBUG: AddChannel(core)
[AppCenter] ASSERT: App Center SDK configured successfully.
[AppCenter] INFO: 'Crashes' service started.
[AppCenter] DEBUG: CheckPendingLogs(core) pending log count: 1
[AppCenter] DEBUG: triggerIngestion(core) pendingLogCount=1
[AppCenter] DEBUG: Trying to get up to 50 logs from storage for core
[AppCenter] DEBUG: The SID/ID pairs for returning logs are:
(null) / 57
[AppCenter] DEBUG: CheckPendingLogs(core) pending log count: 0
[AppCenter] DEBUG: Deleting logs from storage for channel 'core' with batch id 'af71a44e-1566-435d-97ca-6ea59cc740bb'
[AppCenter] DEBUG: The IDs for deleting log(s) is/ are:
57

My test device is my W10 desktop, it is always connected to power and running the FCU.

Unsymbolicated crashes make sense, but the appcenter shows nothing:

No crash groups found with current filters.
Probably something to be happy about.

How can I log AppCenterSDK's output to a file? It would be great if it would use my own ILoggerProvider.

@guperrot
Copy link
Member

guperrot commented Dec 13, 2017

Crashes.GetErrorAttachments is defined in a .NET standard portable component and that's why it is visible in all platforms as we want to support Xamarin.Forms. We will investigate if we can mark it obsolete for UWP.

Currently we don't have any way to redirect output from AppCenterSDK as it uses only Debug.WriteLine.

Is your application having a valid association to the Windows Store? Even for unsymbolicated crashes it still needs the package association (no actual publishing required).
What Windows update version are you testing on? It needs creators update at minimum.

@Trolldemorted
Copy link
Author

Trolldemorted commented Dec 13, 2017

Crashes' other members like ShouldProcessErrorReport are marked as deprecated, so when I noticed GetErrorAttachments was not I assumed it should be working.

I connected the app with the store, and I am using the same desktop to build appxuploads for the store, so I think it is properly connected - here is our Package.StoreAssociation.xml, if you want to have a look.

My desktop is running W 10 Pro N, version 1709, build 16299.98.

Edit: The analytics appear to work, at least I see my sessions in the overview. This wouldn't work if the app were not properly associated with the store, am I correct?

@achocron
Copy link
Contributor

GetErrorAttachments should indeed be marked obsolete, and as Guillaume mentioned we will look into fixing that. Your build of Windows is post-creators update, so that isn't the problem. However, Analytics will work regardless of the store association.

It doesn't seem to me that the issue is related to your setup or SDK integration. Would you mind moving the conversation over to Intercom? Just press the blue chat bubble in the bottom right of the App Center portal. That should connect you to someone who can help with this. Thanks!

@Trolldemorted
Copy link
Author

Sure, I did that 6 days ago, so far no response that would have helped me though :(

@aweck
Copy link

aweck commented Sep 6, 2019

@guperrot is this issue still present as of 9/6/2019? UWP seems to upload crashes, but Crashes.GetErrorAttachments is never called.

@guperrot
Copy link
Member

guperrot commented Sep 6, 2019

Yes the UWP SDK still does not have attachment support as of today. It's on the roadmap for 2019 https://github.com/Microsoft/appcenter/wiki/Roadmap and should be supported at the same time as "Support sideloaded UWP apps".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants