New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 7 users
Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2017
Cc:


Show other hotlists

Hotlists containing this issue:
Hotlist-1
Hotlist-1


Sign in to add a comment
NoSuchFrameException is thrown when attempting to focus on a frame with protocol "chrome-extension://" within a page with protocol "https://" on Chrome 58
Reported by olivierb...@gmail.com, Apr 21 2017 Back to list
Issue Description:
On Chrome 58, NoSuchFrameException is thrown when attempting to focus on a frame with protocol "chrome-extension://" within a page with protocol "https://".

This used to work perfectly in Chrome 57. My first guess is that this might be related to the new iframe sandbox features released in Chrome 58?

Steps to reproduce (if relevant, you MUST provide a simplified html page or
link to public site):
1) Have an chrome extension that creates iframes on webpages that point to a chrome-extension:// page that lives within the extension
2) Navigate to that website using Chromedriver
3) Attempt to switch focus to that iframe
4) See NoSuchFrameException


Platform: OSX
Chromedriver version: 2.29.461585
Chrome version: 58.0.3029.81

Error Stack Trace:
```
10:00:23.245 INFO - Executing: [switch to frame: [[ChromeDriver: chrome on MAC (f81633183c6e89bb123f69cc9bd735bb)] -> css selector: iframe[data-inpageid="tooltip-loginPrompt"]]])
10:00:23.260 WARN - Exception thrown
org.openqa.selenium.NoSuchFrameException: no such frame: element is not a frame
  (Session info: chrome=58.0.3029.81)
  (Driver info: chromedriver=2.29.461585 (0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b),platform=Mac OS X 10.12.3 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 15 milliseconds
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'C02T9AV0GTFM', ip: 'fe80:0:0:0:1c34:177:a7c8:1c3%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.3', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.29.461585 (0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b), userDataDir=/var/folders/k9/05nnkjqn7cb2cr5ry9w1yf940000gn/T//tk-robot}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=58.0.3029.81, platform=MAC, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}]
Session ID: f81633183c6e89bb123f69cc9bd735bb
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:638)
	at org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.frame(RemoteWebDriver.java:950)
	at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringTargetLocator.frame(EventFiringWebDriver.java:592)
	at org.openqa.selenium.remote.server.handler.SwitchToFrame.call(SwitchToFrame.java:50)
	at org.openqa.selenium.remote.server.handler.SwitchToFrame.call(SwitchToFrame.java:27)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
10:00:23.260 WARN - Exception: no such frame: element is not a frame
  (Session info: chrome=58.0.3029.81)
  (Driver info: chromedriver=2.29.461585 (0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b),platform=Mac OS X 10.12.3 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 15 milliseconds
```
 
Project Member Comment 1 by gmanikpure@chromium.org, Apr 21 2017
Labels: Needs-Feedback
Thanks for reporting the issue! Can you please provide the chrome extension mentioned in step 1) ?
The extension is the True Key password manager. You can download it here:
https://chrome.google.com/webstore/detail/true-key-by-intel-securit/ciahhpibjeonlihjdefecmhminjpmfkk?authuser=1

To get the iframe I am mentionning:
1) Install True Key
2) Create an account
3) Log out of True Key
4) Navigate to any URL that has a login form (example: https://www.dropbox.com/login)
5) An iframe will be injected in the page, with True Key UI in it

Chromedriver is unable to focus inside that frame on Chrome 48.
exactly same problem 
tested platforms: ubuntu, win(Windows NT 10.0.14393)
chrome=59.0.3030.0
chromedriver=2.29.461591 

- Failed: no such frame
            (Session info: chrome=59.0.3030.0)
            (Driver info: chromedriver=2.29.461591 (62ebf098771772160f391d75e589dc567915b233),platform=Windows NT 10.0.14393 x86_64)

Project Member Comment 4 by gmanikpure@chromium.org, May 4 2017
olivierbeaulieu657@, Here is what I tried :

1) Launch Chrome using Chromedriver and added True key extension
        ChromeOptions options = new ChromeOptions();
        options.addExtensions(new File("/path.to./truekey.crx"));
        WebDriver driver = new ChromeDriver(options);
        Thread.sleep(90000); // long sleep for step 2

2) A new Chrome browser window will be opened with True key extensions page ""
Now, login manually and then logout.

3) Navigate to dropbox and switch to frame 1 (not sure what frame to switch to).
        driver.get("https://www.dropbox.com/login");
        driver.switchTo().frame(1);

Please correct If I am missing anything.
The frame you should be seeing looks like this: https://imagebin.ca/v/3LQo6y6gWjRb

It's URL starts with the protocol chrome-extension://

Is this what you are seeing on your side?

Project Member Comment 6 by gmanikpure@chromium.org, May 5 2017
Labels: -Needs-Feedback
Status: Untriaged
Thanks for posting the image. Located the frame using class name "PBTooltipFrame".
   driver.switchTo().frame(driver.findElement(By.className("PBTooltipFrame")));

Issue is reproducible on HEAD versions of Chrome v60+, whereas it works fine on v57.0.2987.133. Tested both the versions with Chromedriver v2.29. Looks like some change at chromium side caused the issue.

I will be bisecting it further. Marking it untriaged.

I'm definitely having the same problem. I keep having to back-rev all my testing nodes to chrome 57 because all my automation testing breaks in 58. This is really causing me some headaches.

Thanks for addressing this.
Project Member Comment 8 by gmanikpure@chromium.org, May 16 2017
Labels: Needs-Feedback
I found the CL that caused this issue - crrev.com/450821

Workaround is to pass "--force-fieldtrials=SiteIsolationExtensions/Control" Chrome command line switch through ChromeOptions

        ChromeOptions options = new ChromeOptions();
        options.addArguments("--force-fieldtrials=SiteIsolationExtensions/Control");

I have verified this workaround in test scenario mentioned in comment#4 and #6 and it works as expected.

olivierbeaulieu657@ and others, Can you please give try this workaround and let us know how your test goes?

If it works, I can add this command line switch in Chromedriver.
Project Member Comment 9 by gmanikpure@chromium.org, May 16 2017
Cc: olivierb...@gmail.com
Gman:

I gave that a shot, have run it on both my linux and Windows systems, and it seems to be working. This was just some quick tests, but this is looking really positive. (big thanks!)

I will keep running tests over the next few days and see how it goes.
Confirmed, worked for us too! Thanks a lot.
Project Member Comment 12 by gmanikpure@chromium.org, May 17 2017
Cc: -olivierb...@gmail.com johnchen@chromium.org
Labels: -Needs-Feedback OS-All Pri-2
Owner: gmanikpure@chromium.org
Status: Assigned
Thank you both for confirming it! 

I will make the necessary changes in Chromedriver so that it no longer requires to explicitly pass the flag.
Project Member Comment 14 by gmanikpure@chromium.org, May 19 2017
Labels: ChromeDriver-2.30
Status: Fixed
Comment 15 Deleted
was using the workaround mentioned above;

"--force-fieldtrials=SiteIsolationExtensions/Control"

...but after upgrading to chrome 60/chromedriver 2.31 I am getting this error again;

{NoSuchFrameException}Message: no such frame: element is not a frame
  (Session info: chrome=60.0.3112.78)
  (Driver info: chromedriver=2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b),platform=Mac OS X 10.12.5 x86_64)

What do I need to do to get this to work in chrome 60?
Project Member Comment 17 by gmanikpure@chromium.org, Jul 25
regarding comment#16, Support for "--force-fieldtrials=SiteIsolationExtensions/Control" Chrome command line switch was removed in Chrome v60.

We are already looking into it. You may follow https://bugs.chromium.org/p/chromedriver/issues/detail?id=1819 for future updates.
Sign in to add a comment