Skip to content

Breakpad Crash Handler Not Sending Crash Errors #653

Closed

Description

@ricolaw-clarius

Hi currently I have set up Sentry for my project along with custom transports via setting sentry_tranport_new() which works properly when creating events with sentry_capture_event(). However it does not seem to send anything when I crash the program. From what I read in another issue here Crashpad has it's own transport method, is similar for Breakpad? If so is there a way to use our own transport code, or is that for in proc error handling only?

Thanks

Activity

  1. Swatinem commented on Jan 13, 2022

    @Swatinem
    Contributor

    The breakpad handler (and in-proc) will write the event directly to disk in the case of a hard crash. On restart, the event will be loaded from disk and passed to the configured transport.

  2. ricolaw-clarius commented on Jan 14, 2022

    @ricolaw-clarius
    Author

    Is there a method you'd recommend for debugging whether the crash is being saved and whether the event is read again after the program restarts? I am assuming this second step will still use the custom transport.

  3. Swatinem commented on Jan 17, 2022

    @Swatinem
    Contributor

    I am assuming this second step will still use the custom transport.

    Yes thats true.

    You can take a look at the directory that you configured via:

    /**
    * Sets the path to the Sentry Database Directory.
    *
    * Sentry will use this path to persist user consent, sessions, and other
    * artifacts in case of a crash. This will also be used by the crashpad backend
    * if it is configured.
    *
    * The directory is used for "cached" data, which needs to persist across
    * application restarts to ensure proper flagging of release-health sessions,
    * but might otherwise be safely purged regularly.
    *
    * It is roughly equivalent to the type of `AppData/Local` on Windows and
    * `XDG_CACHE_HOME` on Linux, and equivalent runtime directories on other
    * platforms.
    *
    * It is recommended that users set an explicit absolute path, depending
    * on their apps runtime directory. The path will be created if it does not
    * exist, and will be resolved to an absolute path inside of `sentry_init`. The
    * directory should not be shared with other application data/configuration, as
    * sentry-native will enumerate and possibly delete files in that directory. An
    * example might be `$XDG_CACHE_HOME/your-app/sentry`
    *
    * If no explicit path it set, sentry-native will default to `.sentry-native` in
    * the current working directory, with no specific platform-specific handling.
    *
    * `path` is assumed to be in platform-specific filesystem path encoding.
    * API Users on windows are encouraged to use
    * `sentry_options_set_database_pathw` instead.
    */
    SENTRY_API void sentry_options_set_database_path(
    sentry_options_t *opts, const char *path);

  4. locked and limited conversation to collaborators on Jun 21, 2023
  5. converted this issue into a discussion #854 on Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions