You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using the Basic Authentication method of wdi5 with usernames or passwords that contain special URL characters like # or @ the program stops with the exception: TypeError: Invalid URL (Stacktrace attached).
To Reproduce
Steps to reproduce the behavior:
Provide credentials with URL special characters in the .envfile
Start wdi5
🧨
Expected behavior
Currently the content of the .env file simply put inside the URL. But instead it should be encoded before used in an URL.
The following snippet in BasicAuthenticator.ts:23 resolves the issue:
Describe the bug
When using the Basic Authentication method of wdi5 with usernames or passwords that contain special URL characters like
#
or@
the program stops with the exception: TypeError: Invalid URL (Stacktrace attached).To Reproduce
Steps to reproduce the behavior:
.env
filewdi5
Expected behavior
Currently the content of the
.env
file simply put inside the URL. But instead it should be encoded before used in an URL.The following snippet in BasicAuthenticator.ts:23 resolves the issue:
Logs/Console Output
[0-0] RUNNING in chrome - file:///C:/development/repositories/.../webapp/test/e2e/ResourceTypeListJourney.test.ts [0-0] 2024-05-17T11:48:43.193Z ERROR @wdio/utils:shim: TypeError: Invalid URL [0-0] at new URL (node:internal/url:775:36) [0-0] at Browser.url (file:///C:/development/repositories/.../node_modules/webdriverio/build/commands/browser/url.js:43:17) [0-0] at Browser.wrapCommandFn (file:///C:/development/repositories/.../node_modules/@wdio/utils/build/shim.js:90:38) [0-0] at processTicksAndRejections (node:internal/process/task_queues:95:5) [0-0] at async BasicAuthenticator.basicAuthLogin (file:///C:/development/repositories/.../node_modules/wdio-ui5-service/src/lib/authentication/BasicAuthenticator.ts:32:6) [0-0] at async BasicAuthenticator.login (file:///C:/development/repositories/.../node_modules/wdio-ui5-service/src/lib/authentication/BasicAuthenticator.ts:15:9) [0-0] at async authenticate (file:///C:/development/repositories/.../node_modules/wdio-ui5-service/src/lib/wdi5-bridge.ts:183:13) [0-0] at async Service.before (file:///C:/development/repositories/.../node_modules/wdio-ui5-service/src/service.ts:47:17) [0-0] at async Promise.all (index 0) [0-0] at async executeHooksWithArgs (file:///C:/development/repositories/.../node_modules/@wdio/utils/build/shim.js:68:20) [0-0] at async Runner.run (file:///C:/development/repositories/.../node_modules/@wdio/runner/build/index.js:99:9)
Runtime Env (please complete the following information):
wdi5/wdio-ui5-service
-version: 2.0.8UI5
version: 1.120.13wdio
-version (output ofwdio --version
): 20.11.0node
-version (output ofnode --version
): [e.g. v17.3.0]The text was updated successfully, but these errors were encountered: