Giter Site home page Giter Site logo

Comments (17)

Blackbaud-SteveBrush avatar Blackbaud-SteveBrush commented on September 9, 2024 1

Related? karma-runner/karma#3560 (comment)

I set clearContext: config.singleRun in my local karma.config and the error goes away...

from angular-cli.

freon27 avatar freon27 commented on September 9, 2024 1

It caused my pre-push hook to fail and I had to switch off the hooks to be able to push so for us it appears to be actually causing a non-zero exit.

from angular-cli.

alan-agius4 avatar alan-agius4 commented on September 9, 2024 1

@dgp1130, I was able to replicate this issue exclusively on macOS, and it occurs in both headless and non-headless modes of Chrome version 128.0.0.0.

When --watch is set to a non-truthy value, I also observed the Some of your tests did a full page reload! error appearing when the browser closes after all tests have successfully run. However, in my case, the process did not terminate with a non-zero exit code.

from angular-cli.

btd1337 avatar btd1337 commented on September 9, 2024 1

Related? karma-runner/karma#3560 (comment)

I set clearContext: config.singleRun in my local karma.config and the error goes away...

This works for me.

Environment:

Angular 17
macOS Sonoma

from angular-cli.

alemp avatar alemp commented on September 9, 2024

Same happened here after update Chrome to v128.0.0.0.

Angular CLI: 17.3.8
Node: 18.20.3
Package Manager: npm 10.7.0
OS: darwin arm64

Angular: 17.3.12
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.8
@angular-devkit/build-angular   17.3.8
@angular-devkit/core            17.3.8
@angular-devkit/schematics      17.3.8
@angular/cdk                    17.3.10
@angular/cli                    17.3.8
@angular/material               17.3.10
@schematics/angular             17.3.8
rxjs                            7.8.1
typescript                      5.4.5
zone.js                         0.14.10

from angular-cli.

freon27 avatar freon27 commented on September 9, 2024

I also have this issue. I'm only commenting to add that I ONLY see the problem in non-watch mode : ng test --watch=false

image

from angular-cli.

OPuder avatar OPuder commented on September 9, 2024

The same thing happened here after updating Chrome to v128.0.0.0.

Bildschirmfoto 2024-08-23 um 15 45 57

Bildschirmfoto 2024-08-23 um 15 44 15

from angular-cli.

philmayfield avatar philmayfield commented on September 9, 2024

I ONLY see the problem in non-watch mode : ng test --watch=false

I noticed that too, but I think once you stop watching it'll spit out the error.

from angular-cli.

rdamazio avatar rdamazio commented on September 9, 2024

Also seeing this, and it's not a specific test that fails:

Angular CLI: 18.2.1
Node: 22.7.0
Package Manager: npm 10.8.2
OS: darwin x64

Angular: 18.2.1
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, platform-browser, platform-browser-dynamic
... platform-server, router, ssr

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1802.1
@angular-devkit/build-angular   18.2.1
@angular-devkit/core            18.2.1
@angular-devkit/schematics      18.2.1
@schematics/angular             18.2.1
rxjs                            7.8.1
typescript                      5.5.4
zone.js                         0.14.10

Test output:

> ng test --watch=false --browsers=ChromeHeadless

✔ Browser application bundle generation complete.
23 08 2024 15:49:17.645:INFO [karma-server]: Karma v6.4.4 server started at http://localhost:9876/
23 08 2024 15:49:17.647:INFO [launcher]: Launching browsers ChromeHeadless with concurrency unlimited
23 08 2024 15:49:17.651:INFO [launcher]: Starting browser ChromeHeadless
23 08 2024 15:49:19.042:INFO [Chrome Headless 128.0.0.0 (Mac OS 10.15.7)]: Connected on socket 0lhJDWyRZAKUz0g-AAAB with id 93949148
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 0 of 36 SUCCESS (0 secs / 0 secs)
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 0 of 36 SUCCESS (0 secs / 0 secs)
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 0 of 36 SUCCESS (0 secs / 0 secs)
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 0 of 36 SUCCESS (0 secs / 0 secs)
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 0 of 36 SUCCESS (0 secs / 0 secs)
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 0 of 36 SUCCESS (0 secs / 0 secs)
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 0 of 36 SUCCESS (0 secs / 0 secs)
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 36 of 36 SUCCESS (0.536 secs / 0.5 secs)
Chrome Headless 128.0.0.0 (Mac OS 10.15.7) ERROR
  Some of your tests did a full page reload!
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 36 of 36 ERROR (0.536 secs / 0.5 secs)
Chrome Headless 128.0.0.0 (Mac OS 10.15.7) ERROR
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 36 of 36 ERROR (0.55 secs / 0.5 secs)

from angular-cli.

andonary avatar andonary commented on September 9, 2024

Similar issue here, does not appear on watch=true. I can't find what is the root cause of it.

Angular CLI: 18.0.4
Node: 22.2.0
Package Manager: npm 10.7.0
OS: darwin arm64

Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1800.4
@angular-devkit/core         18.0.4
@angular-devkit/schematics   18.0.4
@schematics/angular          18.0.4
> ng test --no-watch --no-progress --browsers=ChromeHeadless

26 08 2024 13:56:56.078:INFO [karma-server]: Karma v6.4.3 server started at http://localhost:9876/
26 08 2024 13:56:56.079:INFO [launcher]: Launching browsers ChromeHeadless with concurrency unlimited
26 08 2024 13:56:56.081:INFO [launcher]: Starting browser ChromeHeadless
26 08 2024 13:56:56.739:INFO [Chrome Headless 128.0.0.0 (Mac OS 10.15.7)]: Connected on socket SRHYT2w467iGirpgAAAB with id 23475697
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 10 of 73 SUCCESS (0 secs / 0.045 secs)
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 73 of 73 SUCCESS (0.191 secs / 0.173 secs)
Chrome Headless 128.0.0.0 (Mac OS 10.15.7) ERROR
  Some of your tests did a full page reload!
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 73 of 73 ERROR (0.191 secs / 0.173 secs)
Chrome Headless 128.0.0.0 (Mac OS 10.15.7) ERROR
Chrome Headless 128.0.0.0 (Mac OS 10.15.7): Executed 73 of 73 ERROR (0.195 secs / 0.173 secs)

from angular-cli.

rachcampitos avatar rachcampitos commented on September 9, 2024

Related? karma-runner/karma#3560 (comment)

I set clearContext: config.singleRun in my local karma.config and the error goes away...

In my case I did the same but still getting the error

from angular-cli.

dgp1130 avatar dgp1130 commented on September 9, 2024

I'm chatting with some Karma folks to see if we can understand what's going on here. Unfortunately we're not able to reproduce the exact issue, so I have a few questions someone can maybe help out with:

  1. Can anyone provide a minimal example? The OP suggests "To reproduce you can simply create a new project and run ng test.", though that's not sufficient for me. I'm wondering if anyone can confirm on their end that this is a sufficient reproduction, or if other requirements are necessary?
  2. All the reports I see here list Chrome Headless. Is anyone able to reproduce with a "headfull" test?
  3. Related, is anyone able to reproduce with --headless=new? I suspect using the ChromeHeadless browser likely uses the old version of --headless in Chrome and I'm wondering if the issue might be related to that. I think testing both of these require specifying a "custom browser" in your Karma config.
  4. All the reports I see here are also darwin arm64. I happen to be on Linux, so I'm wondering if anyone can reproduce on a non-Mac to at least rule out that particular aspect as a key requirement.
  5. Do tests actually fail because of this error (exit code != 0) or is this just a spurious warning which doesn't actually affect the result of the test?

from angular-cli.

Stargator avatar Stargator commented on September 9, 2024

@dgp1130
I'll take a stab at answering some of these from what I see:

Chrome version: 128.0.6613.85
@angular/core: 17.3.10
@angular/cli: 17.3.8

  1. Can anyone provide a minimal example? The OP suggests "To reproduce you can simply create a new project and run ng test.", though that's not sufficient for me. I'm wondering if anyone can confirm on their end that this is a sufficient reproduction, or if other requirements are necessary?

I cannot do this. I just got the error and I am rushing to deliver a product. Maybe if no one else does, I can follow-up later on Tues.

  1. All the reports I see here list Chrome Headless. Is anyone able to reproduce with a "headfull" test?

I have ran ng test and I do not get the error. Then I run the tests in headless mode and I see the error.

  1. Related, is anyone able to reproduce with --headless=new? I suspect using the ChromeHeadless browser likely uses the old version of --headless in Chrome and I'm wondering if the issue might be related to that. I think testing both of these require specifying a "custom browser" in your Karma config.

I added --headless=new to my karma.config.js and the error persists

  1. All the reports I see here are also darwin arm64. I happen to be on Linux, so I'm wondering if anyone can reproduce on a non-Mac to at least rule out that particular aspect as a key requirement.

I am also on a darwin arm64, so I cannot help there :(

  1. Do tests actually fail because of this error (exit code != 0) or is this just a spurious warning which doesn't actually affect the result of the test?
  1. I ran echo $? after running the headless tests and it responded with 0. So maybe it wouldn't cause a failure.
  2. I ran the tests in our pipeline, but it currently uses Chrome 124.0.6367.201 and it didn't report any error.

from angular-cli.

andonary avatar andonary commented on September 9, 2024

I have ng test on my pre-commit using husky. If it throws an code != 0 I wouldn't able to commit and I can.

I'll watch for a minimal example but same as Stargator I get this error on a enterprise product I cannot show the code.

from angular-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.