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

Support for WDIO cli @ 9 #97

Open
badman-rodriguez opened this issue Nov 11, 2024 · 4 comments
Open

Support for WDIO cli @ 9 #97

badman-rodriguez opened this issue Nov 11, 2024 · 4 comments

Comments

@badman-rodriguez
Copy link

As soon as I upgraded to v9, I started getting this error:

[0-1] 2024-11-11T21:47:03.636Z ERROR @wdio/utils:shim: SyntaxError: Invalid left-hand side in assignment
[0-1]     at new Function (<anonymous>)
[0-1]     at Browser.execute (/app/node_modules/webdriverio/build/index.js:3079:53)
[0-1]     at Browser.wrapCommandFn (/app/node_modules/@wdio/utils/build/index.js:884:23)
[0-1]     at LambdaRestService._executeCommand (/app/node_modules/wdio-lambdatest-service/src/service.js:429:12)
[0-1]     at LambdaRestService._setSessionName (/app/node_modules/wdio-lambdatest-service/src/service.js:416:5)
[0-1]     at LambdaRestService.setSessionName (/app/node_modules/wdio-lambdatest-service/src/service.js:394:7)
[0-1]     at LambdaRestService.beforeSuite (/app/node_modules/wdio-lambdatest-service/src/service.js:103:7)
[0-1]     at async Promise.all (index 0)
[0-1]     at executeHooksWithArgs (/app/node_modules/@wdio/utils/build/index.js:867:18)

Im curious if this is a user error or more of something that requires support for v9.

@anvgornyy
Copy link

I reckon wdio-lambdatest-service doesn't support v9. Just updated from 8.40.6 to v9 and it crashed on the iOS real device. Guess lambdatest needs to update the packages.

@harsha509
Copy link
Member

Hi @badman-rodriguez,

Thanks for reporting the issue! I tried testing it on real devices with WDIO 9, but I wasn’t able to reproduce it on my end.

We've also updated the wdio-lambdatest-service to support WDIO 9 in version 3.0.1. Could you try updating and see if that fixes the problem? If the issue still happens, could you please share an example that reproduces it so we can investigate further?

Thanks,
Sri

@harrydevane
Copy link

We are also seeing this on WDIO v9

[0-0] 2024-11-15T18:19:47.748Z ERROR @wdio/utils:shim: SyntaxError: Invalid left-hand side in assignment
[0-0]     at new Function (<anonymous>)
[0-0]     at Browser.execute (file:///C:/Users/hdevane/Workspace/energy-pathfinder-supply-chain-interface/node_modules/webdriverio/build/index.js:3082:53)
[0-0]     at Browser.wrapCommandFn (file:///C:/Users/hdevane/Workspace/energy-pathfinder-supply-chain-interface/node_modules/@wdio/utils/build/index.js:884:23)
[0-0]     at LambdaRestService._executeCommand (C:\Users\hdevane\Workspace\energy-pathfinder-supply-chain-interface\node_modules\wdio-lambdatest-service\src\service.js:429:12)
[0-0]     at LambdaRestService._setSessionName (C:\Users\hdevane\Workspace\energy-pathfinder-supply-chain-interface\node_modules\wdio-lambdatest-service\src\service.js:416:5)
[0-0]     at LambdaRestService.setSessionName (C:\Users\hdevane\Workspace\energy-pathfinder-supply-chain-interface\node_modules\wdio-lambdatest-service\src\service.js:394:7)
[0-0]     at LambdaRestService.beforeSuite (C:\Users\hdevane\Workspace\energy-pathfinder-supply-chain-interface\node_modules\wdio-lambdatest-service\src\service.js:103:7)
[0-0]     at async Promise.all (index 0)
[0-0]     at executeHooksWithArgs (file:///C:/Users/hdevane/Workspace/energy-pathfinder-supply-chain-interface/node_modules/@wdio/utils/build/index.js:867:18)

node_modules/webdriverio/build/index.js:3082 is the following: const userScript = typeof script === "string" ? new Function(script) : script;

script is lambda-name=Projects page, so it's trying to call new Function('lambda-name=Projects page') which causes the error

@harrydevane
Copy link

This has been solved by #99

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

No branches or pull requests

4 participants