nexiality / nexial-core

test automation for everyone - test automation platform with support for web (selenium), desktop, database, api and much more. Coding not required ;-)
https://nexiality.github.io/documentation
Apache License 2.0
43 stars 10 forks source link

Unable to run tests utilizing web browser - nexial version 2.9_0735+ #12

Closed jwetter closed 4 years ago

jwetter commented 4 years ago

Subject of the issue

Unable to run tests that utilize web browser. Have tried Firefox and Chrome which has failed.

Your environment Details

Steps to reproduce

Nexail Step utilized was: web open(url)

Expected behavior

URL is opened in web browser without issue

Actual behavior

Chrome INFO: Detected dialect: W3C 14:36:43.030|browser initialization completed for 'chrome' 14:36:43.047 >> setting browser page load timeout to 10000 ms 14:36:45.793 >> current browser window handle:CDwindow-81D18F0C29D57F8D601021974B099BD0 14:36:45.893|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200207_143356.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Executing request GET http://api.userstack.com/detect?access_key=5b71975a107de30d26f3878fa9adbb5e&ua=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F80.0.3987.87+Safari%2F537.36 HTTP/1.1 14:36:46.007|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200207_143356.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Saving response payload as raw bytes 14:36:46.017|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200207_143356.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Executed request GET http://api.userstack.com/detect?access_key=5b71975a107de30d26f3878fa9adbb5e&ua=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F80.0.3987.87+Safari%2F537.36 HTTP/1.1: HTTP/1.1 200 OK 14:36:46.019 >> Error when invoking UserStack: {"code":101,"type":"invalid_access_token"}

Chrome Headless INFO: Detected dialect: W3C 13:09:10.651|browser initialization completed for 'chromeheadless' 13:09:10.667 >> setting browser page load timeout to 10000 ms [1581109754.054][SEVERE]: Timed out receiving message from renderer: 0.100 [1581109754.163][SEVERE]: Timed out receiving message from renderer: 0.100 13:09:15.129 >> current browser window handle:CDwindow-CA17A628440A52AD140A1A621E89D262 13:09:15.206|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200207_130623.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Executing request GET http://api.userstack.com/detect?access_key=278720a8776318f6bee49fe59c517381&ua=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+HeadlessChrome%2F80.0.3987.87+Safari%2F537.36 HTTP/1.1 13:09:15.314|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200207_130623.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Saving response payload as raw bytes 13:09:15.331|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200207_130623.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Executed request GET http://api.userstack.com/detect?access_key=278720a8776318f6bee49fe59c517381&ua=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+HeadlessChrome%2F80.0.3987.87+Safari%2F537.36 HTTP/1.1: HTTP/1.1 200 OK 13:09:15.341 >> Error when invoking UserStack: {"code":101,"type":"invalid_access_token"}

Firefox 13:42:33.545|No valid instance of webdriver, initializing... 13:42:33.545|init firefox 13:42:33.545|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200207_133949.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Executing request GET https://api.github.com/repos/mozilla/geckodriver/releases/latest HTTP/1.1 13:42:34.015|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200207_133949.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Saving response payload as raw bytes 13:42:34.015|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200207_133949.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Executed request GET https://api.github.com/repos/mozilla/geckodriver/releases/latest HTTP/1.1: HTTP/1.1 401 Unauthorized 13:42:34.015 >> Error initializing browser 'firefox': Error when accessing https://api.github.com/repos/mozilla/geckodriver/releases/latest: Unauthorized 13:42:34.031 >> Check corresponding error log for details: C:\Projects\qa-automation_ips_Repository\RegressionTest\output\20200207_133535\logs\simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200207_133949.001.xlsx_SF_HTML-createProjectFromPSO_A1180.log 13:42:34.031|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200207_133949.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - FAIL Error initializing browser 'firefox': Error when accessing https://api.github.com/repos/mozilla/geckodriver/releases/latest: Unauthorized 13:42:34.031|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200207_133949.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Error log: C:\Projects\qa-automation_ips_Repository\RegressionTest\output\20200207_133535\logs\simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200207_133949.001.xlsx_SF_HTML-createProjectFromPSO_A1180.log

Firefox log information: java.lang.RuntimeException: Error initializing browser 'firefox': Error when accessing https://api.github.com/repos/mozilla/geckodriver/releases/latest: Unauthorized at org.nexial.core.plugins.web.Browser.init(Browser.java:398) at org.nexial.core.plugins.web.Browser.ensureWebDriverReady(Browser.java:307) at org.nexial.core.model.PluginManager.initBrowser(PluginManager.java:88) at org.nexial.core.model.PluginManager.getPlugin(PluginManager.java:64) at org.nexial.core.model.ExecutionContext.findPlugin(ExecutionContext.java:378) at org.nexial.core.model.TestStep.invokeCommand(TestStep.java:349) at org.nexial.core.model.TestStep.execute(TestStep.java:175) at org.nexial.core.model.TestCase.execute(TestCase.java:94) at org.nexial.core.model.TestScenario.execute(TestScenario.java:129) at org.nexial.core.model.ExecutionContext.execute(ExecutionContext.java:1221) at org.nexial.core.ExecutionThread.run(ExecutionThread.java:182) Caused by: java.io.IOException: Error when accessing https://api.github.com/repos/mozilla/geckodriver/releases/latest: Unauthorized at org.nexial.core.plugins.web.WebDriverHelper.resolveDriverManifest(WebDriverHelper.kt:159) at org.nexial.core.plugins.web.WebDriverHelper.downloadDriver(WebDriverHelper.kt:79) at org.nexial.core.plugins.web.WebDriverHelper.resolveDriver(WebDriverHelper.kt:68) at org.nexial.core.plugins.web.Browser.initFirefox(Browser.java:723) at org.nexial.core.plugins.web.Browser.init(Browser.java:383) ... 10 more

Screen shots

Attach Logs

mikeliucc commented 4 years ago

Apparent Nexial was not able to make a HTTP call to https://api.github.com/repos/mozilla/geckodriver/releases/latest from your computer/network:

Error when accessing https://api.github.com/repos/mozilla/geckodriver/releases/latest: Unauthorized

Can you see if you can call this URL directly, or maybe check your network? Thanks!

jwetter commented 4 years ago

Response from https://api.github.com/repos/mozilla/geckodriver/releases/latest on same system running Nexial is as follows (this does not appear to be a network connection issue):

{ "url": "https://api.github.com/repos/mozilla/geckodriver/releases/20654191", "assets_url": "https://api.github.com/repos/mozilla/geckodriver/releases/20654191/assets", "upload_url": "https://uploads.github.com/repos/mozilla/geckodriver/releases/20654191/assets{?name,label}", "html_url": "https://github.com/mozilla/geckodriver/releases/tag/v0.26.0", "id": 20654191, "node_id": "MDc6UmVsZWFzZTIwNjU0MTkx", "tag_name": "v0.26.0", "target_commitish": "master", "name": "", "draft": false, "author": { "login": "andreastt", "id": 399120, "node_id": "MDQ6VXNlcjM5OTEyMA==", "avatar_url": "https://avatars3.githubusercontent.com/u/399120?v=4", "gravatar_id": "", "url": "https://api.github.com/users/andreastt", "html_url": "https://github.com/andreastt", "followers_url": "https://api.github.com/users/andreastt/followers", "following_url": "https://api.github.com/users/andreastt/following{/other_user}", "gists_url": "https://api.github.com/users/andreastt/gists{/gist_id}", "starred_url": "https://api.github.com/users/andreastt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/andreastt/subscriptions", "organizations_url": "https://api.github.com/users/andreastt/orgs", "repos_url": "https://api.github.com/users/andreastt/repos", "events_url": "https://api.github.com/users/andreastt/events{/privacy}", "received_events_url": "https://api.github.com/users/andreastt/received_events", "type": "User", "site_admin": false }, "prerelease": false, "created_at": "2019-08-16T10:41:23Z", "published_at": "2019-10-11T23:34:06Z", "assets": [ { "url": "https://api.github.com/repos/mozilla/geckodriver/releases/assets/15445299", "id": 15445299, "node_id": "MDEyOlJlbGVhc2VBc3NldDE1NDQ1Mjk5", "name": "geckodriver-v0.26.0-linux32.tar.gz", "label": null, "uploader": { "login": "whimboo", "id": 129603, "node_id": "MDQ6VXNlcjEyOTYwMw==", "avatar_url": "https://avatars2.githubusercontent.com/u/129603?v=4", "gravatar_id": "", "url": "https://api.github.com/users/whimboo", "html_url": "https://github.com/whimboo", "followers_url": "https://api.github.com/users/whimboo/followers", "following_url": "https://api.github.com/users/whimboo/following{/other_user}", "gists_url": "https://api.github.com/users/whimboo/gists{/gist_id}", "starred_url": "https://api.github.com/users/whimboo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/whimboo/subscriptions", "organizations_url": "https://api.github.com/users/whimboo/orgs", "repos_url": "https://api.github.com/users/whimboo/repos", "events_url": "https://api.github.com/users/whimboo/events{/privacy}", "received_events_url": "https://api.github.com/users/whimboo/received_events", "type": "User", "site_admin": false }, "content_type": "application/x-gzip", "state": "uploaded", "size": 2330668, "download_count": 23167, "created_at": "2019-10-12T18:17:37Z", "updated_at": "2019-10-12T18:17:43Z", "browser_download_url": "https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux32.tar.gz" }, { "url": "https://api.github.com/repos/mozilla/geckodriver/releases/assets/15445301", "id": 15445301, "node_id": "MDEyOlJlbGVhc2VBc3NldDE1NDQ1MzAx", "name": "geckodriver-v0.26.0-linux64.tar.gz", "label": null, "uploader": { "login": "whimboo", "id": 129603, "node_id": "MDQ6VXNlcjEyOTYwMw==", "avatar_url": "https://avatars2.githubusercontent.com/u/129603?v=4", "gravatar_id": "", "url": "https://api.github.com/users/whimboo", "html_url": "https://github.com/whimboo", "followers_url": "https://api.github.com/users/whimboo/followers", "following_url": "https://api.github.com/users/whimboo/following{/other_user}", "gists_url": "https://api.github.com/users/whimboo/gists{/gist_id}", "starred_url": "https://api.github.com/users/whimboo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/whimboo/subscriptions", "organizations_url": "https://api.github.com/users/whimboo/orgs", "repos_url": "https://api.github.com/users/whimboo/repos", "events_url": "https://api.github.com/users/whimboo/events{/privacy}", "received_events_url": "https://api.github.com/users/whimboo/received_events", "type": "User", "site_admin": false }, "content_type": "application/x-gzip", "state": "uploaded", "size": 2390549, "download_count": 18076067, "created_at": "2019-10-12T18:17:49Z", "updated_at": "2019-10-12T18:17:53Z", "browser_download_url": "https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz" }, { "url": "https://api.github.com/repos/mozilla/geckodriver/releases/assets/15436813", "id": 15436813, "node_id": "MDEyOlJlbGVhc2VBc3NldDE1NDM2ODEz", "name": "geckodriver-v0.26.0-macos.tar.gz", "label": null, "uploader": { "login": "andreastt", "id": 399120, "node_id": "MDQ6VXNlcjM5OTEyMA==", "avatar_url": "https://avatars3.githubusercontent.com/u/399120?v=4", "gravatar_id": "", "url": "https://api.github.com/users/andreastt", "html_url": "https://github.com/andreastt", "followers_url": "https://api.github.com/users/andreastt/followers", "following_url": "https://api.github.com/users/andreastt/following{/other_user}", "gists_url": "https://api.github.com/users/andreastt/gists{/gist_id}", "starred_url": "https://api.github.com/users/andreastt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/andreastt/subscriptions", "organizations_url": "https://api.github.com/users/andreastt/orgs", "repos_url": "https://api.github.com/users/andreastt/repos", "events_url": "https://api.github.com/users/andreastt/events{/privacy}", "received_events_url": "https://api.github.com/users/andreastt/received_events", "type": "User", "site_admin": false }, "content_type": "application/x-gzip", "state": "uploaded", "size": 2006880, "download_count": 979175, "created_at": "2019-10-11T23:33:42Z", "updated_at": "2019-10-11T23:33:50Z", "browser_download_url": "https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-macos.tar.gz" }, { "url": "https://api.github.com/repos/mozilla/geckodriver/releases/assets/15436812", "id": 15436812, "node_id": "MDEyOlJlbGVhc2VBc3NldDE1NDM2ODEy", "name": "geckodriver-v0.26.0-win32.zip", "label": null, "uploader": { "login": "andreastt", "id": 399120, "node_id": "MDQ6VXNlcjM5OTEyMA==", "avatar_url": "https://avatars3.githubusercontent.com/u/399120?v=4", "gravatar_id": "", "url": "https://api.github.com/users/andreastt", "html_url": "https://github.com/andreastt", "followers_url": "https://api.github.com/users/andreastt/followers", "following_url": "https://api.github.com/users/andreastt/following{/other_user}", "gists_url": "https://api.github.com/users/andreastt/gists{/gist_id}", "starred_url": "https://api.github.com/users/andreastt/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/andreastt/subscriptions", "organizations_url": "https://api.github.com/users/andreastt/orgs", "repos_url": "https://api.github.com/users/andreastt/repos", "events_url": "https://api.github.com/users/andreastt/events{/privacy}", "received_events_url": "https://api.github.com/users/andreastt/received_events", "type": "User", "site_admin": false }, "content_type": "application/zip", "state": "uploaded", "size": 1435317, "download_count": 199601, "created_at": "2019-10-11T23:33:42Z", "updated_at": "2019-10-11T23:33:49Z", "browser_download_url": "https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-win32.zip" }, { "url": "https://api.github.com/repos/mozilla/geckodriver/releases/assets/15440712", "id": 15440712, "node_id": "MDEyOlJlbGVhc2VBc3NldDE1NDQwNzEy", "name": "geckodriver-v0.26.0-win64.zip", "label": null, "uploader": { "login": "whimboo", "id": 129603, "node_id": "MDQ6VXNlcjEyOTYwMw==", "avatar_url": "https://avatars2.githubusercontent.com/u/129603?v=4", "gravatar_id": "", "url": "https://api.github.com/users/whimboo", "html_url": "https://github.com/whimboo", "followers_url": "https://api.github.com/users/whimboo/followers", "following_url": "https://api.github.com/users/whimboo/following{/other_user}", "gists_url": "https://api.github.com/users/whimboo/gists{/gist_id}", "starred_url": "https://api.github.com/users/whimboo/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/whimboo/subscriptions", "organizations_url": "https://api.github.com/users/whimboo/orgs", "repos_url": "https://api.github.com/users/whimboo/repos", "events_url": "https://api.github.com/users/whimboo/events{/privacy}", "received_events_url": "https://api.github.com/users/whimboo/received_events", "type": "User", "site_admin": false }, "content_type": "application/zip", "state": "uploaded", "size": 1532274, "download_count": 6904246, "created_at": "2019-10-12T09:13:48Z", "updated_at": "2019-10-12T09:20:06Z", "browser_download_url": "https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-win64.zip" } ], "tarball_url": "https://api.github.com/repos/mozilla/geckodriver/tarball/v0.26.0", "zipball_url": "https://api.github.com/repos/mozilla/geckodriver/zipball/v0.26.0", "body": "Built from e9783a644016.\r\n\r\nNote that with this release the minimum recommended Firefox version\r\nhas changed to Firefox ≥60.\r\n\r\n### Known problems\r\n\r\n- macOS 10.15 (Catalina):\r\n\r\n Due to the recent requirement from Apple that all programs must\r\n be notarized, geckodriver will not work on Catalina if you manually\r\n download it through another notarized program, such as Firefox.\r\n\r\n Whilst we are working on a repackaging fix for this problem, you\r\n can find more details on how to work around this issue in the\r\n [macOS notarization] section of the documentation.\r\n\r\n- Windows:\r\n\r\n You must still have the [Microsoft Visual Studio redistributable\r\n runtime] installed on your system for the binary to run. This\r\n is a known bug which we weren't able fix for this release.\r\n\r\n### Added\r\n\r\n- Support for Firefox on Android\r\n\r\n Starting with this release geckodriver is able to connect to\r\n Firefox on Android systems, and to control packages based on\r\n [GeckoView].\r\n\r\n Support for Android works by the geckodriver process running on\r\n a host system and Firefox running within either an emulator or\r\n on a physical device connected to the host system. This requires\r\n you to first [enable remote debugging on the Android device].\r\n\r\n The WebDriver client must set the [platformName capability] to\r\n \"android\" and the androidPackage capability within\r\n [moz:firefoxOptions] to the Android package name of the Firefox\r\n application.\r\n\r\n The full list of new capabilities specific to Android, instructions\r\n how to use them, and examples can be found in the [moz:firefoxOptions]\r\n documentation on MDN.\r\n\r\n When the session is created, the platformName capability will\r\n return \"android\" instead of reporting the platform of the host\r\n system.\r\n\r\n### Changed\r\n\r\n- Continued Marionette refactoring changes\r\n\r\n 0.25.0 came with a series of internal changes for how geckodriver\r\n communicates with Firefox over the Marionette protocol. This\r\n release contains the second half of the refactoring work.\r\n\r\n### Fixed\r\n\r\n- Connection attempts to Firefox made more reliable\r\n\r\n geckodriver now waits for the Marionette handshake before assuming\r\n the session has been established. This should improve reliability\r\n in creating new WebDriver sessions.\r\n\r\n- Corrected error codes used during session creation\r\n\r\n When a new session was being configured with invalid input data,\r\n the error codes returned was not always consistent. Attempting\r\n to start a session with a malformed capabilities configuration\r\n will now return the [invalid argument] error consistently.\r\n\r\n\r\n[README]: https://github.com/mozilla/geckodriver/blob/master/README.md\r\n[Browser Toolbox]: https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox\r\n[WebDriver conformance]: https://wpt.fyi/results/webdriver/tests?label=experimental\r\n[`moz:firefoxOptions]: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions\r\n[Microsoft Visual Studio redistributable runtime]: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads\r\n[GeckoView]: https://wiki.mozilla.org/Mobile/GeckoView\r\n[Firefox Preview]: https://play.google.com/store/apps/details?id=org.mozilla.fenix\r\n[Firefox Reality]: https://play.google.com/store/apps/details?id=org.mozilla.vrbrowser\r\n[Capabilities]: https://firefox-source-docs.mozilla.org/testing/geckodriver/Capabilities.html\r\n[enable remote debugging on the Android device]: https://developers.google.com/web/tools/chrome-devtools/remote-debugging\r\n[macOS notarization]: https://firefox-source-docs.mozilla.org/testing/geckodriver/Notarization.html\r\n\r\n[CloseWindowResponse]: https://docs.rs/webdriver/newest/webdriver/response/struct.CloseWindowResponse.html\r\n[CookieResponse]: https://docs.rs/webdriver/newest/webdriver/response/struct.CookieResponse.html\r\n[DeleteSession]: https://docs.rs/webdriver/newest/webdriver/command/enum.WebDriverCommand.html#variant.DeleteSession\r\n[ElementClickIntercepted]: https://docs.rs/webdriver/newest/webdriver/error/enum.ErrorStatus.html#variant.ElementClickIntercepted\r\n[ElementNotInteractable]: https://docs.rs/webdriver/newest/webdriver/error/enum.ErrorStatus.html#variant.ElementNotInteractable\r\n[FullscreenWindow]: https://docs.rs/webdriver/newest/webdriver/command/enum.WebDriverCommand.html#variant.FullscreenWindow\r\n[GetNamedCookie]: https://docs.rs/webdriver/newest/webdriver/command/enum.WebDriverCommand.html#variant.GetNamedCookie\r\n[GetWindowRect]: https://docs.rs/webdriver/newest/webdriver/command/enum.WebDriverCommand.html#variant.GetWindowRect\r\n[InvalidCoordinates]: https://docs.rs/webdriver/newest/webdriver/error/enum.ErrorStatus.html#variant.InvalidCoordinates\r\n[MaximizeWindow]: https://docs.rs/webdriver/newest/webdriver/command/enum.WebDriverCommand.html#variant.MaximizeWindow\r\n[MinimizeWindow]: https://docs.rs/webdriver/newest/webdriver/command/enum.WebDriverCommand.html#variant.MinimizeWindow\r\n[NewSession]: https://docs.rs/webdriver/newest/webdriver/command/enum.WebDriverCommand.html#variant.NewSession\r\n[NoSuchCookie]: https://docs.rs/webdriver/newest/webdriver/error/enum.ErrorStatus.html#variant.NoSuchCookie\r\n[RectResponse]: https://docs.rs/webdriver/0.27.0/webdriver/response/struct.RectResponse.html\r\n[SendKeysParameters]: https://docs.rs/webdriver/newest/webdriver/command/struct.SendKeysParameters.html\r\n[SessionNotCreated]: https://docs.rs/webdriver/newest/webdriver/error/enum.ErrorStatus.html#variant.SessionNotCreated\r\n[SetTimeouts]: https://docs.rs/webdriver/newest/webdriver/command/enum.WebDriverCommand.html#variant.SetTimeouts\r\n[SetWindowRect]: https://docs.rs/webdriver/newest/webdriver/command/enum.WebDriverCommand.html#variant.SetWindowRect\r\n[StaleElementReference]: https://docs.rs/webdriver/newest/webdriver/error/enum.ErrorStatus.html#variant.StaleElementReference\r\n[UnableToCaptureScreen]: https://docs.rs/webdriver/newest/webdriver/error/enum.ErrorStatus.html#variant.UnableToCaptureScreen\r\n[UnknownCommand]: https://docs.rs/webdriver/newest/webdriver/error/enum.ErrorStatus.html#variant.UnknownCommand\r\n[UnknownError]: https://docs.rs/webdriver/newest/webdriver/error/enum.ErrorStatus.html#variant.UnknownError\r\n[WindowRectParameters]: https://docs.rs/webdriver/newest/webdriver/command/struct.WindowRectParameters.html\r\n\r\n[Add Cookie]: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Commands/AddCookie\r\n[invalid argument]: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Errors/InvalidArgument\r\n[invalid session id]: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Errors/InvalidSessionID\r\n[script timeout]: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Errors/ScriptTimeout\r\n[timeout]: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Errors/Timeout\r\n[timeout object]: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Timeouts\r\n[platformName` capability]: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities#platformName\r\n\r\n[hyper]: https://hyper.rs/\r\n[mozrunner crate]: https://crates.io/crates/mozrunner\r\n[serde]: https://serde.rs/\r\n[webdriver crate]: https://crates.io/crates/webdriver\r\n\r\n[Actions]: https://w3c.github.io/webdriver/webdriver-spec.html#actions\r\n[Delete Session]: https://w3c.github.io/webdriver/webdriver-spec.html#delete-session\r\n[Element Click]: https://w3c.github.io/webdriver/webdriver-spec.html#element-click\r\n[Get Timeouts]: https://w3c.github.io/webdriver/webdriver-spec.html#get-timeouts\r\n[Get Window Rect]: https://w3c.github.io/webdriver/webdriver-spec.html#get-window-rect\r\n[insecure certificate]: https://w3c.github.io/webdriver/webdriver-spec.html#dfn-insecure-certificate\r\n[Minimize Window]: https://w3c.github.io/webdriver/webdriver-spec.html#minimize-window\r\n[New Session]: https://w3c.github.io/webdriver/webdriver-spec.html#new-session\r\n[New Window]: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Commands/New_Window\r\n[Send Alert Text]: https://w3c.github.io/webdriver/webdriver-spec.html#send-alert-text\r\n[Set Timeouts]: https://w3c.github.io/webdriver/webdriver-spec.html#set-timeouts\r\n[Set Window Rect]: https://w3c.github.io/webdriver/webdriver-spec.html#set-window-rect\r\n[Status]: https://w3c.github.io/webdriver/webdriver-spec.html#status\r\n[Take Element Screenshot]: https://w3c.github.io/webdriver/webdriver-spec.html#take-element-screenshot\r\n[WebDriver errors]: https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors\r\n\r\n[Bastien Orivel]: https://github.com/Eijebong\r\n[Jason Juang]: https://github.com/juangj\r\n[Jeremy Lempereur]: https://github.com/o0Ignition0o\r\n[Joshua Bruning]: https://github.com/joshbruning\r\n[Kalpesh Krishna]: https://github.com/martiansideofthemoon\r\n[Kriti Singh]: https://github.com/kritisingh1\r\n[Mike Pennisi]: https://github.com/jugglinmike\r\n[Nupur Baghel]: https://github.com/nupurbaghel\r\n[Shivam Singhal]: https://github.com/championshuttler\r\n[Sven Jost]: https://github/mythsunwind\r\n[Vlad Filippov]: https://github.com/vladikoff" }

mikeliucc commented 4 years ago

that looked good.

@jwetter can you please verify if you are still getting this error? I can't replicate this on at least 3 of my machines here. Thanks!

jwetter commented 4 years ago

Still seeing invalid token error with latest version [3.0.0758]

2020-03-02 14:37:18,007|I|Thread-8|init chrome 2020-03-02 14:37:22,360|I|Thread-8|browser initialization completed for 'chrome' 2020-03-02 14:37:22,376|I|Thread-8|setting browser page load timeout to 10000 ms 2020-03-02 14:37:24,546|I|Thread-8|current browser window handle:CDwindow-A6C7ADD7E3F3F71368542CF763435153 2020-03-02 14:37:24,591|I|Thread-8|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200302_143436.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Executing request GET http://api.userstack.com/detect?access_key=30dcc7900c443a279315170afe815bd4&ua=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F80.0.3987.122+Safari%2F537.36 HTTP/1.1 2020-03-02 14:37:24,701|I|Thread-8|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200302_143436.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Saving response payload as raw bytes 2020-03-02 14:37:24,714|I|Thread-8|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200302_143436.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Executed request GET http://api.userstack.com/detect?access_key=30dcc7900c443a279315170afe815bd4&ua=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F80.0.3987.122+Safari%2F537.36 HTTP/1.1: HTTP/1.1 200 OK 2020-03-02 14:37:24,724|I|Thread-8|Error when invoking UserStack: {"code":101,"type":"invalid_access_token"}

Entering URL directly into Chrome: URL Used: http://api.userstack.com/detect?access_key=30dcc7900c443a279315170afe815bd4&ua=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F80.0.3987.122+Safari%2F537.36

Response: {"ua":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/80.0.3987.122 Safari\/537.36","type":"browser","brand":null,"name":null,"url":"https:\/\/about.google\/","os":{"name":"Windows 10","code":"windows_10","url":"https:\/\/en.wikipedia.org\/wiki\/Windows_10","family":"Windows","family_code":"windows","family_vendor":"Microsoft Corporation.","icon":"https:\/\/assets.userstack.com\/icon\/os\/windows10.png","icon_large":"https:\/\/assets.userstack.com\/icon\/os\/windows10_big.png"},"device":{"is_mobile_device":false,"type":"desktop","brand":null,"brand_code":null,"brand_url":null,"name":null},"browser":{"name":"Chrome","version":"80.0.3987.122","version_major":"80","engine":"WebKit\/Blink"},"crawler":{"is_crawler":false,"category":null,"last_seen":null}}

jwetter commented 4 years ago

Additional details in _A1180.Log file:

Nexial Version: nexial-core dev_0758 Current Timestamp: 2020-03-02 14:37:24.981 Test Step: [simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200302_143436.001.xlsx][SF_HTML-createProjectFromPSO][Go into SalesForce UI and generate Project from PSO][ROW 1180][web][open(url)]

Unable to integrate with UserStack. Check previous logs for details

mikeliucc commented 4 years ago

This is indeed puzzling... Based on your log file, clearly the access token is present and valid. Your previous comment also showed that you were, in fact, to execute the GET request directly.

Still scratching my head...

Looking the code, it is possible that the execution still proceed even if you are getting this error. Can you please confirm is this is the case?

Also, there is another/different issue initially reported (... - FAIL Error initializing browser 'firefox': Error when accessing https://api.github.com/repos/mozilla/geckodriver/releases/latest: Unauthorized...). Can you please confirm this error (which was an error on mozilla's side) is no longer an issue for you?

Thanks!

jwetter commented 4 years ago

Still getting the firefox error "Error initializing browser 'firefox': Error when accessing https://api.github.com/repos/mozilla/geckodriver/releases/latest: Unauthorized"

07:49:41.789|init firefox 07:49:41.805|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200303_074645.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Executing request GET https://api.github.com/repos/mozilla/geckodriver/releases/latest HTTP/1.1 07:49:42.275|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200303_074645.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Saving response payload as raw bytes 07:49:42.275|simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200303_074645.001|SF_HTML-createProjectFromPSO|Go into SalesForce UI and generate Project from PSO|#1180|web.open(url) - Executed request GET https://api.github.com/repos/mozilla/geckodriver/releases/latest HTTP/1.1: HTTP/1.1 401 Unauthorized 07:49:42.275 >> Error initializing browser 'firefox': Error when accessing https://api.github.com/repos/mozilla/geckodriver/releases/latest: Unauthorized

_A1180 log contains the following: Nexial Version: nexial-core dev_0758 Current Timestamp: 2020-03-03 07:49:42.275 Test Step: [simplifyOnboardingAPI-SfProjectFromPSO.004,simplifyOnboarding.20200303_074645.001.xlsx][SF_HTML-createProjectFromPSO][Go into SalesForce UI and generate Project from PSO][ROW 1180][web][open(url)]

java.lang.RuntimeException: Error initializing browser 'firefox': Error when accessing https://api.github.com/repos/mozilla/geckodriver/releases/latest: Unauthorized at org.nexial.core.plugins.web.Browser.init(Browser.java:378) at org.nexial.core.plugins.web.Browser.ensureWebDriverReady(Browser.java:289) at org.nexial.core.model.PluginManager.initBrowser(PluginManager.java:140) at org.nexial.core.model.PluginManager.getPlugin(PluginManager.java:118) at org.nexial.core.model.ExecutionContext.findPlugin(ExecutionContext.java:387) at org.nexial.core.model.TestStep.invokeCommand(TestStep.java:349) at org.nexial.core.model.TestStep.execute(TestStep.java:175) at org.nexial.core.model.TestCase.execute(TestCase.java:94) at org.nexial.core.model.TestScenario.execute(TestScenario.java:129) at org.nexial.core.model.ExecutionContext.execute(ExecutionContext.java:1235) at org.nexial.core.ExecutionThread.run(ExecutionThread.java:182) Caused by: java.io.IOException: Error when accessing https://api.github.com/repos/mozilla/geckodriver/releases/latest: Unauthorized at org.nexial.core.plugins.web.WebDriverHelper.resolveDriverManifest(WebDriverHelper.kt:159) at org.nexial.core.plugins.web.WebDriverHelper.downloadDriver(WebDriverHelper.kt:79) at org.nexial.core.plugins.web.WebDriverHelper.resolveDriver(WebDriverHelper.kt:68) at org.nexial.core.plugins.web.Browser.initFirefox(Browser.java:702) at org.nexial.core.plugins.web.Browser.init(Browser.java:363) ... 10 more

jwetter commented 4 years ago

Only other details that I could think that may have an impact is that the login portion of the test that is calling the open(url) command is in a macro.

jwetter commented 4 years ago

Should be noted, that in setting up a brand new test using open(url) directly in the script appears to work without issue and moving those command steps into the new macro is also working. Will attempt to update the macro or move code to latest template macro file to see if that resolves it.

mikeliucc commented 4 years ago

Using macro should be fine. I've seen many cases of such with no issue thus far.

I'd like you to try the following if you can spare some time. Thank you in advance!

TEST 1

  1. Please verify that you can access https://api.github.com/repos/mozilla/geckodriver/releases/latest directly via your browser.
  2. Please make sure you have the latest Nexial build (I think it's Build #760 now)
  3. Make sure there isn't any geckodriver process running on your system (check task manager)
  4. Remove %HOMEPATH%\.nexial\firefox directory (%HOMEPATH should point to your HOME directory)
  5. Make sure you don't have any of the following environment variables: GITHUB_PATH, GITHUB_VERSION
  6. Try running your script with firefox. Nexial will attempt to download firefox automatically.

TEST 2 If the above doesn't work, please try the same step BUT FROM YOUR INTERNET AT HOME and WITHOUT LOGGING INTO COMPANY VPN. I know you might not be able to run your script successfully since your script might be pointing to corporate resources. That's ok; we are just trying to establish if there might be some sort of corporate SSL overrides or network policy that might prevent you from downloading firefox webdriver on github.

TEST 3 If neither of the tests above works, please check to see if you have a .config\hub file in your HOME directory. If so, please temporarily move it elsewhere. Also, please check if you have a .ssh directory under your HOME directory. If so, please also temporarily move it elsewhere. Then rerun the TEST 1. After your test, you may move these directories back.


Separately, can you please try with the latest Nexial build on Chrome? Your execution should not be blocked by any "userstack api" errors now. We've updated the code to proceed with execution even if the userstack api can't be successfully invoked. Would you please verify this?

Thank you so much!

jwetter commented 4 years ago

Been able to finally focus on this issue, issue was being caused by ws command which required setting Authorization header in order to generate a record for a service prior to using web to go into the webpage of that service to interact with that record. Solution was setting that Authorization header to empty. This test had been ran since October and was previously not an issue.

Should this be considered a bug at this point? Or should this be called out in the documentation that header settings in ws will also carry over to web commands?

mikeliucc commented 4 years ago

What were the ws and web commands you were using? AFAIK the ws and web commands don't really have dependencies to each other. I'd gladly close this issue, but I'm still curious.

... ah, I got it. The underlying webdriver "downloader" is using some of the same code as ws hence the issue.

OK, good catch. Gimme an hour or so. I'll have this fix up. Thanks!!

mikeliucc commented 4 years ago

OK @jwetter. New Nexial build is ready now. Please give nexial-core-v3.0_0765 a try. You should not need to set Authorization header to empty or any "special handling". This new build should handle this condition internally. Please let us know how it goes. Thanks!

mikeliucc commented 4 years ago

Issue closed due to lack of feedback/response from reporter.

jwetter commented 4 years ago

Issue closed due to lack of feedback/response from reporter.

Sorry, issue is resolved.