Skip to content

capture console not IE11 compatible #4768

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

Closed
3 tasks done
collinprice opened this issue Mar 23, 2022 · 1 comment · Fixed by #4769
Closed
3 tasks done

capture console not IE11 compatible #4768

collinprice opened this issue Mar 23, 2022 · 1 comment · Fixed by #4769

Comments

@collinprice
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/browser

SDK Version

6.19.1

Framework Version

No response

Link to Sentry event

No response

Steps to Reproduce

  1. Include CDN scripts.
<script src="https://browser.sentry-cdn.com/6.19.1/bundle.tracing.min.js"
        integrity="sha384-hthbsqa5mLHmR+ZUw29J9qGt8SdDRD7AVpG02i/NAsu5cv9G9I9D9IhEtSVyoPv2"
        crossorigin="anonymous"></script>

<script src="https://browser.sentry-cdn.com/6.19.1/captureconsole.min.js"
        integrity="sha384-GLNSK4rZR+fv4mVjEEcOI7HiLO96Dd7Nynmu3vKRjW3JmXQvCgted9bbJNM/1l4d"
        crossorigin="anonymous"></script>
  1. Run website in IE11
  2. Look in console for error
SCRIPT1002: Syntax error
captureconsole.min.js (2,963)

Expected Result

I could not find any documentation saying capture console is not support in IE11 so I assumed it would work since bundle.tracing supports IE11.

Actual Result

captureconsole does not work in IE11.

@AbhiPrasad
Copy link
Member

Thanks for reporting! It seems that the integration bundle is es6 instead of es5. We are on it!

lobsterkatie added a commit that referenced this issue Mar 23, 2022
In #4718, a change was made to use an environment variable to control the version of JS emitted when building integration bundles. Unfortunately, the values then given to that variable were uppercase, whereas our code assumes a lowercase version. Further, the default output is ES6 (in preparation for going ES6-first in v7), so when the version flag `ES5` doesn't match the checked-for `es5`, we emit ES6 in the supposedly-ES5 bundle.

This controls for casing by casting the value to lowercase before comparison.

Fixes #4768.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants