-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode #564
Comments
Hi @hassanasad. I'm able to reproduce this but only when I set "strict mode" on the entire script and I attempt to notify Bugsnag with something that isn't an error (and so is missing the How is your code being bundled? I think we can be defensive about not trying to walk the call stack when we're in strict mode but I'd like to understand the situations where this happens first. |
Hi @bengourley - I am using bugsnag in an Angular 8 app. It was working fine on older versions of bugsnag. When i upgraded to the new |
@bengourley I'm having the same issue with the exact same setup as @hassanasad . Upgraded a few hours ago to Angular 8, bugsnag is set up the way your doc mentioned. It only happens after we build the solution with aot: true. ng serve works OK. I'll also check if building it without aot also produces the same error. Have a look below at where in BugSnag library this error triggers up. |
For everyone else that has this issue, you should
Code that works: "target": "es5" As a note: we've also tested the @6.3.2-alpha.0 version of BugSnag but unfortunately we had the same runtime exception. If you guys find anything else that could fix this, please let us know. Thanks! |
I can't reproduce this. I'm using the following versions:
And with the following tsconfig.json (relevant parts only): "compilerOptions": {
"target": "es2015"
},
"angularCompilerOptions": {
"enableIvy": true
} I can make a speculative fix, but I want to be able to reproduce the problem to ensure we fix it. The following two conditions must be present in your application for this issue to occur:
I have only managed to recreate condition 2. None of the Angular settings I have used ( Please can you help by making a reduced test case that exhibits this behaviour? Starting with a fresh project created with |
Same issue here. still encounter the same problem. |
@hijamoya can you help me reproduce the problem? Would be very helpful, thanks! |
With the following config, you can reproduce:
And
|
@hijamoya I used your |
@bengourley I found that it happens when an error occurs but you don't have a In my case, I post an url and get
if you don't handle onError, then the error occurs.
Then the error won't appear. By the way, this is an Angular 8 project. |
I've tried this and it still works for me. There must be something else going on. I've pushed up the code I'm using so you can see. Please can you try the following:
|
I just create a pr which can reproduce the problem: Run
And you will see the error. |
Thanks @hijamoya, I can now reproduce the problem! I'll investigate and get a fix out as soon as possible. |
So comparing the differences between a project running Angular + <script src="vendor.js" type="module"></script>
- <script src="vendor.js"></script> I can't pinpoint the exact change in Angular (I think it's in When the script attribute We'll update Bugsnag so it tolerates being bundled into a strict mode context and I'll let know when that gets released. Thanks again for providing the steps to reproduce, it really helps to understand the cause of the issue and helps make sure we address it properly! 🙇 |
@bengourley It seems that you don't need to modify code to tolerate in strict mode. Since |
This has now been released in the latest version of bugsnag-js: https://github.com/bugsnag/bugsnag-js/releases/tag/v6.4.0 |
Getting this weird error randomly in my app.
The text was updated successfully, but these errors were encountered: