Troubleshooting
Crash Reporting can sometimes be tricky to get going. If you're having trouble, see if you're affected by some of the common setup issues in this document. If you have another issue please get in touch.
Incorrect API key
Resetting an application API key will require deploying the updated API key to your app's configuration.
Please check the API key matches the Raygun Application you are expecting to see crash reports in. You can check the API key by:
- Selecting the Raygun Application (Top menu)
- Clicking "Application settings" in the left-hand menu
- Checking the field API Key
API key was not deployed
Please double check that your application was built and deployed correctly, and the deployment configuration settings of your Production Application API Key are set correctly.
Enable the raygun4net provider to report errors
Raygun providers have a throwOnError
property; set to false by default. Setting this to true will allow any errors occurring in raygun4net to bubble up the stack, and be reported as unhandled exceptions.
Add the following attribute in the raygun4net config section or enable it in the config options of the client:
<RaygunSettings apikey="paste_your_api_key_here" throwOnError="true"/>
Internal errors will be sent to the OS of the event viewer. Alternatively you could attach a trace listener and log to a text file as well.
If the Event Viewer error message mentions "The underlying connection was closed: An unexpected error occurred on a send.", then this is probably a TLS handshake issue (See TLS Documentation). Confirm this by inspecting the inner exception or the rest of the trace and look for a cipher mismatch phrase.
Send test crash report
You can send a test Crash Report from your server to check if there any networking issues which need to be addressed. (For example, a firewall that needs a whitelist rule added.)
Below is an example powershell script to send a test crash report.
$apikey = 'paste_your_api_key_here'
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("X-ApiKey", $apikey)
$headers.Add("Content-Type", "application/json")
$occurredOn = [datetime]::Now.ToUniversalTime().ToString("o");
$body = "{
`n `"OccurredOn`": `"$occurredOn`",
`n `"Details`": {
`n `"MachineName`": `"WIN-0HOJHN7A0D7`",
`n `"Version`": `"Not supplied`",
`n `"Error`": {
`n `"Data`": {},
`n `"ClassName`": `"Demo123`",
`n `"Message`": `"Powershell to Raygun test`",
`n `"StackTrace`": [
`n {
`n `"LineNumber`": 15,
`n `"ClassName`": `"test test ya`",
`n `"MethodName`": `"methodname`"
`n },
`n {
`n `"LineNumber`": 15,
`n `"ClassName`": `"critical`",
`n `"MethodName`": `"awesomesauceness`"
`n },
`n {
`n `"LineNumber`": 0,
`n `"ClassName`": `"bar`",
`n `"MethodName`": `"bare`"
`n },
`n {
`n `"LineNumber`": 0,
`n `"ClassName`": `"test`",
`n `"MethodName`": `"testerestser`"
`n }
`n ]
`n },
`n `"Environment`": {
`n `"ProcessorCount`": 99,
`n `"OSVersion`": `"6.2.9200`",
`n `"WindowBoundsWidth`": 1024,
`n `"WindowBoundsHeight`": 768,
`n `"Cpu`": `"Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz`",
`n `"Architecture`": `"AMD64`",
`n `"TotalVirtualMemory`": 8388607,
`n `"AvailableVirtualMemory`": 8379462,
`n `"DiskSpaceFree`": [
`n 55.498355865478516,
`n 52.96750259399414,
`n 21.393081665039062
`n ],
`n `"TotalPhysicalMemory`": 7679,
`n `"AvailablePhysicalMemory`": 2570,
`n `"UtcOffset`": 12,
`n `"Locale`": `"English (United States)`"
`n },
`n `"Client`": {
`n `"Name`": `"Raygun4Net4.0`",
`n `"Version`": `"5.1.0.0`",
`n `"ClientUrl`": `"https://github.com/MindscapeHQ/raygun4net`"
`n },
`n `"UserCustomData`": {
`n `"handler`": `"From Raygun4JS snippet global error handler`"
`n },
`n `"Tags`": [
`n `"Awesome`",
`n `"Critical`"
`n ],
`n `"User`": {
`n `"Identifier`": `"123users1nique_id1`",
`n `"IsAnonymous`": `"`",
`n `"Email`": `"emailAddr`",
`n `"FullName`": `"A Full Name`",
`n `"FirstName`": `"A First Name`",
`n `"UUID`": `"uuid`"
`n },
`n `"Response`": {
`n `"statusCode`": 404,
`n `"statusDescription`": `"Not Found`"
`n }
`n }
`n}"
$response = Invoke-RestMethod 'https://api.raygun.com/entries' -Method 'POST' -Headers $headers -Body $body
$response
$response | ConvertTo-Json
An empty {}
201 response means the event reached the Raygun servers correctly.
You should see a fake error "Demo123: Powershell to Raygun test" when you refresh the Raygun Application page.
Alternatively you can use curl:
curl -L -s -H 'X-ApiKey: {api-key}' -d @api.raygun.io.entries.json https://api.raygun.com/entries
Server-side errors are reported, client-side (browser) errors are not
If you have setup a server-side Raygun provider, you may also need to setup the the client-side provider to get browser errors.
Insert the following snippet into the
of the HTML document. Further documentation about the Crash Reporting installation process can be found here.<script type="text/javascript">
!function(a,b,c,d,e,f,g,h){a.RaygunObject=e,a[e]=a[e]||function(){
(a[e].o=a[e].o||[]).push(arguments)},f=b.createElement(c),g=b.getElementsByTagName(c)[0],
f.async=1,f.src=d,g.parentNode.insertBefore(f,g),h=a.onerror,a.onerror=function(b,c,d,f,g){
h&&h(b,c,d,f,g),g||(g=new Error(b)),a[e].q=a[e].q||[],a[e].q.push({
e:g})}}(window,document,"script","//cdn.raygun.io/raygun4js/raygun.min.js","rg4js");
</script>
<script type="text/javascript">
rg4js('apiKey', '@Configuration["RaygunSettings:ApiKey"]');
rg4js('enableCrashReporting', true);
rg4js('enableRealUserMonitoring', true); <!-- optional, enable RealUserMonitoring -->
</script>
Crash Reporting needs to be enabled in the browser (Raygun4JS)
Please check that rg4js('enableCrashReporting', true);
has been set (see above) on how to do so.
You may also want to check Raygun Real User Monitoring (RUM) has been enabled with the
rg4js('enableCrashReporting', true);
setting.
Browser extensions blocking the flow
Some browser extensions mistakenly identify the Raygun JS provider is an advertizing script.
If you experience this issue, please get in touch and let us know the details. We will endeavor to get the Raygun provider added to the extension's white list.
Mobile app crashes without sending a Crash Report
Some times a bug in a mobile app will crash the whole application, before the Raygun provider has had a chance to send the event to the Raygun servers. The Raygun provider however, will endeavor to try and resend the error when the app next starts.
Additional Documentation
Transport Layer Security (TLS) Compliance
When sending events to Raygun, it is essential to ensure that your systems communicate using current Transport Layer Security (TLS) protocols and secure ciphers. Failure to comply with relevant security standards may result in event discarding at the gate. Raygun's ingestion nodes currently support TLS Versions 1.1, 1.2, and 1.3.
To guarantee successful communication, please follow these guidelines:
Supported TLS Versions and Ciphers
Events sent to Raygun must be transmitted using the following TLS versions:
- TLS 1.1
- TLS 1.2
- TLS 1.3
Ensure that your hosting Operating System supports an accepted set of TLS versions and ciphers. Refer to the documentation specific to your system for more information:
- Windows Server: TLS protocol version support
- Ubuntu: Troubleshooting TLS/SSL
- iOS, iPadOS, and macOS: TLS Security
Upgrading Raygun Crash Reporting Provider Versions
If you are using any of the following Raygun Crash Reporting Provider versions, make sure to upgrade them to a minimum version that offers TLS 1.1, TLS 1.2, and TLS 1.3 support:
- Serilog.Sinks.Raygun 5.3.3+
- Mindscape.Raygun4Net 6.0.3+
- Mindscape.Raygun4Net.Core 6.0.3+
- Mindscape.Raygun4Net.Mvc 6.0.3+
- Mindscape.Raygun4Net.WebApi 6.0.3+
Legacy C# Code Support
If you are working with legacy C# code that prevents you from updating the Raygun provider, you can enable support for TLS 1.1 or TLS 1.2 by adding the following code snippet in your main method:
using System.Net;
// Enable TLS 1.1 or TLS 1.2
ServicePointManager.SecurityProtocol |= (SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12);
TLS Compatibility with Browsers
For crashes and errors occurring at end-users' devices, TLS limitations are less likely to be a concern. Modern browsers, when updated, automatically support the current TLS versions. To verify if a browser supports TLS 1.1, TLS 1.2, or TLS 1.3, refer to the following resources:
By ensuring compliance with TLS protocols and adopting secure ciphers, you can securely transmit events to Raygun and effectively monitor crashes and errors in your applications.