aerokube / selenoid-ui

Graphical user interface for Selenoid project
https://aerokube.com/selenoid-ui/latest/
Apache License 2.0
305 stars 76 forks source link

PlatformName is required for MicrosoftEdge #477

Closed maveric-systems closed 7 months ago

maveric-systems commented 2 years ago

During the Automation run, Edge browser crashes. All other browsers are working fine like Chrome, Firefox, etc. Note: Manual creation of Edge session is working fine, only issue during Automation run

Edge version using: 99.0 & 89.0

Framework property file: (Note: Below config works for all other Browsers)

driver.name=edgeRemoteDriver
remote.server=https://11.0.0.1:4444/wd/hub
chrome.capabilities.browserName=MicrosoftEdge
chrome.capabilities.browserVersion=99.0
chrome.capabilities.name=Test Pack 45
driver.additional.capabilities={'selenoid:options':{'sessionTimeout':'1m', 'enableVNC':true,'enableLog':true,'enableVideo':true,'videoName': '624cedf095e42647c24c05ef-Web - testpack.mp4','logName': '624cedf095e42647c24c05ef-Web - testpack.log'}}

Docker Logs:

2022/04/08 18:40:03 [-] [NEW_REQUEST] [unknown] [14.142.158.178]
2022/04/08 18:40:03 [-] [NEW_REQUEST_ACCEPTED] [unknown] [14.142.158.178]
2022/04/08 18:40:03 [45256] [LOCATING_SERVICE] [MicrosoftEdge] [99.0]
2022/04/08 18:40:03 [45256] [USING_DOCKER] [MicrosoftEdge] [99.0]
2022/04/08 18:40:03 [45256] [CREATING_CONTAINER] [browsers/edge:99.0]
2022/04/08 18:40:03 [45256] [STARTING_CONTAINER] [browsers/edge:99.0] [34af6a47073d1f344cda1c01af00892daf31ef4cecf16ae3dce11d5c9658843f]
2022/04/08 18:40:04 [45256] [CONTAINER_STARTED] [browsers/edge:99.0] [34af6a47073d1f344cda1c01af00892daf31ef4cecf16ae3dce11d5c9658843f] [0.84s]
2022/04/08 18:40:04 [45256] [SERVICE_STARTED] [browsers/edge:99.0] [34af6a47073d1f344cda1c01af00892daf31ef4cecf16ae3dce11d5c9658843f] [0.61s]
2022/04/08 18:40:04 [45256] [PROXY_TO] [34af6a47073d1f344cda1c01af00892daf31ef4cecf16ae3dce11d5c9658843f] [http://172.18.0.4:4444/]
2022/04/08 18:40:04 [45256] [SESSION_ATTEMPTED] [http://172.18.0.4:4444/] [1]
2022/04/08 18:40:04 [45256] [SESSION_FAILED] [http://172.18.0.4:4444/] [500 Internal Server Error]
2022/04/08 18:40:04 [45256] [REMOVING_CONTAINER] [34af6a47073d1f344cda1c01af00892daf31ef4cecf16ae3dce11d5c9658843f]
2022/04/08 18:40:05 [45256] [CONTAINER_REMOVED] [34af6a47073d1f344cda1c01af00892daf31ef4cecf16ae3dce11d5c9658843f]
2022/04/08 18:41:49 [-] [NEW_REQUEST] [unknown] [49.249.248.170]
2022/04/08 18:41:49 [-] [NEW_REQUEST_ACCEPTED] [unknown] [49.249.248.170]
2022/04/08 18:41:49 [45279] [LOCATING_SERVICE] [MicrosoftEdge] [99.0]
2022/04/08 18:41:49 [45279] [USING_DOCKER] [MicrosoftEdge] [99.0]
2022/04/08 18:41:49 [45279] [CREATING_CONTAINER] [browsers/edge:99.0]
2022/04/08 18:41:50 [45279] [STARTING_CONTAINER] [browsers/edge:99.0] [adef5007808a54e399e318c89dbecf8937e3500542ba9584ce939fe9402be92b]
2022/04/08 18:41:50 [45279] [CONTAINER_STARTED] [browsers/edge:99.0] [adef5007808a54e399e318c89dbecf8937e3500542ba9584ce939fe9402be92b] [0.52s]
2022/04/08 18:41:51 [45279] [SERVICE_STARTED] [browsers/edge:99.0] [adef5007808a54e399e318c89dbecf8937e3500542ba9584ce939fe9402be92b] [0.56s]
2022/04/08 18:41:51 [45279] [PROXY_TO] [adef5007808a54e399e318c89dbecf8937e3500542ba9584ce939fe9402be92b] [http://172.18.0.4:4444/]
2022/04/08 18:41:51 [45279] [SESSION_ATTEMPTED] [http://172.18.0.4:4444/] [1]
2022/04/08 18:41:51 [45279] [SESSION_FAILED] [http://172.18.0.4:4444/] [500 Internal Server Error]
2022/04/08 18:41:51 [45279] [REMOVING_CONTAINER] [adef5007808a54e399e318c89dbecf8937e3500542ba9584ce939fe9402be92b]
2022/04/08 18:41:51 [45279] [CONTAINER_REMOVED] [adef5007808a54e399e318c89dbecf8937e3500542ba9584ce939fe9402be92b]

Browser.json Config

{
   "MicrosoftEdge": {
        "default": "99.0",
        "versions": {
            "99.0": {
                "image": "browsers/edge:99.0",
                "port": "4444",
                "path": "/"
            },
            "89.0": {
                "image": "browsers/edge:89.0",
                "port": "4444",
                "path": "/"
            }
        }
   },
   "chrome": {
        "default": "96.0",
        "versions": {
            "95.0": {
                "image": "selenoid/vnc_chrome:95.0",
                "port": "4444",
                "path": "/"
            },
            "96.0": {
                "image": "selenoid/vnc_chrome:96.0",
                "port": "4444",
                "path": "/"
            }
        }
    },
"firefox": {
        "default": "94.0",
        "versions": {
            "93.0": {
                "image": "selenoid/vnc_firefox:93.0",
                "port": "4444",
                "path": "/wd/hub"
            },
            "94.0": {
                "image": "selenoid/vnc_firefox:94.0",
                "port": "4444",
                "path": "/wd/hub"
            }
        }
    },
    "opera": {
        "default": "81.0",
        "versions": {
            "80.0": {
                "image": "selenoid/vnc_opera:80.0",
                "port": "4444",
                "path": "/"
            },
            "81.0": {
                "image": "selenoid/vnc_opera:81.0",
                "port": "4444",
                "path": "/"
            }
        }
    }
}

Automation Log:

Unable to create driver instance in 1st attempt with retry timeout of 0 seconds. You can check/set value of 'driver.init.retry.timeout' appropriately to set retry timeout on driver initialization failure.Unable to Create Driver Instance session not created: No matching capabilities found
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'MAVLT1059', ip: 'fd01:0:0:0:6084:5bd3:5429:17f0%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.5', java.version: '1.8.0_212'
Driver info: driver.version: QAFExtendedWebDriver
remote stacktrace: #0 0x55f3521ae6f3 <unknown>
aerokube/selenoid#1 0x55f351ecbf93 <unknown>
aerokube/selenoid#2 0x55f351f270ac <unknown>
aerokube/selenoid#3 0x55f351f26347 <unknown>
aerokube/selenoid#4 0x55f351f27c1b <unknown>
aerokube/selenoid#5 0x55f351f22353 <unknown>
aerokube/selenoid#6 0x55f351ef8e31 <unknown>
aerokube/selenoid#7 0x55f351ef9ff5 <unknown>
aerokube/selenoid#8 0x55f3521d7d97 <unknown>
aerokube/selenoid#9 0x55f3521e8bad <unknown>
aerokube/selenoid#10 0x55f3521e8929 <unknown>
aerokube/selenoid#11 0x55f3521e9052 <unknown>
aerokube/selenoid#12 0x55f3521d928b <unknown>
aerokube/selenoid#13 0x55f3521e9345 <unknown>
aerokube/selenoid#14 0x55f3521cf295 <unknown>
aerokube/selenoid#15 0x55f352200c18 <unknown>
aerokube/selenoid#16 0x55f352200dc8 <unknown>
aerokube/selenoid#17 0x55f35221a51e <unknown>
aerokube/selenoid#18 0x7f7697f55609 <unknown>

msg >>Timed out after 0 seconds: Unable to create driver instance in 1st attempt with retry timeout of 0 seconds. You can check/set value of 'driver.init.retry.timeout' appropriately to set retry timeout on driver initialization failure.
vania-pooh commented 2 years ago

@maveric-systems it's not crashing. You are passing wrong capabilities.

 No matching capabilities found
maveric-systems commented 2 years ago

@maveric-systems it's not crashing. You are passing wrong capabilities.

 No matching capabilities found

Thanks for your reply. Any help in identifying the issue will be appreciated... Edge browser is getting initiated, but the session is not getting established. Never had issue with other browser images.

Below config works for Chrome / Firefox for past 2 yrs: (Using Qmetry framework with TestNg)

driver.name=chromeRemoteDriver
remote.server=https://11.0.0.1:4444/wd/hub
chrome.capabilities.browserName=chrome
chrome.capabilities.browserVersion=96.0
chrome.capabilities.name=Test Pack 45 for Chrome
driver.additional.capabilities={'selenoid:options':{'sessionTimeout':'1m', 'enableVNC':true,'enableLog':true,'enableVideo':true,'videoName': '624cedf095e42647c24c05ef-Web - testpack.mp4','logName': '624cedf095e42647c24c05ef-Web - testpack.log'}}

Below config not working for Edge

driver.name=edgeRemoteDriver
remote.server=https://11.0.0.1:4444/wd/hub
chrome.capabilities.browserName=MicrosoftEdge
chrome.capabilities.browserVersion=99.0
chrome.capabilities.name=Test Pack 45
driver.additional.capabilities={'selenoid:options':{'sessionTimeout':'1m', 'enableVNC':true,'enableLog':true,'enableVideo':true,'videoName': '624cedf095e42647c24c05ef-Web - testpack.mp4','logName': '624cedf095e42647c24c05ef-Web - testpack.log'}}
vania-pooh commented 2 years ago

@maveric-systems name capability should also live under selenoid:options as it is Selenoid specific.

maveric-systems commented 2 years ago

I have identified the issue at last... "platformName" is mandatory for the Edge browser. It is not required for chrome, firefox, etc. As mentioned by @vania-pooh "name" can be outside or inside Selenoid Options.. Both are getting accepted.

// Is mandatory

edge.capabilities.platformName=ANY 

BUG: Except for Curl, the Capabilities generator in Selenoid console is not mentioning platformName for Yaml, Java, C#, etc. Please fix the generator.

Thanks @vania-pooh for the prompt help you have provided. It made me to dig more into config. Please help how to create the bug.

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.