SeleniumHQ / selenium-ide

Open Source record and playback test automation for the web.
https://selenium.dev/selenium-ide/
Apache License 2.0
2.84k stars 768 forks source link

Extension is injecting "prompt.js" into every page whether IDE is open or not #326

Closed yozlet closed 2 years ago

yozlet commented 6 years ago

🐛 Bug Report

When browsing the web, the SeleniumIDE extension is injecting assets/prompt.js into every page I view. This happens even when the IDE is closed, and has not been opened at all during the browser session.

To Reproduce

Steps to reproduce the behavior:

  1. With Chrome: open Inspector, Network tab.
  2. Browse to any page.
  3. See the request for prompt.js, being made by the extension.

Expected behavior

Surely this shouldn't be happening if the IDE isn't open?

Environment

OS: Mac OS 10.13 Selenium IDE Version: 3.1.1 Browser: Chrome Browser Version: 67.0.3396.99

corevo commented 6 years ago

The IDE window is just frontend, much like every extension it is active at all times.
That being said assets/prompt.js is a file we can lazy-ly load, I'll look into it.

bobf commented 5 years ago

@yozlet Thank you for reporting - now I finally figured out why I keep seeing an error message in my console.

If it's useful for the devs, the error I was seeing was:

Uncaught SyntaxError: Identifier 'originalPrompt' has already been declared

Google Chrome: Version 73.0.3683.103 (Official Build) (64-bit)

I didn't see any side-effects other than the console output. It went away as soon as I removed the plugin and it had previously been present on all websites (although I didn't test extensively).

arichter83 commented 5 years ago

Same here.

vladpaln commented 5 years ago

Same error

Every page Uncaught SyntaxError: Identifier 'originalPrompt' has already been declared

Google Chrome: Version 75.0.3770.100 (Official Build) (64-bit)

soccermatrix commented 5 years ago

This is still happening on Aug 2019

corevo commented 5 years ago

@vladpaln I've browsed into multiple websites, and couldn't find any that reproduces this issue.

Currently it is required to inject the js into every page, or else one you open Selenium IDE, we would have to refresh all the browser pages, because of this, and the fact that we will move to electron, this issue will be fixed once moved to electron, as it will no longer affect the user's day-to-day browsing.

williamhatch commented 5 years ago

it is still there.

pbodnar commented 4 years ago

@corevo, can you please help me to understand the need "to inject the js into every page" when the Selenium IDE doesn't seem to run any command / test against an already opened page and it always opens a dedicated window instead? Is the Electron variant going to support running against an existing page like the other alternative tools do? Is it worth filing a new feature request for that?

corevo commented 4 years ago

Scripts have to be injected at page load in order to Selenium IDE to be able to automate the page, although Selenium IDE opens a tab of its own to automate, there is no way (at least in Chrome, I know Firefox already has this), to dynamically differentiate tabs and their scripts.

What we did do, is that tabs that are not part of the automation, the scripts in them will "sleep", if it still creates friction you should open an issue, but currently all scripts have to be injected to all tabs, but in tabs that are not part of the test they are no-ops.

pbodnar commented 4 years ago

@corevo , thanks for your explanation. Luckily, I haven't experienced, or noticed, a "friction" yet.

Regarding the second thing I wrote about, I've just simply created a new feature request - see #904.

ricardomussolini commented 4 years ago

I'm deactivating Selenium while I'm not using the add-on. It completely solved my problems.

Pages were taking 15 seconds longer to open

passed for 2 seconds

Thank you

bobvandevijver commented 4 years ago

Just saw this error pop up in our Sentry by somebody visiting one of our monitored sites:

SyntaxError ?(chrome-extension://mooikfkahbdckldjjndioackbalphokd/assets/prompt.js)
Identifier 'originalPrompt' has already been declared
jdlrobson commented 4 years ago

We are rolling out error logging on Wikipedia right now and this error is one of our top errors to a level that could become problematic and is delaying further roll out. Is anybody still looking into this problem or will we need to do something on our side to filter this out?

alitorbati commented 4 years ago

@jdlrobson fwiw at my org we ended up filtering them out on our end. super noisy, and seemingly no fix coming from the source

dustball commented 4 years ago
Screen Shot 2020-10-26 at 1 03 24 PM
RafiArsalan commented 2 years ago

Did you filter in sentry logs ?

toddtarsi commented 2 years ago

V4 uses a standalone binary, so this isn't an issue there.

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.