Closed Blasz closed 7 years ago
Yes, even I'm facing the same issue. 'ng e2e' may not be calling the 'pree2e' script while running. The workaround provided above of running 'pree2e' works though.
I have the same issue but when running ng serve --aot --live-reload
and it comes from my service component where the only thing I do is call http.get
method :P
We do run webdriver
update, but now it's run directly without using npm scripts: https://github.com/angular/angular-cli/blob/master/packages/%40angular/cli/tasks/e2e.ts#L38
I'm not sure why that didn't work in your case. It might be related with the fact that now we use protractor@5, and yo had some old drivers? Not sure. If you can find a way to consistently repro with a new app I can investigate.
For me the suggested workaround did not work on a newly generated project.
Downgrading to protractor@4.0.14 worked for me.
The issue seems to be with magic-string,
`insertLeft(index, content) { if (!warned.insertLeft) { console.warn('magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'); // eslint-disable-line no-console warned.insertLeft = true; }
return this.appendLeft(index, content);
}`
It's being called from
./node_modules/@ngtools/webpack/src/refactor.js
I can be ignored
I had this happen with beta 31, too
@filipesilva I can confirm that I have protractor installed at 4.0.13 as per my package.json:
"protractor": "~4.0.13",
I take it that this would have been updated with an ng update
but #4584 dictates that no longer works and won't be supported in the future.
Additionally, this package.json change wasn't included under any manual steps in CHANGELOG.md which has been said to be the replacement for ng update
.
I will need to perform further investigation to see if the version change is related to this bug.
I'm concerned with the fact that my project's package.json is now out of date with the latest cli's package.json blueprint and has no way of being updated as part of a CLI upgrade. Especially when hard to reproduce bugs may be introduced when new/altered CLI functionality relies on the latest package.json versions as per the blueprint.
@johnpapa @Blasz Running the e2e command without the webdriver update and adding pree2e below fixed this issue ( I use yarn btw) see #4597
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "ng e2e --no-webdriver-update",
@Blasz Also, to be able to migrate, you should copy-paste and merged all cli config files
We've added a step-by-step update doc for RCs, which we'll keep updated up to 1.0 (including).
If this is something we can fix from the CLI side I'd like to, but my understanding is that it's some kind of unsupported behaviour from protractor/webdriver-manager.
Does anyone have a better explanation?
@b-barry's trick did not work for me on a newly generated project, still the same error. I'm using Angular CLI 1.0.0.
@rkrisztian on a new project? That's really odd. Can you give me a full log please?
Attached e2e-log.txt.
Edit: Okay, that's Firefox, true. Chrome works however.
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
To record, I tried "npm install --save-dev protractor@latest", the protractor version turned into: "protractor": "^5.1.2", from "~4.0.13" and the "ng e2e" worked.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
OS?
Ubuntu
Versions.
@angular/cli: 1.0.0-beta.31
Repro steps.
Run
ng e2e
with an out of date webdriver-manager.The log given by the failure.
The log says to update webdriver-manager (which used to happen as a part of the
pree2e
npm script in package.json).Running that pre script manually fixes the problem:
Successful run