Appium 运行 sh ./Scripts/bootstrap.sh 报错,求助,运行结果如下

block · 2017年06月28日 · 最后由 Wensau 回复于 2017年08月29日 · 3116 次阅读

-e Fetching dependencies
-e Building Inspector
Creating bundle directory...
Fetching Inspector dependencies...
npm WARN web-driver-inspector@1.0.0 No repository field.
Validating Inspector
Launching Flow server for /usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.0@appium-xcuitest-driver/WebDriverAgent/Inspector
Spawned flow server (pid=565)
Logs will go to /private/tmp/flow/zSusrzSlocalzSlibzSnode_moduleszSappiumzSnode_moduleszS_appium-xcuitest-driver@2.30.0@appium-xcuitest-driverzSWebDriverAgentzSInspector.log
No errors!

/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.0@appium-xcuitest-driver/WebDriverAgent/Inspector/js/app.js
12:18 error Unable to resolve path to module 'js/http' import/no-unresolved
13:20 error Unable to resolve path to module 'js/screen' import/no-unresolved
14:31 error Unable to resolve path to module 'js/screenshot_factory' import/no-unresolved
15:18 error Unable to resolve path to module 'js/tree' import/no-unresolved
16:22 error Unable to resolve path to module 'js/tree_node' import/no-unresolved
17:25 error Unable to resolve path to module 'js/tree_context' import/no-unresolved
18:23 error Unable to resolve path to module 'js/inspector' import/no-unresolved
27:14 error Missing space before function parentheses space-before-function-paren
32:13 error Missing space before function parentheses space-before-function-paren
37:20 error Missing space before function parentheses space-before-function-paren
41:18 error Missing space before function parentheses space-before-function-paren
48:13 error Expected property shorthand object-shorthand
55:12 error Missing space before function parentheses space-before-function-paren
64:9 error Missing space before function parentheses space-before-function-paren

/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.0@appium-xcuitest-driver/WebDriverAgent/Inspector/js/http.js
13:13 error Missing space before function parentheses space-before-function-paren
13:20 warning Avoid callbacks. Prefer Async/Await promise/prefer-await-to-callbacks
19:7 error Unexpected var, use let or const instead no-var
20:7 warning Avoid callbacks. Prefer Async/Await promise/prefer-await-to-callbacks
25:14 error Missing space before function parentheses space-before-function-paren
25:27 warning Avoid callbacks. Prefer Async/Await promise/prefer-await-to-callbacks
29:7 error Expected property shorthand object-shorthand
32:7 error Unexpected var, use let or const instead no-var
33:7 warning Avoid callbacks. Prefer Async/Await promise/prefer-await-to-callbacks

/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.0@appium-xcuitest-driver/WebDriverAgent/Inspector/js/image_utils.js
11:34 error Missing space before function parentheses space-before-function-paren
11:55 warning Avoid callbacks. Prefer Async/Await promise/prefer-await-to-callbacks
15:40 error Missing space before function parentheses space-before-function-paren
15:69 warning Avoid callbacks. Prefer Async/Await promise/prefer-await-to-callbacks
16:5 error Unexpected var, use let or const instead no-var
20:5 error Unexpected var, use let or const instead no-var
28:45 error Missing space before function parentheses space-before-function-paren
28:79 warning Avoid callbacks. Prefer Async/Await promise/prefer-await-to-callbacks
29:5 error Unexpected var, use let or const instead no-var
33:5 error Unexpected var, use let or const instead no-var
41:22 error Missing space before function parentheses space-before-function-paren
41:31 warning Avoid callbacks. Prefer Async/Await promise/prefer-await-to-callbacks
42:5 error Unexpected var, use let or const instead no-var
44:28 error Missing space before function parentheses space-before-function-paren
45:7 warning Avoid callbacks. Prefer Async/Await promise/prefer-await-to-callbacks

/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.0@appium-xcuitest-driver/WebDriverAgent/Inspector/js/inspector.js
13:18 error Unable to resolve path to module 'js/http' import/no-unresolved
14:1 error Unexpected var, use let or const instead no-var
18:22 error Missing space before function parentheses space-before-function-paren
23:9 error Missing space before function parentheses space-before-function-paren
38:18 error Missing space before function parentheses space-before-function-paren
64:14 error Missing space before function parentheses space-before-function-paren
68:5 error Unexpected var, use let or const instead no-var
86:6 error Missing space before function parentheses space-before-function-paren
89:9 error Unexpected var, use let or const instead no-var
97:13 error Unexpected var, use let or const instead no-var
98:13 error Unexpected var, use let or const instead no-var

/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.0@appium-xcuitest-driver/WebDriverAgent/Inspector/js/screen.js
13:18 error Unable to resolve path to module 'js/http' import/no-unresolved
15:1 error Unexpected var, use let or const instead no-var
20:9 error Missing space before function parentheses space-before-function-paren
45:22 error Missing space before function parentheses space-before-function-paren
46:5 error Unexpected var, use let or const instead no-var
53:13 error Missing space before function parentheses space-before-function-paren
57:20 error Missing space before function parentheses space-before-function-paren
58:5 error Unexpected var, use let or const instead no-var
59:5 error Unexpected var, use let or const instead no-var
61:5 error Unexpected var, use let or const instead no-var
63:5 error Unexpected var, use let or const instead no-var
73:9 error Unexpected var, use let or const instead no-var
77:13 error Expected property shorthand object-shorthand
78:13 error Expected property shorthand object-shorthand
88:7 error Missing space before function parentheses space-before-function-paren
98:19 error Missing space before function parentheses space-before-function-paren
111:24 error Missing space before function parentheses space-before-function-paren
124:34 error Missing space before function parentheses space-before-function-paren
125:5 error Unexpected var, use let or const instead no-var
130:5 error Unexpected var, use let or const instead no-var
133:5 error Unexpected var, use let or const instead no-var
137:75 error Missing space before opening brace space-before-blocks
138:9 error Expected indentation of 6 spaces but found 8 indent

/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.0@appium-xcuitest-driver/WebDriverAgent/Inspector/js/screenshot_factory.js
10:24 error Unable to resolve path to module 'js/image_utils' import/no-unresolved
12:30 error Missing space before function parentheses space-before-function-paren
13:3 error Unexpected var, use let or const instead no-var
23:26 error Missing space before function parentheses space-before-function-paren
23:60 warning Avoid callbacks. Prefer Async/Await promise/prefer-await-to-callbacks
33:28 error Missing space before function parentheses space-before-function-paren
37:22 error Missing space before function parentheses space-before-function-paren
37:43 warning Avoid callbacks. Prefer Async/Await promise/prefer-await-to-callbacks
51:34 error Missing space before function parentheses space-before-function-paren
51:42 warning Avoid callbacks. Prefer Async/Await promise/prefer-await-to-callbacks
52:5 error Unexpected var, use let or const instead no-var
58:5 warning Avoid callbacks. Prefer Async/Await promise/prefer-await-to-callbacks

/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.0@appium-xcuitest-driver/WebDriverAgent/Inspector/js/tree.js
84:5 error Unexpected var, use let or const instead no-var

/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.0@appium-xcuitest-driver/WebDriverAgent/Inspector/js/tree_context.js
11:14 error Missing space before function parentheses space-before-function-paren

/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.0@appium-xcuitest-driver/WebDriverAgent/Inspector/js/tree_node.js
11:19 error Missing space before function parentheses space-before-function-paren
19:5 error Unexpected var, use let or const instead no-var
106 problems (93 errors, 13 warnings)

共收到 7 条回复 时间 点赞

解决了吗? share 一下🌹

杜哲 回复

一样的问题,解决了的话 告诉我一下 谢谢

去 github 上下个 webdriveragent 源码,然后在新源码目录下执行这个 sh 命令,我装的 appium1.6.5 自带的 webdriveragent 执行这个 sh 命令也有问题,用新下的 webdriveragent,不要用自带的

这个就是 github 上的源码编译的,但是最终不是这个原因,github 上的 webdriveragent 有 bug,并且没有 usbclient,所以最后还是使用的 appium 自带的 webdriveragent,最终实现了在网页中抓取 source,但是界面的 xml 很乱,需要解析,后来直接放弃了,直接安装了 1.6.5GUI 的 appium,配置好环境后,可以使用了,之后我会出两个教程,一个非 GUI 的,一个 GUI 的,没办法,ios10 之后太麻烦了

5楼 已删除
6楼 已删除

@Kenblock 我卸载了重新安装还是出现这个问题

杜哲 回复

没有,最后还是使用的 1.6.5appium 自带的 webdriver

 整理下格式啊!乱的怎么看。
1.首先你得说你dmg 安装还是 npm 安装
2.标注你的xcode 版本。
3.标注你的Mac os 版本
block 关闭了讨论 10月03日 07:15
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册