Working with Selenium Web Driver and Firefox for the first time is very easy but it becomes a challenge because of the common error which almost everyone face is that Firefox gets launched but it waits for some time with blank Screen and no URL is opened and it fails with below error.
The main reason is compatibility of Firefox web-driver and Firefox version installed on the System. So if your Firefox has been updated recently then also update your Web Driver version.
Current Version while writing this were:
Firefox Version: 30
Web Driver Version: 2.44
And it worked fine. So next time you find this issue. The first step is to match the Firefox version with the Web-driver Version of Firefox.
Please do post your comments if it still doesn't solve the issue. There could be other cause of the problem which could help others.
Note: Disable the Auto Update Firefox option so that they don't get unsynced again.
Cheers !!!
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
dd-on online-accounts@lists.launchpad.net installed in app-system-local
1416941874951 addons.xpi-utils DEBUG Make addon app-system-local:online-accounts@lists.launchpad.net visible
1416941874951 DeferredSave.extensions.json DEBUG Save changes
1416941874951 DeferredSave.extensions.json DEBUG Save changes
1416941874992 addons.xpi DEBUG Updating database with changes to installed add-ons
1416941874992 addons.xpi-utils DEBUG Updating add-on states
1416941874993 addons.xpi-utils DEBUG Writing add-ons list
(firefox:4105): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-images after class was initialised
1416941876169 DeferredSave.extensions.json DEBUG Starting timer
1416941876196 DeferredSave.extensions.json DEBUG Starting write
1416941876316 DeferredSave.extensions.json DEBUG Write succeeded
1416941876316 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 16
System JS : ERROR resource://gre/modules/BookmarkHTMLUtils.jsm:897 - NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsINavBookmarksService.removeFolderChildren]
System JS : ERROR resource://gre/modules/BookmarkHTMLUtils.jsm:934 - NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsINavBookmarksService.runInBatchMode]
************************************************************
* Call to xpconnect wrapped JSObject produced this error: *
[Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIAnnotationService.getItemsWithAnnotation]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://app/components/nsBrowserGlue.js :: BG_EPDQI_runBatched :: line 1682" data: no]
************************************************************
1416941876460 addons.manager DEBUG shutdown
1416941876461 addons.xpi DEBUG shutdown
1416941876461 addons.xpi-utils DEBUG shutdown
1416941876463 addons.xpi DEBUG Notifying XPI shutdown observers
1416941876467 addons.manager DEBUG Async provider shutdown done
(process:4152): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-button-images after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::sm-connect after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::display after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-entry-select-on-focus after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-entry-password-hint-timeout after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-label-select-on-focus after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-can-change-accels after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popup-delay after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popdown-delay after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-bar-popup-delay after class was initialised
1416941877193 addons.xpi DEBUG startup
1416941877197 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous6634144291667526254webdriver-profile/extensions/webdriver-staging
1416941877197 addons.xpi DEBUG checkForChanges
1416941877240 addons.xpi DEBUG No changes found
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-images after class was initialised
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:106)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:244)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:183)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:179)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:92)
at org.openqa.selenium.example.Test.main(Test.java:16)
Exception in thread "main" org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/usr/bin/firefox) on port 7055; process output follows:
dd-on online-accounts@lists.launchpad.net installed in app-system-local
1416941874951 addons.xpi-utils DEBUG Make addon app-system-local:online-accounts@lists.launchpad.net visible
1416941874951 DeferredSave.extensions.json DEBUG Save changes
1416941874951 DeferredSave.extensions.json DEBUG Save changes
1416941874992 addons.xpi DEBUG Updating database with changes to installed add-ons
1416941874992 addons.xpi-utils DEBUG Updating add-on states
1416941874993 addons.xpi-utils DEBUG Writing add-ons list
(firefox:4105): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-images after class was initialised
1416941876169 DeferredSave.extensions.json DEBUG Starting timer
1416941876196 DeferredSave.extensions.json DEBUG Starting write
1416941876316 DeferredSave.extensions.json DEBUG Write succeeded
1416941876316 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 16
System JS : ERROR resource://gre/modules/BookmarkHTMLUtils.jsm:897 - NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsINavBookmarksService.removeFolderChildren]
System JS : ERROR resource://gre/modules/BookmarkHTMLUtils.jsm:934 - NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsINavBookmarksService.runInBatchMode]
************************************************************
* Call to xpconnect wrapped JSObject produced this error: *
[Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIAnnotationService.getItemsWithAnnotation]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://app/components/nsBrowserGlue.js :: BG_EPDQI_runBatched :: line 1682" data: no]
************************************************************
1416941876460 addons.manager DEBUG shutdown
1416941876461 addons.xpi DEBUG shutdown
1416941876461 addons.xpi-utils DEBUG shutdown
1416941876463 addons.xpi DEBUG Notifying XPI shutdown observers
1416941876467 addons.manager DEBUG Async provider shutdown done
(process:4152): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-button-images after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::sm-connect after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::display after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-entry-select-on-focus after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-entry-password-hint-timeout after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-label-select-on-focus after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-can-change-accels after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popup-delay after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popdown-delay after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-bar-popup-delay after class was initialised
1416941877193 addons.xpi DEBUG startup
1416941877197 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous6634144291667526254webdriver-profile/extensions/webdriver-staging
1416941877197 addons.xpi DEBUG checkForChanges
1416941877240 addons.xpi DEBUG No changes found
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-images after class was initialised
Build info: version: '2.33.0', revision: '4e90c97', time: '2013-05-22 15:32:38'
System info: os.name: 'Linux', os.arch: 'i386', os.version: '3.8.0-19-generic', java.version: '1.7.0_25'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:244)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:183)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:179)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:92)
at org.openqa.selenium.example.Test.main(Test.java:16)
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
dd-on online-accounts@lists.launchpad.net installed in app-system-local
1416941874951 addons.xpi-utils DEBUG Make addon app-system-local:online-accounts@lists.launchpad.net visible
1416941874951 DeferredSave.extensions.json DEBUG Save changes
1416941874951 DeferredSave.extensions.json DEBUG Save changes
1416941874992 addons.xpi DEBUG Updating database with changes to installed add-ons
1416941874992 addons.xpi-utils DEBUG Updating add-on states
1416941874993 addons.xpi-utils DEBUG Writing add-ons list
(firefox:4105): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-images after class was initialised
1416941876169 DeferredSave.extensions.json DEBUG Starting timer
1416941876196 DeferredSave.extensions.json DEBUG Starting write
1416941876316 DeferredSave.extensions.json DEBUG Write succeeded
1416941876316 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 16
System JS : ERROR resource://gre/modules/BookmarkHTMLUtils.jsm:897 - NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsINavBookmarksService.removeFolderChildren]
System JS : ERROR resource://gre/modules/BookmarkHTMLUtils.jsm:934 - NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsINavBookmarksService.runInBatchMode]
************************************************************
* Call to xpconnect wrapped JSObject produced this error: *
[Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIAnnotationService.getItemsWithAnnotation]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://app/components/nsBrowserGlue.js :: BG_EPDQI_runBatched :: line 1682" data: no]
************************************************************
1416941876460 addons.manager DEBUG shutdown
1416941876461 addons.xpi DEBUG shutdown
1416941876461 addons.xpi-utils DEBUG shutdown
1416941876463 addons.xpi DEBUG Notifying XPI shutdown observers
1416941876467 addons.manager DEBUG Async provider shutdown done
(process:4152): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-button-images after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::sm-connect after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::display after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-entry-select-on-focus after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-entry-password-hint-timeout after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-label-select-on-focus after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-can-change-accels after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popup-delay after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popdown-delay after class was initialised
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-bar-popup-delay after class was initialised
1416941877193 addons.xpi DEBUG startup
1416941877197 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous6634144291667526254webdriver-profile/extensions/webdriver-staging
1416941877197 addons.xpi DEBUG checkForChanges
1416941877240 addons.xpi DEBUG No changes found
(firefox:4152): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-images after class was initialised
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:106)
... 7 more
The main reason is compatibility of Firefox web-driver and Firefox version installed on the System. So if your Firefox has been updated recently then also update your Web Driver version.
Current Version while writing this were:
Firefox Version: 30
Web Driver Version: 2.44
And it worked fine. So next time you find this issue. The first step is to match the Firefox version with the Web-driver Version of Firefox.
Please do post your comments if it still doesn't solve the issue. There could be other cause of the problem which could help others.
Note: Disable the Auto Update Firefox option so that they don't get unsynced again.
Cheers !!!
1 comment:
Wonderful blog. It is really informative to all.keep update more information about this
Selenium Training in Bangalore
Selenium Training in Pune
Selenium Taining in Hyderabad
Selenium Training in Gurgaon
Selenium Training in Delhi
Post a Comment