javascript error: Cannot read property 'align-self'
roesslerj opened this issue · 12 comments
org.openqa.selenium.JavascriptException: javascript error: Cannot read property 'align-self' of null (Session info: chrome=74.0.3729.108) (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.10586 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T18:33:54.468Z' System info: host: 'TXRICMAC0699747.local', ip: 'fe80:0:0:0:18ed:1134:bc20:90bf%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_144' Driver info: org.openqa.selenium.remote.RemoteWebDriver Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 74.0.3729.6 (255758eccf3d24..., userDataDir: C:\Users\ADMINI~1\AppData\L...}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:49754}, handlesAlerts: true, hasMetadata: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, proxy: Proxy(pac: http://127.0.0.1..., rotatable: false, setWindowRect: true, strictFileInteractability: false, takesHeapSnapshot: true, takesScreenshot: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unexpectedAlertBehaviour: ignore, unhandledPromptBehavior: ignore, version: 74.0.3729.108, webStorageEnabled: true, webdriver.remote.sessionid: bd66936d5e0440a1b452f03d278...} Session ID: bd66936d5e0440a1b452f03d27846a89 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:214) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166) at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:537) at de.retest.web.RecheckSeleniumAdapter.convert(RecheckSeleniumAdapter.java:109) at de.retest.web.RecheckSeleniumAdapter.convertWebDriver(RecheckSeleniumAdapter.java:96) at de.retest.web.RecheckSeleniumAdapter.convert(RecheckSeleniumAdapter.java:89) at de.retest.web.RecheckSeleniumAdapter.convert(RecheckSeleniumAdapter.java:86) at de.retest.recheck.persistence.RecheckSutState.convert(RecheckSutState.java:25) at de.retest.recheck.RecheckImpl.createActionReplayResult(RecheckImpl.java:138) at de.retest.recheck.RecheckImpl.check(RecheckImpl.java:126) at de.retest.recheck.RecheckImpl.check(RecheckImpl.java:116)
Probably because in JS, var style = window.getComputedStyle(node);
returned null
.
@sdanes1 could you provide some more information about this? Is it reproducible and deterministic (happens every time)? Could you verify whether it is browser/os specific or specific to a website? If the latter, is the website accessible somehow (e.g. as a html file)?
As this can have several causes, we need some way to reproduce it in order to verify a fix...
@roesslerj See answers below:
- Is it reproducible and deterministic (happens every time)? Yes.
-Could you verify whether it is browser/os specific or specific to a website? I originally ran on chrome. Testing it on firefox it gives a slightly different exception, org.openqa.selenium.JavascriptException: TypeError: parentStyle is null, but at the exact same place.
I did a little more testing and it does seem to be a problem with the .check call on my app as I was able to get the newest recheck-web to work with google but using the older selenium 3.8.1 version. I have attached a copy of the page in question as a zip file
dashboard.zip
Let me know if this helps or you need more info
Hmm. I can check that website without errors, so it seems to be related to OS/Browser ... let me think about it.
Hmm. I will rely on your expertise. I appreciate all your help! We really would like to use recheck-web in our testing if we can iron out these issues. Are you running with the 3.8.1 version of Selenium? Also I was executing in Saucelabs cloud, I tried running locally and eliminating saucelabs and still get exception:
Cannot read property 'align-self' of null 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:214) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166) at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:537) at de.retest.web.RecheckSeleniumAdapter.convert(RecheckSeleniumAdapter.java:109) at de.retest.web.RecheckSeleniumAdapter.convertWebDriver(RecheckSeleniumAdapter.java:96) at de.retest.web.RecheckSeleniumAdapter.convert(RecheckSeleniumAdapter.java:89) at de.retest.web.RecheckSeleniumAdapter.convert(RecheckSeleniumAdapter.java:86) at de.retest.recheck.persistence.RecheckSutState.convert(RecheckSutState.java:25) at de.retest.recheck.RecheckImpl.createActionReplayResult(RecheckImpl.java:138) at de.retest.recheck.RecheckImpl.check(RecheckImpl.java:126) at de.retest.recheck.RecheckImpl.check(RecheckImpl.java:116) at com.tmobile.he.tests.customer.CustomerSanity.itShouldLoginWithValidCredentials(CustomerSanity.java:29)
That's great! If it occurs with saucelabs, we can most probably reproduce it. Can you give us the capabilities with which it occurred. Like:
capabilities.setCapability("browserName", "Safari");
capabilities.setCapability("platform", "macOS 10.13");
capabilities.setCapability("version", "11.1");
Sure.
screenResolution=1600x1200
For chrome;
platform=Windows 10
version=74.0
For firefox:
platform=Windows 10
version=67.0
We were able to reproduce it and create a fix. Since we meanwhile released recheck-web 1.5.0, this will be a hotfix (1.5.1) ... could you verify whether this fix works for you?
Hotfix beta now available (also on Maven Central): https://github.com/retest/recheck-web/releases/tag/v1.5.1-beta.1
Once you verified that this works for you, we'll release a hotfix version. Thanks!
Just finished test with 1.5.1-beta.1 works like a charm! Thanks so much guys!