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

Cannot pin tunnel browser to SemVer version #1178

Open
kgibb opened this issue Feb 11, 2021 · 5 comments
Open

Cannot pin tunnel browser to SemVer version #1178

kgibb opened this issue Feb 11, 2021 · 5 comments
Labels
needs-verification Needs to be verified

Comments

@kgibb
Copy link

kgibb commented Feb 11, 2021

Expected behavior

Pin a particular browser version on a remote Selenium grid.

"environments": [
    {
	  "browserName": "chrome",
	  "browserVersion": "87.0.4280.66"
    }
]

Current behavior

Error: Invalid alias syntax "87.0.4280.66"
  at resolveVersionAlias @ src/lib/resolveEnvironments.ts:174:10
  @ src/lib/resolveEnvironments.ts:312:23
  at Array.map @ anonymous
  at resolveVersions @ src/lib/resolveEnvironments.ts:311:42
  @ src/lib/resolveEnvironments.ts:36:27
  at Array.map @ anonymous
  at Object.resolveEnvironments [as default] @ src/lib/resolveEnvironments.ts:35:48
  @ src/lib/executors/Node.ts:858:12
  @ node_modules/@theintern/common/index.js:16:7174

Setting to "87" throws an error on the grid as it is not an exact match.

Possible solution

Remove number validation if it is not necessary for other services.

throw new Error('Invalid alias syntax "' + version + '"');

Intern: 4.8.4

@github-actions github-actions bot added the needs-verification Needs to be verified label Feb 11, 2021
@jason0x43
Copy link
Member

The validator could be updated to accept version strings (x.y.z.w) rather than only simple numbers.

@kgibb
Copy link
Author

kgibb commented Feb 12, 2021

browserVersion is defined as a string identifier in the spec. Is there any value in validating the version considering the varying values supported by drivers/services? e.g. latest, latest-1, 86, 86.0b5, 87.0.4280.66, insider preview....

@jason0x43
Copy link
Member

The validation could be relaxed. The core issue is just that local selenium grids weren't considered when the resolution code was written. Cloud services were the prime driver of the version resolution code, and they all support abbreviated versions (e.g., 87 rather than 87.0.4280.66).

Regarding browserVersion being a string, I'd assume that's because standard version numbers like '87.0.4280.66' have to be represented using strings, not because versions should allow arbitrary strings. I think 'latest' and 'insider preview' are the only atypical version numbers I've seen.

@kgibb
Copy link
Author

kgibb commented Feb 12, 2021

SauceLabs support a latest-n convention, n being the number of releases before the latest version.

@jason0x43
Copy link
Member

Yeah, that's where Intern's 'latest' alias support came from. Intern just lets that version style be applied to other cloud services as well. A similar thing could be done with a selenium grid since Selenium provides an endpoint to retrieve all the available browsers supported by the grid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-verification Needs to be verified
Projects
None yet
Development

No branches or pull requests

2 participants