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

System.InvalidOperationException: TypeError: this.tabModal is null #1571

Closed
kwilson-93 opened this issue Jun 7, 2019 · 16 comments
Closed

System.InvalidOperationException: TypeError: this.tabModal is null #1571

kwilson-93 opened this issue Jun 7, 2019 · 16 comments

Comments

@kwilson-93
Copy link

kwilson-93 commented Jun 7, 2019

System

  • Version: 0.24.0
  • Platform: Win 7
  • Firefox: 67.0.1
  • Selenium: 3.4.0
  • Programming Language: C#

Issue

We have some automation tests which are failing with Firefox v67+ only (worked in previous versions e.g. v66.0.5).
The issue occurs when we browse to a page that displays a Windows Authentication prompt (note the issue does not occur if a Windows Authentication prompt is not displayed during the test).
We enter our credentials and hit enter (using SendKeys.SendWait()) which successfully logs in.
But any interaction with the driver object here after results in the following exception being thrown:

System.InvalidOperationException: TypeError: this.tabModal is null

image

@whimboo
Copy link
Collaborator

whimboo commented Jun 7, 2019

Could you please attach a trace-level log from geckodriver? Read more about reporting actionable bugs in our contribution guidelines.

@kwilson-93
Copy link
Author

hi whimboo,

For whatever reason I cannot generate a trace-level log when I follow the instructions you sent.
The stdout is empty.

image

@whimboo
Copy link
Collaborator

whimboo commented Jun 7, 2019

Did you only run those lines or your whole test? It shouldn't be empty.

@kwilson-93
Copy link
Author

I ran the whole test till failiure :)
I've repro'd both issues with a simple project.
Open the project, edit URL (must display the "Authentication Required" prompt when browsed), Username and Password respectively within TestMethod1, and run the test method.

I've made it available to you (I hope !!):
https://github.com/kwilson-93/TestingSolution/invitations

@whimboo
Copy link
Collaborator

whimboo commented Jun 11, 2019

If you could open up (means make it public) the simple project, that would be great. Thanks

@kwilson-93
Copy link
Author

@whimboo Done :)

@xTaZzGithub
Copy link

I have the exact same issue. For me it was possible to attach a trace-level log to the geckodriver. The output was:

1560416864553 webdriver::server DEBUG -> POST /session/c51a3e2c-6880-452c-840f-c7a42dec4abd/execute/sync {"script":"return document.readyState","args":[]}

1560416864557 webdriver::server DEBUG <- 500 Internal Server Error {"value":{"error":"unknown error","message":"TypeError: this.tabModal is null","stacktrace":"get ui@chrome://marionette/content/modal.js:159:5\nGeckoDriver.prototype._handleUserPrompts@chrome://marionette/content/driver.js:3256:23\nGeckoDriver.prototype.execute_@chrome://marionette/content/driver.js:991:14\nGeckoDriver.prototype.executeScript@chrome://marionette/content/driver.js:911:29\ndespatch@chrome://marionette/content/server.js:289:40\nexecute@chrome://marionette/content/server.js:262:16\nonPacket/<@chrome://marionette/content/server.js:235:20\nonPacket@chrome://marionette/content/server.js:236:9\n_onJSONObjectReady/<@chrome://marionette/content/transport.js:492:20\n"}}

@whimboo
Copy link
Collaborator

whimboo commented Jun 13, 2019

Do you have a screenshot, so that I know which kind of dialog that is? Maybe you also have a minimized testcase which I could use to reproduce myself?

@kwilson-93
Copy link
Author

Thanks @xTaZzGithub !

@whimboo here's the dialog:
image

@xTaZzGithub
Copy link

I'm using this site as a test site : 'https://jigsaw.w3.org/HTTP/Basic/' but it's the same for every other site that request a Basic Authentication.
The dialog looks as follows:
Basic_Authentication_Window_Firefox

The test case is to open the page, perform the login and then perform any actions with the driver.

@andreastt
Copy link
Contributor

That is not a Windows authentication prompt, but an HTTP Basic Auth prompt from Firefox. WebDriver doesn’t support basic auth yet (tracked in w3c/webdriver#385), so I don’t understand how this could’ve worked in in Firefox 66.

@kwilson-93 Did something change in your test environment/application?

@kwilson-93
Copy link
Author

hi @andreastt , I've just verified a test with v66.0.5 of Firefox and it is the same prompt shown above that is displayed. The issue does actually replicate, apologies but I made a mistake saying this version number. I'm unsure what the last version of Firefox was when the issue did not reproduce with, but it is somewhere between v65 & v66.0.5.

The only difference in the whole scenario is the version of Firefox :) Definitely when using v67+ I can reproduce the issue. Note that we're handling the prompt inputs and confirmation by calling SendKeys.SendWait(), not a WebDriver action.

@xTaZzGithub do you experience the same? What version of Firefox are you using when you cannot reproduce the issue?

@andreastt
Copy link
Contributor

Without knowing what SendKeys.SendWait() does by looking at a trace-level log it’s hard to say anything about what circumstances might have changed (it could be a change in basic auth/site origin behaviour in Firefox, in the Marionette server related to keyboard interaction, or in both).

Since HTTP basic auth is not officially supported by WebDriver, I’m inclined to close this on the grounds that we don’t know what the correct behaviour should be. It’s unfortunate that there has been a regression with geckodriver, but again, without more data it’s near impossible to tell.

@whimboo
Copy link
Collaborator

whimboo commented Jun 21, 2019

This should have actually been fixed by https://bugzilla.mozilla.org/show_bug.cgi?id=1538782 for Firefox 68 which is currently in beta.

@kwilson-93
Copy link
Author

hi @whimboo @xTaZzGithub, v68 of Firefox has now resolved this issue for me. Thanks for your help !

@lock
Copy link

lock bot commented Aug 24, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have run into an issue you think is related, please open a new issue.

@lock lock bot locked and limited conversation to collaborators Aug 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants