Trouble Shooting
Crash reporting can sometimes be tricky to get going. If you're having trouble, see if you're effected by some these common setup issues. If you have another issue please get in touch.
Server side Raygun Provider does not send crash reports and there are no errors to debug
There are many reasons why crash reports may not be sent through.
Raygun providers have an 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 an unhandled exception.
Add this attribute in the raygun4Net Config section or enable it in the config options of the client:
<RaygunSettings apikey="YOUR_API_KEY" throwOnError="true"/>
Internal errors will be sent to the OS 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." This is probably a TLS handshake issue (See Below). Confirm this by inspecting the inner exception or the rest of the trace and look for a cipher mismatch phrase.
TLS
To ensure compliance with relevant security standards, Raygun's ingestion nodes require events to be sent using the current security cypher suite.
Specifically, we support TLS 1.1 and TLS 1.2 This may mean that the OS or browsers you are using, with Raygun Crash Reporting, will need to be updated.
To see if a browser supports TLS 1.1 or TLS 1.2 please check: https://caniuse.com/tls1-2
To see if your Windows hosting environment supports TLS 1.1 or TLS 1.2 please check: Windows: TLS protocol version support
For other operating systems, please check with the manufacturer.
Incorrect API key
Re-setting an application API key, will require deploying the updated API key to your apps configuration.
Please check the API key matches the Raygun Application 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 you application was built and deployed correctly, and the deployment configuration settings of your Production Application API Key are set correctly.
Your deployed application is behind a fire wall or network restriction and/or it has no Internet access
You can send a test Crash Report from your server to check if there any networking issues which need to be addressed. (e.g., a firewall which need a whitelist rule added)
Here is an example powershell script which can be used:
$apikey = 'YOUR_API_KEY'
$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.
You are seeing Crash reports for server-side errors, but not client-side (browser) errors
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 raygun4js snippet into the
of the html document<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('enableRUM', true); <!-- optional, enable RealUserMonitoring -->
</script>
Crash Reporting needs to be enabled in the browser (Raygun4JS)
Please check that rg4js('enableCrashReporting', true);
has been set.
You may also want to check enable Raygun Real User Monitoring (RUM) has been enabled with the
rg4js('enableCrashReporting', true);
setting.
Browser extensions blocking the flow
Some Browsers extensions mistakenly think that the raygun js provider is an advertizing script.
Please get in touch, and let us know the details, if this happens to you. So we can get Raygun added to the extension 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.