facebook / idb

idb is a flexible command line interface for automating iOS simulators and devices
https://fbidb.io
MIT License
4.54k stars 437 forks source link

appium v1.15.0 failed to build inspector bundle #590

Open kajal-chauhan09 opened 4 years ago

kajal-chauhan09 commented 4 years ago

I ran ./Scripts/bootstrap.sh to build Inspector, failed with exceptions.

Environment Details:

Appium version (or git revision) that exhibits the issue: v 1.15.0 Desktop OS/version used to run Appium: macOS Mojave 10.14.5 Node.js version (unless using Appium.app|exe): node -v12.16.1; npm -v6.13.4

Command Lines ran successfully as follows:

 mkdir -p Resources/WebDriverAgent.bundle
./Scripts/bootstrap.sh 

but ./Scripts/bootstrap.sh -i command failed with exceptions. Please do assist asps.Thanks.

Error Logs:

dhcp-10-176-251-30:WebDriverAgent omsisc$ ./Scripts/bootstrap.sh Fetching dependencies Building Inspector Creating bundle directory... Fetching Inspector dependencies... npm WARN ajv-errors@1.0.1 requires a peer of ajv@>=5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN react-dom@15.6.2 requires a peer of react@^15.6.2 but none is installed. You must install peer dependencies yourself. npm WARN webpack-dev-middleware@3.7.2 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN webpack-dev-server@3.10.3 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN web-driver-inspector@1.0.0 No repository field.

up to date in 35.163s

19 packages are looking for funding run npm fund for details

Validating Inspector Building Inspector...

web-driver-inspector@1.0.0 build /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector webpack --progress --colors

Hash: 9ed7d0b85cc08341fd0f
Version: webpack 1.15.0 Time: 54ms [0] multi main 28 bytes {0} [built] [1 error]

ERROR in ./js/app.js Module parse failed: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/app.js Unexpected token (67:6) You may need an appropriate loader to handle this file type. SyntaxError: Unexpected token (67:6) at Parser.pp$4.raise (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:2221:15) at Parser.pp.unexpected (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:603:10) at Parser.pp$3.parseExprAtom (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1822:12) at Parser.pp$3.parseExprSubscripts (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1715:21) at Parser.pp$3.parseMaybeUnary (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1692:19) at Parser.pp$3.parseExprOps (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1637:21) at Parser.pp$3.parseMaybeConditional (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1620:21) at Parser.pp$3.parseMaybeAssign (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1597:21) at Parser.pp$3.parseParenAndDistinguishExpression (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1861:32) at Parser.pp$3.parseExprAtom (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1796:19) at Parser.pp$3.parseExprSubscripts (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1715:21) at Parser.pp$3.parseMaybeUnary (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1692:19) at Parser.pp$3.parseExprOps (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1637:21) at Parser.pp$3.parseMaybeConditional (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1620:21) at Parser.pp$3.parseMaybeAssign (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1597:21) at Parser.pp$3.parseExpression (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1573:21) at Parser.pp$1.parseReturnStatement (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:839:33) at Parser.pp$1.parseStatement (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:699:34) at Parser.pp$1.parseBlock (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:981:25) at Parser.pp$3.parseFunctionBody (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:2105:24) at Parser.pp$3.parseMethod (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:2075:10) at Parser.pp$1.parseClassMethod (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1137:25) at Parser.pp$1.parseClass (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1118:14) at Parser.pp$1.parseStatement (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:697:19) at Parser.pp$1.parseTopLevel (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:638:25) at Parser.parse (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:516:17) at Object.parse (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:3098:39) at Parser.parse (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/lib/Parser.js:902:15) at NormalModule. (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/lib/NormalModule.js:104:16) at NormalModule.onModuleBuild (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack-core/lib/NormalModuleMixin.js:310:10) @ multi main Done dhcp-10-176-251-30:WebDriverAgent omsisc$ ./Scripts/bootstrap.sh -d Fetching dependencies dhcp-10-176-251-30:WebDriverAgent omsisc$ ./Scripts/bootstrap.sh -i Building Inspector Creating bundle directory... Fetching Inspector dependencies... npm WARN ajv-errors@1.0.1 requires a peer of ajv@>=5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN react-dom@15.6.2 requires a peer of react@^15.6.2 but none is installed. You must install peer dependencies yourself. npm WARN webpack-dev-middleware@3.7.2 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN webpack-dev-server@3.10.3 requires a peer of webpack@^4.0.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN web-driver-inspector@1.0.0 No repository field.

audited 6012 packages in 14.683s

19 packages are looking for funding run npm fund for details

found 17 vulnerabilities (5 low, 12 high) run npm audit fix to fix them, or npm audit for details Validating Inspector Building Inspector...

web-driver-inspector@1.0.0 build /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector webpack --progress --colors

Hash: 9ed7d0b85cc08341fd0f
Version: webpack 1.15.0 Time: 54ms [0] multi main 28 bytes {0} [built] [1 error]

ERROR in ./js/app.js Module parse failed: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/app.js Unexpected token (67:6) You may need an appropriate loader to handle this file type. SyntaxError: Unexpected token (67:6) at Parser.pp$4.raise (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:2221:15) at Parser.pp.unexpected (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:603:10) at Parser.pp$3.parseExprAtom (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1822:12) at Parser.pp$3.parseExprSubscripts (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1715:21) at Parser.pp$3.parseMaybeUnary (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1692:19) at Parser.pp$3.parseExprOps (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1637:21) at Parser.pp$3.parseMaybeConditional (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1620:21) at Parser.pp$3.parseMaybeAssign (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1597:21) at Parser.pp$3.parseParenAndDistinguishExpression (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1861:32) at Parser.pp$3.parseExprAtom (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1796:19) at Parser.pp$3.parseExprSubscripts (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1715:21) at Parser.pp$3.parseMaybeUnary (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1692:19) at Parser.pp$3.parseExprOps (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1637:21) at Parser.pp$3.parseMaybeConditional (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1620:21) at Parser.pp$3.parseMaybeAssign (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1597:21) at Parser.pp$3.parseExpression (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1573:21) at Parser.pp$1.parseReturnStatement (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:839:33) at Parser.pp$1.parseStatement (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:699:34) at Parser.pp$1.parseBlock (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:981:25) at Parser.pp$3.parseFunctionBody (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:2105:24) at Parser.pp$3.parseMethod (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:2075:10) at Parser.pp$1.parseClassMethod (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1137:25) at Parser.pp$1.parseClass (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:1118:14) at Parser.pp$1.parseStatement (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:697:19) at Parser.pp$1.parseTopLevel (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:638:25) at Parser.parse (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:516:17) at Object.parse (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/node_modules/acorn/dist/acorn.js:3098:39) at Parser.parse (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/lib/Parser.js:902:15) at NormalModule. (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack/lib/NormalModule.js:104:16) at NormalModule.onModuleBuild (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/webpack-core/lib/NormalModuleMixin.js:310:10) @ multi main Done

c-ryan747 commented 4 years ago

Hi, Can you explain your issue and how it relates to idb?