MindscapeHQ / raygun4js

JavaScript provider for Raygun
https://raygun.com
Other
149 stars 60 forks source link

Support for Ionic Capacitor stack traces on iOS #459

Closed mcfarljw closed 2 years ago

mcfarljw commented 2 years ago

Ionic Capacitor now uses the capacitor:// scheme on iOS which is not included in the regex check which results in stack traces not being parsed correctly on iOS. I have added capacitor to the regex and verified that the stack traces are parsed correctly. Here is what the stack looks like on errors thrown from within Capacitor on iOS for reference:

cause: – undefined
message: – "Testing"
name: – "Error"
stack: – "Jn@capacitor://localhost/js/index.20.1d828c7a.js:1:134788↵global code@↵evaluateWithScopeExtension@[native code]↵@↵_wrapCall@" (chunk-vendors.20.242c3e64.js, line 3544)
"Jn@capacitor://localhost/js/index.20.1d828c7a.js:1:134788
global code@
evaluateWithScopeExtension@[native code]
@
_wrapCall@"

Here is also a link to the project on GitHub showing the official default value: https://github.com/ionic-team/capacitor/blob/2b7016f3b4d62fd8c9d03fde2745b3d515bf08b2/ios/Capacitor/Capacitor/CAPInstanceDescriptor.m#L10

darcythomas commented 2 years ago

Hi @mcfarljw

This has now been released in version 2.25.4

Thanks for your contribution, I really appreciate it :D