Skip to content
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

Large amount of JS warnings causing lags #1355

Comments

@relte
Copy link

relte commented Aug 13, 2018

Is this a feature request or a bug?

A bug.

What is the current behavior?

It seems JS warnings are gathered from all of the scripts running on the site. This causes an overload and lags the browser. They are mostly ReferenceErrors:

(...)

SyntaxError: test for equality (==) mistyped as assignment (=)?[Więcej informacji] base.js:7285:233
SyntaxError: test for equality (==) mistyped as assignment (=)?[Więcej informacji] base.js:7383:120
SyntaxError: test for equality (==) mistyped as assignment (=)?[Więcej informacji] base.js:7436:223
SyntaxError: test for equality (==) mistyped as assignment (=)?[Więcej informacji] base.js:7532:43
SyntaxError: test for equality (==) mistyped as assignment (=)?[Więcej informacji] base.js:7617:74
ReferenceError: reference to undefined property "foo"[Więcej informacji] base.js:144:29
ReferenceError: reference to undefined property "width"[Więcej informacji] desktop_polymer.js:5460:88
ReferenceError: reference to undefined property "csp_nonce"[Więcej informacji] base.js:2710:81
ReferenceError: reference to undefined property "video_id"[Więcej informacji] base.js:6376:29
ReferenceError: reference to undefined property "cplatform"[Więcej informacji] base.js:2731:191
ReferenceError: reference to undefined property "byterate"[Więcej informacji] base.js:2691:253
ReferenceError: reference to undefined property "enablesizebutton"[Więcej informacji] base.js:4274:357
ReferenceError: reference to undefined property "enable_cardio"[Więcej informacji] base.js:6408:14
ReferenceError: reference to undefined property "id"[Więcej informacji] base.js:2706:16
ReferenceError: reference to undefined property "iv_invideo_url"[Więcej informacji] base.js:2870:305
ReferenceError: reference to undefined property "csi_on_gel"[Więcej informacji] base.js:2290:25
ReferenceError: reference to undefined property "volumechange"[Więcej informacji] base.js:4531:346
ReferenceError: reference to undefined property "yt:bgcolor"[Więcej informacji] base.js:2893:20
ReferenceError: reference to undefined property "onreadystatechange"[Więcej informacji] base.js:3852:1
ReferenceError: reference to undefined property "T"[Więcej informacji] base.js:2375:1
ReferenceError: reference to undefined property "I"[Więcej informacji] base.js:2378:187
ReferenceError: reference to undefined property "video_id"[Więcej informacji] desktop_polymer.js:5467:75
SyntaxError: test for equality (==) mistyped as assignment (=)?[Więcej informacji]

(...)

How to reproduce:

  1. Run web-ext run.
  2. Open a website, for example youtube.com.
  3. Use the "Inspect element" tool from the context menu.
  4. Choose the "Console" tab.

I've also noticed that the reload doesn't work for me, at least not for a script - I use console.log in a content script. This works now, I didn't change anything so not sure why.

What is the expected or desired behavior?

None of such warnings - just like when I run Firefox normally.

Reload should work for JS (?).

Version information (for bug reports)

  • Firefox version: 61.0.2 (64-bit)
  • Your OS and version: ArchLinux, updated today
  • Paste the output of these commands:
node --version && npm --version && web-ext --version
v10.8.0
6.3.0
2.8.0
@Rob--W
Copy link
Member

Rob--W commented Aug 13, 2018

This has been annoying me too. These days I also add the following flag to every web-ext run command:

web-ext run --pref=javascript.options.strict=false

That will reduce the clutter.

@rpl
Copy link
Member

rpl commented Aug 16, 2018

@Rob--W and I briefly discussed about it and we agreed that it could be reasonable to leave "javascript.options.strict" pref to its default value (which is false) and maybe document how to toggle the pref to get warning messages on the possible incorrect code (e.g. in the MDN doc pages related to web-ext)

@relte
Copy link
Author

relte commented Aug 16, 2018

@Rob--W Thanks for your advice, it is much better with this option turned off.

@rpl It would be good to have it as false by default in the browser that web-ext runs.

Rob--W added a commit to Rob--W/web-ext that referenced this issue Aug 16, 2018
The `javascript.options.strict` option results in lots of log spam,
which not only makes debugging harder, but also slows down Firefox.

The `javascript.options.showInConsole` option was removed too because
true is already the default value.

Fixes mozilla#1355
@rpl rpl closed this as completed in #1357 Aug 23, 2018
rpl pushed a commit that referenced this issue Aug 23, 2018
The `javascript.options.strict` option results in lots of log spam,
which not only makes debugging harder, but also slows down Firefox.

The `javascript.options.showInConsole` option was removed too because
true is already the default value.

Fixes #1355
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment