Closed ravi005e closed 6 years ago
Hi, @ravi005e ! Please provide more details about your issue (executed commands, etc.).
@ravi005e This is an error in your own script. Please check for syntax errors. I'm going to close this for now because we only use this issue list for issues with Protractor itself.
From the the getting help section of the README:
Please ask usage and debugging questions on StackOverflow (use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)
Thanks!
@wswebcreation , thanks that payed attention to this issue!
Microsoft Windows [Version 10.0.17134.48] (c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\git\protractor-starter>node ./node_modules/.bin/protractor -v C:\Users\git\protractor-starter\node_modules.bin\protractor:2 basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')") ^^^^^^^
SyntaxError: missing ) after argument list at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:616:28) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:191:16) at bootstrap_node.js:612:3
here is package jason { "name": "protractor-starter", "version": "0.0.6", "description": "protractor-starter end-to-end tests setup also for non angular application", "main": "index.js", "repository": { "url": "https://github.com/marcelmokos/protractor-starter.git", "type": "git" }, "bugs": { "url": "https://github.com/marcelmokos/protractor-starter/issues" }, "keywords": [ "protractor", "starter", "page object pattern", "testing", "end to end testing" ], "author": "Marcel Mokoš", "license": "MIT", "scripts": { "start": "yarn run test", "pretest": "yarn install", "test": "yarn run protractor --", "test:multiple": "yarn run test -- --capabilities.shardTestFiles=true --capabilities.maxInstances=3", "protractor": "node_modules/.bin/protractor protractor-conf.js" }, "dependencies": { "babel-cli": "^6.26.0", "babel-preset-env": "^1.6.1", "chromedriver": "^2.38.2", "jasmine-spec-reporter": "^4.2.1", "node-fetch": "^2.1.2", "protractor": "^5.3.1" }, "devDependencies": { "babel-eslint": "^8.2.3", "eslint": "^4.19.1", "eslint-config-airbnb-base": "^12.1.0", "eslint-plugin-async-await": "^0.0.0", "eslint-plugin-import": "^2.11.0", "eslint-plugin-protractor": "^1.40.0" } }
please help
@ravi005e
You have a syntax error, see the stacktrace. These questions are also better suited for Stackoverflow in stead of here.
it is coming from protractor api, correct. need to address here
@ravi005e , try to run this example, but using
node .\node_modules\protractor\bin\protractor config.js
command (from root folder) and provide feedback about results.
Here is the execution result, didn’t work
Running window 10
C:\Users\rshanker\git\protractor-long-load-bug>node -v
v8.11.2
C:\Users\rshanker\git\protractor-long-load-bug>npm -v
5.6.0
C:\Users\rshanker\git\protractor-long-load-bug>npm install
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN get-config-capabilities@1.0.0 No repository field.
added 139 packages in 136.671s
C:\Users\rshanker\git\protractor-long-load-bug>node .\node_modules\protractor\bin\protractor config.js(node:16344) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[07:37:39] I/launcher - Running 1 instances of WebDriver
[07:37:39] I/direct - Using ChromeDriver directly...
[07:37:39] E/direct - Error code: 135
[07:37:39] E/direct - Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
[07:37:39] E/direct - Error: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
at Direct.getNewDriver (C:\Users\rshanker\git\protractor-long-load-bug\node_modules\protractor\built\driverProviders\direct.js:63:31)
at Runner.createBrowser (C:\Users\rshanker\git\protractor-long-load-bug\node_modules\protractor\built\runner.js:195:43)
at q.then.then (C:\Users\rshanker\git\protractor-long-load-bug\node_modules\protractor\built\runner.js:339:29)
at _fulfilled (C:\Users\rshanker\git\protractor-long-load-bug\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\rshanker\git\protractor-long-load-bug\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\rshanker\git\protractor-long-load-bug\node_modules\q\q.js:796:13)
at C:\Users\rshanker\git\protractor-long-load-bug\node_modules\q\q.js:556:49
at runSingle (C:\Users\rshanker\git\protractor-long-load-bug\node_modules\q\q.js:137:13)
at flush (C:\Users\rshanker\git\protractor-long-load-bug\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
[07:37:39] E/launcher - Process exited with error code 135
C:\Users\rshanker\git\protractor-long-load-bug>webdriver-manager update
'webdriver-manager' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\rshanker\git\protractor-long-load-bug>node .\node_modules\webdriver-manager update
module.js:549
throw err;
^
Error: Cannot find module 'C:\Users\rshanker\git\protractor-long-load-bug\node_modules\webdriver-manager'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
C:\Users\rshanker\git\protractor-long-load-bug>
From: IgorSasovets notifications@github.com Sent: Thursday, May 24, 2018 1:28 AM To: angular/protractor protractor@noreply.github.com Cc: ravi005e ravi005e@gmail.com; Mention mention@noreply.github.com Subject: Re: [angular/protractor] getting syntax error in protractor on windows, see stacktrace (#4791)
@ravi005e https://github.com/ravi005e , try to run this example https://github.com/IgorSasovets/protractor-long-load-bug , but using
node .\node_modules\protractor\bin\protractor config.js
command (from root folder) and provide feedback about results.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/angular/protractor/issues/4791#issuecomment-391632668 , or mute the thread https://github.com/notifications/unsubscribe-auth/Acd-ZLrzW_IcMO-78fYWOctdhHzf9W6-ks5t1m8fgaJpZM4TrdjN . https://github.com/notifications/beacon/Acd-ZD8NSKUaeSaiALrI7wtY6zjTRSmZks5t1m8fgaJpZM4TrdjN.gif
@ravi005e , run
node .\node_modules\protractor\bin\webdriver-manager update
command from project root folder and then restart tests.
It worked, thanks for you support
From: IgorSasovets notifications@github.com Sent: Thursday, May 24, 2018 1:28 AM To: angular/protractor protractor@noreply.github.com Cc: ravi005e ravi005e@gmail.com; Mention mention@noreply.github.com Subject: Re: [angular/protractor] getting syntax error in protractor on windows, see stacktrace (#4791)
@ravi005e https://github.com/ravi005e , try to run this example https://github.com/IgorSasovets/protractor-long-load-bug , but using
node .\node_modules\protractor\bin\protractor config.js
command (from root folder) and provide feedback about results.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/angular/protractor/issues/4791#issuecomment-391632668 , or mute the thread https://github.com/notifications/unsubscribe-auth/Acd-ZLrzW_IcMO-78fYWOctdhHzf9W6-ks5t1m8fgaJpZM4TrdjN . https://github.com/notifications/beacon/Acd-ZD8NSKUaeSaiALrI7wtY6zjTRSmZks5t1m8fgaJpZM4TrdjN.gif
@IgorSasovets
Yes, tnx for the support
@wswebcreation, I'm happy that this issue fixed)