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

When running as a Windows service the GFX sanity window doesn't close #1518

Closed
psicopep opened this Issue Mar 7, 2019 · 11 comments

Comments

Projects
None yet
3 participants
@psicopep
Copy link

psicopep commented Mar 7, 2019

System

  • Version: 0.24.0
  • Platform: Windows Server 2016
  • Firefox: 65.0.1
  • Selenium: Python Client version 3.141.0, Server version 3.141.59

Testcase

Webdriver fails to start a Firefox instance when running as a Windows service. It works fine when running as a foreground process.
It also works fine with older versions, we recently made a big jump from 59 to 65 and we found this issue at that moment. Versions prior and including 59 work fine running as service. Analysis on which particular version between 59 and 65 made the affecting change is still pending.

Stacktrace

stacktrace.log

Trace-level log

Attached two for failure when running as service and success when running as a foreground process:
service.log
foreground.log

@andreastt

This comment has been minimized.

Copy link
Member

andreastt commented Mar 7, 2019

geckodriver cannot be run as a Windows service, I’m afraid.

@psicopep

This comment has been minimized.

Copy link
Author

psicopep commented Mar 7, 2019

Oh, I was kind of expecting that. It was pure luck with an unsupported usage these past years, then. Now I'll have to fight security teams about autologon users again :-D
Ok, thanks for the quick response @andreastt :-)

@psicopep

This comment has been minimized.

Copy link
Author

psicopep commented Mar 7, 2019

Closing issue as usage is unsupported.

@psicopep psicopep closed this Mar 7, 2019

@andreastt

This comment has been minimized.

Copy link
Member

andreastt commented Mar 7, 2019

Note that you can prevent the Firefox application from opening by using headless mode. You can achieve this effect by setting the MOZ_HEADLESS=1 environment variable or by passing the --headless flag to Firefox.

You can see an example of doing that through WebDriver and moz:firefoxOptions on MDN: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions#args

I hope this helps!

@psicopep

This comment has been minimized.

Copy link
Author

psicopep commented Mar 7, 2019

Oh, this is actually using headless mode, but thanks anyway @andreastt :-)

@whimboo

This comment has been minimized.

Copy link
Collaborator

whimboo commented Mar 8, 2019

The underlying problem here is that there is the GFX sanity window which Marionette waits for until it has been closed. But that never happens, and the connection times out after 60s. See the following line:

1551993036506 Marionette TRACE GFX sanity window detected, waiting until it has been closed...

@psicopep, I would be really interested since which version of Firefox this problem can be seen. As best also test the beta releases which should bring us closer to the underlying change. Thanks a lot in advance!

@whimboo whimboo added the firefox label Mar 8, 2019

@whimboo whimboo changed the title Failure to start browser instance when running as a Windows service When running as a Windows service the GFX sanity window doesn't close Mar 8, 2019

@psicopep

This comment has been minimized.

Copy link
Author

psicopep commented Mar 8, 2019

Hi @whimboo :-) Thanks for your interest in this. I will try to make that analysis this weekend and I'll let you know :-)

@whimboo

This comment has been minimized.

Copy link
Collaborator

whimboo commented Mar 11, 2019

Thanks! Btw. are you on Windows 32-bit or 64-bit?

@psicopep

This comment has been minimized.

Copy link
Author

psicopep commented Mar 13, 2019

Hi @whimboo :-) Sorry for the delay. I narrowed this down to the following:

  • Version 59.0.3 is last to work fine when running as a service.
  • Version 60.0b3 is the first to fail but this does not show the GFX message.
  • Version 62.0b3 is the first to fail showing the GFX message.

Regarding the platform, this was using a 64-bit Windows, more specifically a Windows Server 2016.

59.0.3.log
60b3.log
62b3.log

@whimboo

This comment has been minimized.

Copy link
Collaborator

whimboo commented Mar 13, 2019

Can you please also try the 60.0b1 and 60.0b2 builds as can be found here?

https://archive.mozilla.org/pub/devedition/releases/

How long is the GFX window open with 62.0b3? Until Firefox gets killed by geckodriver? When that happens do you see any errors in the browser/web console?

@psicopep

This comment has been minimized.

Copy link
Author

psicopep commented Mar 29, 2019

Hi @whimboo :-) Sorry again for the (bigger) delay. I'm attaching below the logs for 60.0b1 and 60.0b2. Turns out 60.0b2 is the first to fail. 60.0b1 was still working fine.

Regarding the GFX window, I'm afraid this Windows is virtualized and VirtualBox doesn't seem to support keyboard/mouse input in the session 0 desktop, so I can't look into the browser console or move the window to check if there is another window behind it.
Having said that, I couldn't see any GFX window whatsoever.

60b1.log
60b2.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.