Unreal Engine Crash Reporter - Can't get it to work

Hey there,

I’m trying to set up sentry with the UE4 (4.22) crash reporter. The problem is, I cannot even get a single event to reach sentry.

I created a brand new first person example project; followed the instructions to set the required section in the DefaultEngine.ini file and set include crash reporter and debug files.

In in c++ I added the line throw("crash on purpose"); whenever a projectile hits a target to make it crash.
If packaged or not, the ue4 crash handler appears -> I click send and close but I don’t get an event in sentry.

Am I doing something stupid? Please let me know!

Took me a while to get it to work the first time. Epic Games provides no docs and if you look up online you see questions like this raised 2 years ago still without an answer on their forum.

We’ve documented the process on Sentry docs and it seems you’ve done the two key settings already. Now if the crash is not being uploaded to Sentry perhaps the crash reporter didn’t pick up on the DataRouterUrl. Can you confirm the correct DefaultEngine.ini was changed?
Also check the Sentry URL has unreal in it. It’s an endpoint in Sentry build specially for Unreal Engine crashes and is down on the Client Keys (DSN) page in Sentry’s project settings.

Besides that, you could use ngrok (replace sentry.io with you ngrok url) to see if the crash reporter is trying to send the event or not.
image

I used requestcatcher.com and webhook.site to check, but I got nothing. Which means UE-crash reporter isn’t sending anything.

Maybe editing Epic Epic Games\UE_4.22\Engine\Config\BaseEngine.ini would work?

Is this feature limited to certain UE versions?
Or did I miss a necessary step?

I made this account just to reply to you because your post helped me figure out the problem. We had to edit the crash reporters ini file. In the packaged build it was located in [StagingFolder]/Engine/programs/CrashReportClient/Config/DefaultEngine.ini

2 Likes

@JDooley thank you very much! That was exactly the problem.

There are still some problems:

  1. Does this only work when packaging without .pak files?
  2. Can you use sentry for crashes in the editor as well?

Thanks for the info! Editing the packaged build worked for me, but to save doing that every time I then edited the engine version of the config instead (C:\Program Files\Epic Games\UE_4.23\Engine\Programs\CrashReportClient\Config)

And that works using pak files too as you don’t need to edit the packaged build since it’s already changed in engine.

  1. Does this only work when packaging without .pak files?

Hi, I don’t know why it happens, but try this path
[Game]\Engine\Programs\CrashReportClient\Config\NoRedist\DefaultEngine.ini
It works for my UE 4.23

I’ve have found another INI
[Game]\Engine\Programs\CrashReportClient\Config\Windows\WindowsEngine.ini

Thanks for the digging. Here is what I have ended up with. It’s mostly a summary of the previous posts, but with some additional background.


When Unreal Engine packages things, most of [Game project location]\Config\* goes into the game’s .pak file, and [Unreal Engine location]\Programs\CrashReportClient\Config\*.ini + …\Config\Windows\*.ini goes into CrashReportClient.pak.

When CrashReportClient starts up, it will attempt to read configuration files from a large number of locations. It reads them and applies the settings in the following order:

  • Programs\CrashReportClient\Config\DefaultEngine.ini
  • Programs\CrashReportClient\Config\ShippableEngine.ini
  • Programs\CrashReportClient\Config\NotForLicensees\DefaultEngine.ini
  • Programs\CrashReportClient\Config\NotForLicensees\ShippableEngine.ini
  • Programs\CrashReportClient\Config\NoRedist\DefaultEngine.ini
  • Programs\CrashReportClient\Config\NoRedist\ShippableEngine.ini
  • Programs\CrashReportClient\Config\Windows\WindowsEngine.ini
  • Programs\CrashReportClient\Config\Windows\ShippableWindowsEngine.ini
  • Programs\CrashReportClient\Config\Windows\NotForLicensees\WindowsEngine.ini
  • Programs\CrashReportClient\Config\Windows\NotForLicensees\ShippableWindowsEngine.ini
  • Programs\CrashReportClient\Config\Windows\NoRedist\WindowsEngine.ini
  • Programs\CrashReportClient\Config\Windows\NoRedist\ShippableWindowsEngine.ini

When CrashReportClient runs as part of a packaged build, it will fetch .ini files first hand from CrashReportClient.pak, and for any file that is not present there, it will fetch from the corresponding location under [Game exe location]\Engine\Programs\CrashReportClient\Config\…

The current Unreal distribution has a .ini file at [Programs\CrashReportClient\Config\DefaultEngine.ini but no other of the previously mentioned locations.

This gives us a number of options for overriding crash reporter settings.


1 - Make the change once, before packaging.

1a) Modify the Unreal Engine installation: change the contents of [Unreal Engine location]\Programs\CrashReportClient\Config\DefaultEngine.ini.

1b) Modify the Unreal Engine installation: Add a file at [Unreal Engine location]\Programs\CrashReportClient\Config\DefaultEngine.ini (or the two Shippable locations).

For people that build Unreal Engine from source, both these options should work fine. One change in source control and it’s all grand.

For people that use pre-built Unreal Engine versions, these options are not so great. This requires local changes on each developer machine / build machine. The changes also risk being lost when updating to a newer UE version and when repairing the UE installation.


2 - Make the change after each packaging.

2a) Inject a config change partway after the packaging process, for non-pak builds: After packaging, modify either [Staging folder location]\Engine\Programs\CrashReportClient\Config\DefaultEngine.ini or create [Staging folder location]\Engine\Programs\CrashReportClient\Config\Windows\WindowsEngine.ini .

2b) Inject a config change partway after the packaging process, for pak builds: After packaging, create [Staging folder location]\Engine\Programs\CrashReportClient\Config\Windows\WindowsEngine.ini .
(Adding a new file at [Staging folder location]\Engine\Programs\CrashReportClient\Config\DefaultEngine.ini will not work, because the corresponding file already exists within CrashReportClient.pak, and the UE framework will not attempt to access a file on-disk if it already has found it within the .pak.)

Options 2a & 2b seem to require automation outside of UAT/UBT; if there’s a build machine that generates all builds, that could copy the .ini file to the location mentioned in 2b once UBT has staged the build.


If there is a desire to get crash reports from within the editor, well – I haven’t looked into it, but options 2a & 2b do not apply; options 1a / 1b might work.