0

I'm using HockeyApp to collect crash data for my app, but for some reason it doesn't provide the stack trace.

What I have is something like that:

MyNamespace!<BaseAddress>+0x5d1287 
MyNamespace!<BaseAddress>+0x5f18d5 
MyNamespace!<BaseAddress>+0x5f1827 
Microsoft.HockeyApp.Extensibility.Windows.UnhandledExceptionTelemetryModule.CoreApplication_UnhandledErrorDetected(Object sender, ApplicationModel.Core.UnhandledErrorDetectedEventArgs e) 

so it's kinda hard to find out what's happening.

The exception message is helpful tho, as it says

Element not found. Cannot find credential in Vault

and there's just one place in which I'm using PasswordVault.

The problem here is that I'm using it inside a try/catch block, so I really don't understand why I'm getting this report, and I can't even reproduce it.

This is the full PasswordVaultService class, so that you can see exactly what I'm doing.

public class PasswordVaultService
{
    private static readonly PasswordVault Vault = new PasswordVault();

    public static string RetrieveSecret(Entry entry)
    {
        try
        {
            var results = Vault.FindAllByResource(entry.Name);
            if (results.Count == 0) return null;
            var result = results[0];
            result.RetrievePassword();
            return result.Password;
        }
        catch (Exception)
        {
            return null;
        }
    }

    public static void StoreSecret(Entry entry, string secret)
    {
        Vault.Add(new PasswordCredential(entry.Name, entry.Name, secret));
    }

    public static void DeleteSecret(Entry entry)
    {
        var results = Vault.FindAllByResource(entry.Name);
        if (results.Count == 0) return;
        var result = results[0];
        Vault.Remove(result);
    }

}

I've been getting this error for some time now, and I don't understand what's going on because the class is quite simple. Before posting I've even searched for Vault inside the project and this is the only place where I'm using the PasswordVault.

Scavenger
  • 207
  • 2
  • 9
StepTNT
  • 3,867
  • 7
  • 41
  • 82
  • This [workaround](http://stackoverflow.com/a/17955087/21567) might help (the OP had the same issue as you and it was not _really_ answered, so not voting to close this as duplicate). – Christian.K Jul 22 '16 at 09:08
  • OTOH, are you sure that exception is caused by the `RetrieveSecret` method? Couldn't it be raised by `DeleteSecret` (which has no catch block)? Try to get a stacktrace of the original exception (not the one that leads to the "unhandled exception" handler). – Christian.K Jul 22 '16 at 09:15
  • Having it in `DeleteSecret` doesn't seem logical, based on app's flow, but I can't even be sure about this since there's no way to get a stacktrace. My only chance is to push an update with a try/catch on `DeleteSecret` and just hope it worked, since I don't have this issues on my testing devices. Do you know if I can get to some kind of stacktrace from the data returned by HockeyApp? – StepTNT Jul 22 '16 at 09:23
  • 1
    Did you upload the PDB file to HockeyApp? Or did you use any third part package? These situations may case the issue on Hockeyapp. – Scavenger Jul 25 '16 at 02:44
  • I feel really dumb now. I use Visual Studio to update builds and I was quite sure it did upload symbols too (the `.appxsym` files). I've uploaded son PDB and it seems it works now. Thanks. – StepTNT Jul 25 '16 at 08:17
  • Well, VS actually uploaded `.appxsym` files but they don't work, only PDB ones are working. – StepTNT Jul 25 '16 at 08:33
  • The .appxsym file should work too, it is a bit strange. But the best way is what you did, upload the pdb file to HockeyApp. – Scavenger Jul 26 '16 at 09:54
  • I've uploaded a new build with both `appxsym` and `pdb`, and now symbols stopped working again. I guess I'll contact their support. – StepTNT Jul 26 '16 at 10:12
  • It usually will take some time to symbolize the crash log. But sometime it maybe a backend issue – Scavenger Jul 27 '16 at 03:11
  • I don't think it's a time-related issue, the logs are coming with a different hash than the symbol's one, and I've uploaded both .appxsym and zipped PDB from store. – StepTNT Jul 27 '16 at 07:43

0 Answers0