Application Insights Debug Snapshot issue “Unexpected error has occurred”


This post on the Debug Snapshot feature of Application Insights comes to us from Premier Developer consultant Adel Ghabboun.


A couple of days ago, I encountered an ambiguous issue while trying to open the debug snapshot feature in Application Insights following Debug snapshots on exceptions in .NET apps.

The error was “Unexpected error has occurred. We are currently having issues with this request. Please open this page again and try again, if problem persists please file a support ticket or contact us directly” as shown below:

clip_image003clip_image001 clip_image005

I was working on a test application to try out the Remote debug feature in Azure Application Insights, where I immediately stopped running the application right after the exception was caught in the Try ... Catch block (code is similar to this):

TelemetryClient client = new TelemetryClient();
       try
       {
           var num1 = 10;
           var num2 = 0;
           var result = num1 / num2;               
       }
       catch (Exception e)
       {
           var properties = new Dictionary<string, string>
           {{"User", "ADEL"}};

           var measurements = new Dictionary<string, double>
           {{"Location", 3 }};

           client.TrackException(e,properties,measurements);
       }

After troubleshooting the issue, there was a log file “Uploader.log” generated under %TEMP%\Dumps\<ikey> where it captured all my application logs.

When the application was exiting, it caused the MinidumpUplaoder.exe to exit before it had a chance to upload the snapshot minidump (.dmp) files.

The MinidumpUploader process is launched from your application and will exit when your application exits – even if there are .dmp files that haven’t been uploaded. So that means the snapshot was still in Waiting state to be uploaded next time I run my application.

This is what my Uploader.log looked like:

MinidumpUploader.exe Information: 0 : Parent process exited. Cancelling.

DateTime=2017-10-31T16:32:19.6943437Z

MinidumpUploader.exe Information: 0 : Snapshot uploader exiting.

DateTime=2017-10-31T16:32:19.6953440Z

That says a snapshot was created, but MinidumpUploader.exe exited before the .dmp file for that snapshot was ready. And then I launched my application again and checked the uploader file

MinidumpUploader.exe Information: 0 : Snapshot uploader successfully started. Watching folder …..\Temp\Dumps\[iKey] for new dump files.

DateTime=2017-10-31T16:33:23.6246308Z

Looks like the .dmp file from previous run was discovered:

MinidumpUploader.exe Information: 0 : Scheduled 1 left-over dump file(s) for upload.

DateTime=2017-10-31T16:33:23.7481321Z

To solve this issue, the application needs to be launched again, and wait for MinidumpUploader to finish uploading those remaining .dmp files.

Comments (0)

Skip to main content