Closed Bug 1027222 Opened 10 years ago Closed 6 years ago

Plugin Stopped Working Popup appears when calling webdriver.quit() method using Firefox V30

Categories

(Firefox :: Extension Compatibility, defect)

30 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: phillipahill, Unassigned)

Details

Attachments

(2 files)

Attached image FirefoxPopup.png
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140605174243

Steps to reproduce:

After upgrading to Firefox v30 a window now pops up and says Plugin Container for Firefox has stopped working when running my test cases. The test cases execute fine, but I get the popup when trying to execute webDriver.quit().

This is reproduceable on other machines in my office as well. If I restore Firefox to version 29.0.1 the problem disappears, so it appears that version 30.0 of Firefox is the cause.

Environment information : Windows 7
Firefox : 30.0
Selenium server : 2.42.2


Actual results:

Screenshot of popup attached.

Additional Console Output when popup appears:
Jun 17, 2014 12:13:04 PM org.openqa.selenium.os.UnixProcess$SeleniumWatchDog destroyHarder
INFO: Command failed to close cleanly. Destroying forcefully (v2). org.openqa.selenium.os.UnixProcess$SeleniumWatchDog@7b7a6347

Additional Windows output:
Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	plugin-container.exe
  Application Version:	30.0.0.5269
  Application Timestamp:	53914233
  Fault Module Name:	mozalloc.dll
  Fault Module Version:	30.0.0.5269
  Fault Module Timestamp:	53911393
  Exception Code:	80000003
  Exception Offset:	0000141b
  OS Version:	6.1.7601.2.1.0.256.4
  Locale ID:	1033
  Additional Information 1:	0a9e
  Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:	0a9e
  Additional Information 4:	0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt


Expected results:

Firefox quits / closes gracefully.
I have exactly the same problem, running selenium tests on Windows 7 64bit with FF 30, tests do run successfully like before, and then the popup comes when the webdriver quits:

roblemsignatur:
  Problemereignisname:	APPCRASH
  Anwendungsname:	plugin-container.exe
  Anwendungsversion:	30.0.0.5269
  Anwendungszeitstempel:	53914233
  Fehlermodulname:	mozalloc.dll
  Fehlermodulversion:	30.0.0.5269
  Fehlermodulzeitstempel:	53911393
  Ausnahmecode:	80000003
  Ausnahmeoffset:	0000141b
  Betriebsystemversion:	6.1.7601.2.1.0.256.4
  Gebietsschema-ID:	1031
  Zusatzinformation 1:	0a9e
  Zusatzinformation 2:	0a9e372d3b4ad19135b953a78882e789
  Zusatzinformation 3:	0a9e
  Zusatzinformation 4:	0a9e372d3b4ad19135b953a78882e789
Additional information: The selenium python client hangs on waiting for the response from the DELETE Http request sent in webdriver.py:456 for QUIT command (selenium 2.39.0) until the popup is closed. Not sure how to pinpoint this between the webdriver and firefox, probably some new incompatibility?
My error report appears to match the above, precisely.  Generally Firefox works fine for the majority of the day, but around the afternoon it becomes unstable.  After minimizing and maximizing a window, the pages will appear solid black.  Waiting and scrolling will sometimes result in correcting the issue, but very temporarily.  Generally I need to restart the computer in order to continue working.  

Today, shortly after I got my first black screen, the browser crashed.  I googled "appcrash plugin-container.exe 80000003" and found several results that matched mine, which I will copy/paste below.  

My Firefox browser and extensions are up to date, or should be.  I have recently installed java and adobe updates.

Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	plugin-container.exe
  Application Version:	30.0.0.5269
  Application Timestamp:53914233
  Fault Module Name:	mozalloc.dll
  Fault Module Version:	30.0.0.5269
  Fault Module Timestamp:	53911393
  Exception Code:	80000003
  Exception Offset:	0000141b
  OS Version:	6.1.7601.2.1.0.256.48
  Locale ID:	1033
  Additional Information 1:	0a9e
  Additional Information 2:	0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:	0a9e
  Additional Information 4:	0a9e372d3b4ad19135b953a78882e789
Same Issue: Win7 64bit German on Dell Notebook.

  Problemereignisname:	APPCRASH
  Anwendungsname:	plugin-container.exe
  Anwendungsversion:	30.0.0.5269
  Anwendungszeitstempel:	53914233
  Fehlermodulname:	mozalloc.dll
  Fehlermodulversion:	30.0.0.5269
  Fehlermodulzeitstempel:	53911393
  Ausnahmecode:	80000003
  Ausnahmeoffset:	0000141b
  Betriebsystemversion:	6.1.7601.2.1.0.256.4
  Gebietsschema-ID:	1031
  Zusatzinformation 1:	0a9e
  Zusatzinformation 2:	0a9e372d3b4ad19135b953a78882e789
  Zusatzinformation 3:	0a9e
  Zusatzinformation 4:	0a9e372d3b4ad19135b953a78882e789
From my threads.  Every fail involves the same DLL, Exception code, and Fault offset

THE SETUP ON MY MACHINE AND CONDITIONS ENCOUNTERED
  Small webdriver features pass
  Medium webdriver sized features with multiple scenarios pass
**  Large webdriver feature files with multiple scenarios fail
  Adding a pause before the quit in webdriver (suggested as a solution in https://code.google.com/p/selenium/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Stars%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&id=7506) did not resolve the issue for me.
  Output format from cucumber was json. 
  Running ruby 193 with selenium-server-standalone-2.42.2.jar and cucumber (latest version).
  java uses a high of about 141,000 KB memory
  Firefox uses a high of about 380,000 KB memory

WHEN IT OCCURS
 This happens when webdriver closes firefox with a significant amount of memory in use (there are still plenty of resources on the machine, I checked, but the size of the cucumber feature file does make a huge difference). Specifically, webdriver detects that firefox did not close when running quit and forces the close.

WEBDRIVER LOG
==============

14:21:22.466 INFO - Done: [click: 821 [[FirefoxDriver: firefox on XP (cd94df53-b
b73-4a8b-9b09-1dedc4dd2455)] -> partial link text: Complete tour]]
14:21:22.485 INFO - Executing: [get current url])
14:21:22.879 INFO - Done: [get current url]
14:21:22.893 INFO - Executing: [execute script: return window.jQuery == null ? 0
 : window.jQuery.active, []])
14:21:22.909 INFO - Done: [execute script: return window.jQuery == null ? 0 : wi
ndow.jQuery.active, []]
14:21:22.915 INFO - Executing: [execute script: return document.readyState, []])

14:21:22.930 INFO - Done: [execute script: return document.readyState, []]
14:21:22.937 INFO - Executing: [refresh])
14:21:37.102 INFO - Done: [refresh]
14:21:37.119 INFO - Executing: [execute script: return window.jQuery == null ? 0
 : window.jQuery.active, []])
14:21:37.964 INFO - Done: [execute script: return window.jQuery == null ? 0 : wi
ndow.jQuery.active, []]
14:21:37.966 INFO - Executing: [execute script: return document.readyState, []])

14:21:37.990 INFO - Done: [execute script: return document.readyState, []]
14:22:08.006 INFO - Executing: [delete all cookies])
14:22:08.024 INFO - Done: [delete all cookies]
14:22:08.082 INFO - Executing: [delete session: cef9a31d-8de3-4b64-8090-5cf60be5
99b9])
14:22:10.107 INFO - Command failed to close cleanly. Destroying forcefully (v2).
 org.openqa.selenium.os.UnixProcess$SeleniumWatchDog@52d3d515


WINDOWS LOG
=============
Faulting application name: plugin-container.exe, version: 31.0.0.5310, time stamp: 0x53c75e91
Faulting module name: mozalloc.dll, version: 31.0.0.5310, time stamp: 0x53c72e91
Exception code: 0x80000003
Fault offset: 0x0000141b
Faulting process id: 0x73c
Faulting application start time: 0x01cfa775a771b15c
Faulting application path: C:\Program Files (x86)\Mozilla Firefox\plugin-container.exe
Faulting module path: C:\Program Files (x86)\Mozilla Firefox\mozalloc.dll
Report Id: 5d60515c-136a-11e4-95f6-06142c0ee7da

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Application Error" /> 
  <EventID Qualifiers="0">1000</EventID> 
  <Level>2</Level> 
  <Task>100</Task> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2014-07-24T19:40:29.000000000Z" /> 
  <EventRecordID>8872</EventRecordID> 
  <Channel>Application</Channel> 
  <Computer>IP-C0A85162.corp.awsapps.com</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>plugin-container.exe</Data> 
  <Data>31.0.0.5310</Data> 
  <Data>53c75e91</Data> 
  <Data>mozalloc.dll</Data> 
  <Data>31.0.0.5310</Data> 
  <Data>53c72e91</Data> 
  <Data>80000003</Data> 
  <Data>0000141b</Data> 
  <Data>73c</Data> 
  <Data>01cfa775a771b15c</Data> 
  <Data>C:\Program Files (x86)\Mozilla Firefox\plugin-container.exe</Data> 
  <Data>C:\Program Files (x86)\Mozilla Firefox\mozalloc.dll</Data> 
  <Data>5d60515c-136a-11e4-95f6-06142c0ee7da</Data> 
  </EventData>
  </Event>
This is completely blocking our test run in firefox.
Issue persists with v31.
My experimentation seems to point to this happening after navigating to a page that contains Flash.  After that, it does not seem to matter if the Selenium test ends on that page or moves on to another page that does not contain Flash, the container will still crash.

Please pick up this issue, as with Noga, this is completely blocking our testing efforts.
I am experiencing this as well (Fireox 30, Selenium 2.41). And like Ryan, my tests are also visiting a page with Flash on it.
i rename the plugin-container.exe to plugin-container_.exe and the errors was gone, my selenium test are working well now. But I do not know what will be the site effects. But ok, at the moment my selenium test are now working :-)
Same problem here, this is a real pain.
This problem had stopped happening with great frequency until Firefox updated itself today.  Since the update, Firefox has crashed twice due to the same plugin error.
I am experience with the same issue with 33. I had tried to rename or remove the plugin-container.exe, but it doesn't make a difference with firefox 33. And this is really becoming to be the road block now.
I am experiencing the same behavior after updating from FF (30 or 31?) to 33.1.1 on 32 bit XP.  If I have youtube or other plugin-container based websites active, and put the computer to sleep, when I resume the browser will crash.  And it will crash in a way that 'recover previous session' is not working either (greyed out, session .js is missing from profile folder.  SessionManager plugin gets a file read error on its end for the previous crashed session too.)

The crash seems to occur only when focus goes back to the window with youtube open.  I can browse in the existing window with non-plugin tabs fine after resume, but changing windows triggers the crash.
Happy new year 2015! This issue is important to me.
After a long 15 mins hang, the console show this error in a Unix machine. Thanks!
I've witnessed this issue with Firefox 34.0.5, WebDriver 2.44.0, Selenium Server 2.44.0 and Ruby WebDriver 2.44.0.

Windows 7 Enterprise, Service Pack 1, 64 bit


Additionally, it only happens when running via Selenium Server.
If I spawn Firefox instances directly, no crash happens and test cases execute successfully.
Can anyone else comment if this is the same for them?
I was getting this issue on Firefox 34.0.5 with Selenium 2.43, but when I updated to FF 35 and Selenium 2.44, I still see the issue. But if I remove the plugin_container.exe from the Firefox file location (C\Program Files\Mozilla Firefox\plugin_container.exe) , the error stops.
In my case, removing plugin_container.exe was not a solution, because I still needed to see the flash while having an end-user interaction with the application. 

Here is what I found out on the issue:
"This happens when webdriver closes firefox with a significant amount of memory in use. Specifically, webdriver detects that firefox did not close when running quit and forces the close."

Killing the plugin-container process solved my problem (code in C#):

using System.Diagnostics;
...
 public void Dispose()
        {
            Driver.Close();
            try
            {
                Process[] proc = Process.GetProcessesByName("plugin-container");
                proc[0].Kill();
            }
            catch (Exception e)
            {
            }
            Driver.Dispose();
        }
Where does the above C# code go? This plugin_container.exe error is a real problem for us, because now many apps won't work since we have to use an older version of Firefox on many computers until we deploy our solution, which is to just recreate each account's Windows profile.
After a long time of waiting with an old Firefox version I was finally forced to upgrade and of course ran into this problem immediately. I managed to create a stable workaround for this.
Before I execute driver.quit() in my code I do the following (Java code):

Runtime().getRuntime().exec("taskkill /f /im plugin-container.exe")

This first part kills the PC process before WebDriver tries to close FF, so I act before the problem happens. Most of the time this is enough and after that driver.quit() works without issues.

BUT sometimes I still get the Windows dialog warning me that PC has crashed. It is this window that is the real problem, as it is blocking the execution of further tests, the PC process is already dead and if not for this warning dialog it wouldn't have been an issue. It comes from the Windows Error Reporting (WER) service. Some googling advised to disable the service, but that didn't quite work on my setup. So I added a 1s delay after killing PC and then I kill the WER process :)

Complete 'solution' looks like this:
Runtime().getRuntime().exec("taskkill /f /im plugin-container.exe")
Thread.sleep(1000) // modify for effect
Runtime().getRuntime().exec("taskkill /f /im WefFault.exe")

It's crude, but it works for me. Since implementing this I've never seen this problem stop my tests, been testing it out for about a week now, with tests running several times a day.

Kudos to mister C two posts up for pointing me to this idea.
> Complete 'solution' looks like this:
> Runtime().getRuntime().exec("taskkill /f /im plugin-container.exe")
> Thread.sleep(1000) // modify for effect
> Runtime().getRuntime().exec("taskkill /f /im WefFault.exe")

Should be WerFault.exe, typo.
Can't you edit comments here? :/
(In reply to Ted Huntington from comment #19)
> Where does the above C# code go? This plugin_container.exe error is a real
> problem for us, because now many apps won't work since we have to use an
> older version of Firefox on many computers until we deploy our solution,
> which is to just recreate each account's Windows profile.

The Dispose() method is called after each test execution, it closes the browser. The solution is that, before closing the browser, to kill the process for plugin-container, and only after this to do the closing action.
*I used "closes the browser", but I meant that closes the browser - Driver.Close()- and cleans up the object - Driver.Dispose();
(In reply to C from comment #22)
> (In reply to Ted Huntington from comment #19)
> > Where does the above C# code go? This plugin_container.exe error is a real
> > problem for us, because now many apps won't work since we have to use an
> > older version of Firefox on many computers until we deploy our solution,
> > which is to just recreate each account's Windows profile.
> 
> The Dispose() method is called after each test execution, it closes the
> browser. The solution is that, before closing the browser, to kill the
> process for plugin-container, and only after this to do the closing action.

So you actually rebuild Firefox from the source?
Had this same issue from what I understand it is a timing issue due to the process separation between the browser and the plugin container when the FirefoxDriver is disposed of.  The code below for example makes it work again by disabling process separation.

FirefoxProfile profile = new FirefoxProfile();
profile.SetPreference("dom.ipc.plugins.enabled", false);
driver = new FirefoxDriver(new FirefoxBinary("C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe"), profile);
Component: Untriaged → Extension Compatibility
Mass-closing old Extension Compatibility bugs that relate to legacy add-ons or NPAPI plug-ins. If you think this bug is still valid, please reopen or comment.

Sorry for the bug spam, and happy Friday!
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX

(In reply to Kevin George from comment #25)

Had this same issue from what I understand it is a timing issue due to the
process separation between the browser and the plugin container when the
FirefoxDriver is disposed of. The code below for example makes it work
again by disabling process separation.

FirefoxProfile profile = new FirefoxProfile();
profile.SetPreference("dom.ipc.plugins.enabled", false);
driver = new FirefoxDriver(new FirefoxBinary("C:\Program Files
(x86)\Mozilla Firefox\firefox.exe"), profile);

Python version of this work-around:

from selenium.webdriver.firefox.options import Options
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile

options = Options()
firefox_profile = FirefoxProfile()
firefox_profile.set_preference("dom.ipc.plugins.enabled", False)
options.profile = firefox_profile

with webdriver.Firefox(options=options) as driver:
...

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: