GithubHelp home page GithubHelp logo

ravibpatel / crashreporter.net Goto Github PK

View Code? Open in Web Editor NEW
181.0 181.0 72.0 234 KB

Send crash reports of your classic desktop application developed using .NET Framework directly to your mail's inbox with full exception report, stack trace and screenshot.

License: MIT License

C# 100.00%
crash-reports desktop-application nuget toemail

crashreporter.net's People

Contributors

damirporobic avatar doctordump avatar ducseb avatar eddiedemon avatar jjwalter2001 avatar kochspet avatar milleniumbug avatar ravibpatel avatar shgeum avatar tarekwiz avatar wonderdch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crashreporter.net's Issues

Customizable Reporter Form

First off, I just want to say that this is a great piece of software; nice work @ravibpatel

I was wondering if there are any plans to include an API to allow implementation of a custom reporter form to match the styling and theme of my application, just as AutoUpdater.NET offers? Just so developers can implement their own custom crash report dialog prompts so that they can "maintain look and feel for the entire application similarly."

VB.NET Example

Hello,

can you show me a little VB.net example? I was trying to include your crashreporter, but have some errors.

Thanks!

Send Silently Not Working (Windows, WPF)

Startup:

        /// <summary>
        /// On Start-up
        /// </summary>
        /// <param name="e">The start-up event arguments.</param>
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
            Application.Current.DispatcherUnhandledException += DispatcherOnUnhandledException;
            TaskScheduler.UnobservedTaskException += TaskSchedulerOnUnobservedTaskException;

            var bootstrapper = new Bootstrapper();
            bootstrapper.Run();
        }

Catchers:

         /// <summary>
        /// On unobserved task exception with the task scheduler.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="unobservedTaskExceptionEventArgs">The <see cref="UnobservedTaskExceptionEventArgs"/> instance containing the event data.</param>
        private void TaskSchedulerOnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs unobservedTaskExceptionEventArgs)
        {
            SendReport(unobservedTaskExceptionEventArgs.Exception);
            Environment.Exit(0);
        }

        /// <summary>
        /// On unhandled exception of the dispatcher.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="dispatcherUnhandledExceptionEventArgs">The <see cref="DispatcherUnhandledExceptionEventArgs"/> instance containing the event data.</param>
        private void DispatcherOnUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs dispatcherUnhandledExceptionEventArgs)
        {
            SendReport(dispatcherUnhandledExceptionEventArgs.Exception);
            Environment.Exit(0);
        }

        /// <summary>
        /// On unhandled exception of the current domain.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="unhandledExceptionEventArgs">The <see cref="UnhandledExceptionEventArgs"/> instance containing the event data.</param>
        private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs)
        {
            SendReport((Exception)unhandledExceptionEventArgs.ExceptionObject);
            Environment.Exit(0);
        }

Sender:

        /// <summary>
        /// Sends the crash report.
        /// </summary>
        /// <param name="exception">The exception.</param>
        /// <param name="developerMessage">The developer message.</param>
        /// <param name="silent">if set to <c>true</c> [silent].</param>
        public static void SendReport(Exception exception, string developerMessage = "", bool silent = true)
        {
            var reportCrash = new ReportCrash("REMOVED")
            {
                DeveloperMessage = developerMessage,
                Silent = silent
            };

            reportCrash.Send(exception);
        }

Placing a breakpoint in the "SendReport" method and it's hit when a crash occurs.

Setting the variable "silent" to "false" opens the dialog on a crash, sends and receives fine.

Settings the variable "silent" to "true", breakpoint still hits like normal, no report is sent.

Have tried calling reportCrash.SendSilently(exception); instead, same result.

Have tried adding "DoctorDumpSettings" to the "ReportCrash":

            var reportCrash = new ReportCrash("REMOVED")
            {
                DeveloperMessage = developerMessage,
                Silent = silent,
                DoctorDumpSettings = new DoctorDumpSettings
                {
                    ApplicationID = Guid.Parse("REMOVED"),
                    OpenReportInBrowser = true,
                    SendAnonymousReportSilently = silent
                }
            };

The "OpenReportInBrowser" also seems to not work when "reporting silently".

Can I Customize 'From Mail' and Body of the Email ?

I tried adding as below:-

var reportCrash = new ReportCrash
            {
                CurrentCulture = new CultureInfo("en-US"),
                AnalyzeWithDoctorDump = true,
                DeveloperMessage = developerMessage,
                ToEmail = "[email protected]",
		FromEmail = "[email protected]",
		SmtpHost = "smtp.gmail.com",
		UserName = "[email protected]",
		Password = "--------------",
                DoctorDumpSettings = new DoctorDumpSettings
                {
                    ApplicationID = new Guid("8bac08ca-904c-4622-97f6-33f505e7da5f"),
                    OpenReportInBrowser = false
                },
            };

After adding From Email also i am getting error reports (through mail) from [email protected]. @ravibpatel

How to set this Email parameter properly?

snipaste20201228_130641

Just like picture shows, this Email is emtpy when crash form showed. And it only work whether keep empty or filled in FromEmial(eg [email protected]).

When my user see this form, they always tends to fill in their own email,and failed:
snipaste20201228_132016

How can i make this Email textbox invisible or filled with correct mail address by config?

Here is my ReportCrash setting:

_reportCrash = new ReportCrash("[email protected]")
{
    Silent = true,
    IncludeScreenshot = true,
    AnalyzeWithDoctorDump = false,
    SmtpHost = "smtp.qq.com",
    Port = 587,
    EnableSSL = true,
    UserName = "[email protected]",
    Password = "XXX",
    ToEmail = "[email protected]",
    FromEmail = "[email protected]",
};

Not Showing Correct Application Version if Network Deployed

My application is network deployed using the Publish feature in the project properties.

capto_capture 2018-04-27_10-30-23_am

However, when the crash report screen appears, it show's either the assembly or file version instead of the publish version.

capto_capture 2018-04-27_10-31-48_am

I think it should check if it's network deployed, and use the publish version.

if (ApplicationDeployment.IsNetworkDeployed) { return ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString(); }

How to hide screenshot tab ?

I want let users to choose whether to send crash information or not, but screenshots tab may make users feel unnecessary privacy disclosure and cause users not to send. Although "Include Screenshot" can be cancelled, users may cancel sending when they see screenshots tab directly, and they never find that they can cancel inside.

Form is truncated

When using on Windows 10 with a low resolution (800x600) screen the form is not the intended size.

form-size

Not sure of the cause. Editing the source I was able to keep the form the intended size by setting the MinimumSize.

Contributions

Hello everyone!
I wat to use this project in my solutions, but i need to make some changes (adding some translations).
Since the translations i will do are in portuguese, are you open to receive a pull request with the changes?

This project will be very usefull to me, so i want to give something back. ;)

Silent crash not send

Hi.
I'm trying to report in silence mode. But email no arrive. Code i'm using is next.

Thanks in advance

[STAThread]
static void Main()
{
Application.ThreadException += ApplicationThreadException;

        AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;

        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        Application.Run(new FormLogin());
    }

    private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs)
    {
        SendReport((Exception)unhandledExceptionEventArgs.ExceptionObject);
        Environment.Exit(0);
    }

    private static void ApplicationThreadException(object sender, ThreadExceptionEventArgs e)
    {
        SendReport(e.Exception);
    }

    public static void SendReport(Exception exception, string developerMessage = "", bool silent = false)
    {
        var reportCrash = new ReportCrash("[email protected]")
        {
            DeveloperMessage = developerMessage
        };
        //reportCrash.Silent = silent;
        reportCrash.Silent = true;
        reportCrash.CaptureScreen = true;
        reportCrash.Send(exception);
    }

Save crash report to file

Sometimes users are offline or are somewhere that blocks smtp traffic. I'd like to have the option to save crash reports to disk, so we can retrieve the files for analysis later.

_reportCrash.RetryFailedReports() blocking the WPF app

Hi @ravibpatel
I am using the CrashReporter lib for my WPF project and I face a issue regarding RetryFailedReports();
When i got a crash from app and restarted the app again it is showing the report send popup , and it send the report as well but after that my app is not going further even after sending the report successfully

base.OnStartup(e); AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException; Application.Current.DispatcherUnhandledException += DispatcherOnUnhandledException; TaskScheduler.UnobservedTaskException += TaskSchedulerOnUnobservedTaskException; _reportCrash = new ReportCrash("[email protected]") { Silent = true }; _reportCrash.RetryFailedReports();

CC @ducseb @EddieDemon @milleniumbug @tarekwiz

Sending silent crash reports dosen't work

I've just downloaded 1.5.4 nuget pckg and silent tag is not working, tried 5x and still not receiving anything to mail and drdump. Without silent tag it works fine..

WPF-Example

Is there any Example how I can intergrate CrashReporter.NET in my WPF-Application?

Sending all crashes?

Hey, does this crash reporter send any crashes of a program?
I mean, if I have a problem in my code
e.g. a con string for mysql and I write instead of server serverr, then that gives a crash
will this be sent automatically?
because i think it dont do that, or i make anything wrong
Sorry for my bad english

.Net Core 3 release

It would be great to have a .NET Core version of this project. Even a stripped down version would be awesome!

Silent = true will show the E-Mailform

Hi there,

good job for this tool.

I set the property silent = true but the E-Mailform will shown up.

_reportCrash = new ReportCrash("xxx") { AnalyzeWithDoctorDump = false, IncludeScreenshot = true, SmtpHost = Methods.Vars.SMTPServer, Port = Methods.Vars.SMTPPort, EnableSSL = true, UserName = Methods.Vars.SMTPAuthUser, Password = Methods.Vars.SMTPAuthPass, ToEmail = Methods.Vars.AbsenderEmail, FromEmail = Methods.Vars.AbsenderEmail, Silent = false };

How does it handles an OutOfMemoryException?

If an application gets out of memory because of a memory leek, how does CrashReporter.NET manages to handle it and send the reports?

And what if an application reaches the maximum number of sockets supported, how does it sends the reports?

Email error report without creating reporting popup?

I have implemented this into a WFA. However, I would like for the reporting to be done automatically. Instead, the submit error form pops up and asks for email despite providing it in the initialization of the crash reporter. Is there a way to hide the error form and just send without asking the user for input?

send reports to github

hi i want crashreporter send reports to github and automatically create an issue for that.
is it possible?

Does not include screenshot in report

  • save report In wpf project.
  • but i can't find screenshot in report.
            base.OnStartup(e);
            AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
            Application.Current.DispatcherUnhandledException += DispatcherOnUnhandledException;
            TaskScheduler.UnobservedTaskException += TaskSchedulerOnUnobservedTaskException;
            _reportCrash = new ReportCrash("Email where you want to receive crash reports")
            {
                Silent = true,
                IncludeScreenshot = true,
                ShowScreenshotTab = true,
                CaptureScreen = true,
            };
            _reportCrash.RetryFailedReports();
  • image
  • image
  • image

[Q] Is drdump guid needed?

I think that i didnt specify any guid for drdump and im still receiving crash reports over there, basically only specified email. How come?

Doesn't handle no internet connection

We have a Windows device that can start up without any Internet connection.
If an application crashes the dialog is not shown; but application silently closes.

From what I can determine, SendRequestState.GetMacAddress throws an uncaught SocketException due to an unreachable network.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.