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

RATEST-347: Allow remote connections to Chrome from any origin #481

Closed
wants to merge 1 commit into from

Conversation

Muta-Jonathan
Copy link
Contributor

Summary

For some OS.... While Running e2e tests ..this is thrown https://pastebin.com/L8QbmwB6

Worked On Issue

👓 https://issues.openmrs.org/browse/RATEST-347

cc @sherrif10 @jayasanka-sack @Piumal1999 @kdaud

@@ -267,6 +267,7 @@ WebDriver setupChromeDriver() {
System.setProperty(ChromeDriverService.CHROME_DRIVER_LOG_PROPERTY,
chromedriverFilesDir + "/chromedriver-" + getClass().getSimpleName() + ".log");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--remote-allow-origins=*");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me . Thanks @Muta-Jonathan cc @dkayiwa

@kdaud
Copy link
Member

kdaud commented May 9, 2023

@Muta-Jonathan, how can the issue be reproduced?

@Muta-Jonathan
Copy link
Contributor Author

@Muta-Jonathan, how can the issue be reproduced?

Basically have tried it on my pc running on Ubuntu_20.04

@kdaud
Copy link
Member

kdaud commented May 9, 2023

Does it happen on a specific test?

@Muta-Jonathan
Copy link
Contributor Author

Does it happen on a specific test?

not really @kdaud - here is a video to show the error


Screencast.from.09-05-23.22-46-53.mp4

@kdaud
Copy link
Member

kdaud commented May 9, 2023

Which server are you using to run the test?

@Muta-Jonathan
Copy link
Contributor Author

Which server are you using to run the test?

tried both QA server and Local server

@kdaud
Copy link
Member

kdaud commented May 10, 2023

Are you able to reproduce the issue on any of the tests via github actions?

@Muta-Jonathan
Copy link
Contributor Author

Muta-Jonathan commented May 10, 2023

Are you able to reproduce the issue on any of the tests via github actions?

not really @kdaud but according to this address it shows that this error basically happens due to denial of local permission access

take a look here 403 Forbidden Error

Typically, ChromeOptions used for a headless run. However, the new chrome version 111 is not compatible with the latest Selenium version even for 4.8, so for the time being this is an alternative solution.


And in this i think for github actions they have the access

@kdaud
Copy link
Member

kdaud commented May 10, 2023

Are all the tests failing locally with chrome?

@Muta-Jonathan
Copy link
Contributor Author

Are all the tests failing locally with chrome?

yes @kdaud all fail locally

@kdaud
Copy link
Member

kdaud commented May 12, 2023

What happens when you spin the tests on firefox engine?

@Muta-Jonathan
Copy link
Contributor Author

What happens when you spin the tests on firefox engine?

@kdaud it runs successfully .... without even changes .....because basically this error is caused due to chrome permissions...


Screenshot from 2023-05-12 10-08-58

@kdaud
Copy link
Member

kdaud commented May 12, 2023

Could you share the chrome browser version running on your machine and the chrome driver version installed locally at this directory?

@Muta-Jonathan
Copy link
Contributor Author

Muta-Jonathan commented May 12, 2023

Could you share the chrome browser version running on your machine and the chrome driver version installed locally at this directory?

Am using Chrome Version 112.0.5615.165 (Official Build) (64-bit) and the driver am using i downloaded from here

@kdaud
Copy link
Member

kdaud commented May 12, 2023

The issue is most likely due to incompatibility between the chrome browser and the driver being used to run the tests(..165 vs ..49). Note → The driver's version(..49) is slightly higher than that of the browser thus containing some components which ..165 version can not resolve.

Try to downgrade the chrome driver to v 112.0.5615.28/ or v111.0.5563.64/

@kdaud
Copy link
Member

kdaud commented Oct 25, 2023

@Muta-Jonathan is this PR still relevant?

@Muta-Jonathan
Copy link
Contributor Author

@kdaud I think we havent got any issue regarding this again in a couple of months ......
Maybe @sherrif10 & @dkayiwa what do you think should we close this off or merge it

@dkayiwa
Copy link
Member

dkayiwa commented Oct 26, 2023

If you haven't got any issue, you can close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants