-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Critical: @sentry/browser v4.3.3 has usage of undeclared variable #1757
Comments
I got this too. My error thrown is:
My Solution: change Funny enough, the errors still show up on my |
Get same error too in 4.3.3 |
Maybe I didn't fully described. There is no declaration of variable
tslib_1__default.
There are only require of tslib and variable called tslib_1. Also tslib
doesn't have default exports. I assume there could be issue in build
process.
…On Tue, Nov 20, 2018, 21:50 Kamil Ogórek ***@***.*** wrote:
This is correct. tsilb is a direct dependency listed in package.json. If
you want to use the build directly from npm install as a standalone file,
use build/bundle.js instead.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
|
Agreed 4.3.3 completely crashes my application when I import it. And 4.3.2 does not. I get the same error as @maxaon described. Except it happens thousands of times. |
Same here. Getting this just by importing the lib, which should be helping me with my crashes and not causing them. Good stuff. |
This brought down our production web application tonight, and corresponded with some minor changes to our webpack config. I spent an hour pouring over the change trying to figure out why typescript libraries were breaking. Oh well. In good company :) |
downgrading to 4.3.2 solves this problem |
Sweet, i've been pulling my hair out for hours... thanks |
Fixed with |
TypeScript is hard. |
Yeah this broke for us in production as well. As much as I appreciate the amazing work you guys are doing...this felt a bit like your fire alarm having a short, creating a fire and burning down your house. It kind of defeats the purpose. Luckily we were able to catch the release that caused this bug using Sentry, so there was some meta-humor at least. Maybe sent everyone that got caught by this bug some stickers to make it up? |
Added tests around this to prevent issues like this in the future - #1760 |
Same here! Rolled back for now. |
@munderwoods it's' already patched in the newest release |
Hi @kamilogorek Please, can you explain what does this mean "TypeScript is hard." was this problem caused due to typescript? "use strict" and JSLint would have caught this during development. :-) |
@stripathix It's more that the tooling is hard, we still do not fully understand what caused the issue. Somehow the import of tslib was broken in our utils library (but only there). We fixed it by working around the need for tslib to be imported there. I don't think "use strict" und TSLint (we use it) helped us there. We added a test so we catch something like this before we release stuff. |
@stripathix as Daniel mentioned, neither "use strict" nor JSLint would help, as it's not a code issue. The thing is that all of our libraries are written in TypeScript, thus they use its builtin polyfills for some language methods/syntax. We changed it, so that To make it more visually clear. Before it was something like (kinda):
Now, we changed it so it's only done once:
This made a whole bundle smaller, as we removed tslib duplication. And yes, we have TSLint, Prettier, |
This issue seems to be re-introduced in version 4.6.0 or earlier. I can see it is being referenced in node_modules/@sentry/browser/dist/index.js |
@GuusDeGraeve well, that's not something that should ever happen... fixed in |
Ran into this Sentry issue: getsentry/sentry-javascript#1757
Can you guys please update the @sentry/electron module to reflect this new version? Installing the latest @sentry/electron comes with an @sentry/browser version with this issue. |
@Galkon I replied on the electron issue already |
Package + Version
@sentry/browser
@sentry/node
raven-js
raven-node
(raven for node)Version:
Description
In version 4.3.3 main file (dist/index.js) contains function
safeJoin
andassign
which contains for loops with usage oftslib_1__default
.This variable is not declared anywhere. When we try in our code use console methods we get exception.
Code example:
exception:
Source code of safeJoin
File contain only 2 requirements
Please see the file https://unpkg.com/@sentry/browser@4.3.3/dist/index.js There is no declaration of tslib_1__default and this is not a global variable
The text was updated successfully, but these errors were encountered: