Skip to content
This repository has been archived by the owner on Dec 26, 2019. It is now read-only.

Unable to setup WebdriverAgent #1106

Open
raghumankali opened this issue Apr 18, 2019 · 1 comment
Open

Unable to setup WebdriverAgent #1106

raghumankali opened this issue Apr 18, 2019 · 1 comment

Comments

@raghumankali
Copy link

I installed WDA in ios simulator by following instructions as mentioned in Github. Now not sure what happened but there is a upgrade in Xcode and everything disappeared.
I tried to follow the same procedure but WDA installation failed this time. I dont know what all got changed/ upgraded in my client's machine.
Current system details:
IOS - MACOS MoJave - 10.14.4
XCODE - 10.2
eslint -v : 5.16.0

I am a naive in Automation Testing so I dont know deep details. I just followed the guidelines and google the exact issues encountered for solution.

https://github.com/facebook/WebDriverAgent

with great difficulty & after overcoming multiple issues , successfully installed npm, node, appium.

Step 1
But when I run the command - ./Scripts/bootstrap.sh. Got Error that eslint in not available.

Error log:

npm WARN [email protected] requires a peer of react@^15.6.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.

audited 2594 packages in 9.826s
found 16 vulnerabilities (6 low, 4 moderate, 5 high, 1 critical)
run npm audit fix to fix them, or npm audit for details
Validating Inspector

Oops! Something went wrong! :(

ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:

eslint --init

ESLint looked for configuration files in /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js and its ancestors.

If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://gitter.im/eslint/eslint

Step 2
Now installed eslint, I think the latest version available got installed & tried running command - ./Scripts/bootstrap.sh.
Now got parsing errors from js files in Inspector folder.
____Log starts
Fetching dependencies
Building Inspector
Creating bundle directory...
Fetching Inspector dependencies...
npm WARN [email protected] requires a peer of react@^15.6.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.

audited 2594 packages in 24.682s
found 16 vulnerabilities (6 low, 4 moderate, 5 high, 1 critical)
run npm audit fix to fix them, or npm audit for details
Validating Inspector

/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/app.js
10:1 error Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/gesture_recognizer.js
41:15 error 'ev' is defined but never used no-unused-vars
94:1 error 'module' is not defined no-undef

/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/http.js
10:1 error Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/image_utils.js
50:1 error 'module' is not defined no-undef

/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/inspector.js
10:1 error Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/screen.js
10:1 error Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/screenshot_factory.js
10:1 error Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/tree.js
10:1 error Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/tree_context.js
22:1 error 'module' is not defined no-undef

/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/tree_node.js
67:1 error 'module' is not defined no-undef

✖ 11 problems (11 errors, 0 warnings)

Log ends_______________________
Step 3
Then based on the below url - AtomLinter/linter-eslint#462. I added this "sourceType": "module" to the eslintrc file.

But then I got this error msg - error Parsing error: Unexpected token <

Please help if there is a solution to this problem

@NikolayKulka
Copy link

Same error, please help!

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

No branches or pull requests

2 participants