Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'isValidUTF8' of undefined #2777

Closed
kevinsalter opened this issue Jul 17, 2017 · 2 comments · Fixed by #2880 or karronoli/redpen#10
Closed

TypeError: Cannot read property 'isValidUTF8' of undefined #2777

kevinsalter opened this issue Jul 17, 2017 · 2 comments · Fixed by #2880 or karronoli/redpen#10

Comments

@kevinsalter
Copy link

Expected behaviour

The test runner runs successfully.

Actual behaviour

An error is thrown when running karma start karma.conf.js --single-run in an Angular 2.4.7 project.

17 07 2017 14:37:25.450:INFO [karma]: Karma v1.7.0 server started at http://0.0.0.0:9876/
17 07 2017 14:37:25.450:INFO [launcher]: Launching browser Chrome with unlimited concurrency
17 07 2017 14:37:25.457:INFO [launcher]: Starting browser Chrome
17 07 2017 14:37:26.898:ERROR [karma]: TypeError: Cannot read property 'isValidUTF8' of undefined
    at /Users/kevinsalter/code/esportspools/resources/assets/site/node_modules/karma/node_modules/ws/lib/Receiver.js:532:28
    at /Users/kevinsalter/code/esportspools/resources/assets/site/node_modules/karma/node_modules/ws/lib/Receiver.js:368:7
    at /Users/kevinsalter/code/esportspools/resources/assets/site/node_modules/karma/node_modules/ws/lib/PerMessageDeflate.js:249:5
    at afterWrite (_stream_writable.js:385:3)
    at onwrite (_stream_writable.js:376:7)
    at WritableState.onwrite (_stream_writable.js:90:5)
    at afterTransform (_stream_transform.js:79:3)
    at TransformState.afterTransform (_stream_transform.js:54:12)
    at Zlib.callback (zlib.js:639:5)

Environment Details

Here are all packages in package.json of the project

"dependencies": {
    "@angular/common": "2.4.7",
    "@angular/compiler": "2.4.7",
    "@angular/core": "2.4.7",
    "@angular/forms": "2.4.7",
    "@angular/http": "2.4.7",
    "@angular/platform-browser": "2.4.7",
    "@angular/platform-browser-dynamic": "2.4.7",
    "@angular/router": "3.4.7",
    "@angular/upgrade": "2.4.7",
    "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.14",
    "angular2-swiper": "0.8.1",
    "core-js": "2.4.1",
    "intl": "1.2.5",
    "ng2-lazyload-image": "2.4.0",
    "reflect-metadata": "0.1.10",
    "rxjs": "5.4.0",
    "swiper": "3.4.2",
    "systemjs": "0.19.39",
    "ui-cropper": "1.0.4",
    "zone.js": "0.7.8"
  },
  "devDependencies": {
    "@types/core-js": "0.9.36",
    "@types/jasmine": "2.5.51",
    "@types/lodash": "4.14.51",
    "@types/node": "4.2.11",
    "apache-server-configs": "2.14.0",
    "awesome-typescript-loader": "3.1.3",
    "clean-webpack-plugin": "0.1.16",
    "concurrently": "3.4.0",
    "connect-modrewrite": "0.8.5",
    "grunt": "0.4.5",
    "grunt-autoprefixer": "1.0.1",
    "grunt-concurrent": "0.5.0",
    "grunt-contrib-clean": "0.6.0",
    "grunt-contrib-concat": "0.5.1",
    "grunt-contrib-connect": "0.8.0",
    "grunt-contrib-copy": "0.5.0",
    "grunt-contrib-cssmin": "0.10.0",
    "grunt-contrib-htmlmin": "0.4.0",
    "grunt-contrib-imagemin": "0.8.1",
    "grunt-contrib-jshint": "0.10.0",
    "grunt-contrib-less": "1.4.1",
    "grunt-contrib-uglify": "0.9.2",
    "grunt-contrib-watch": "0.6.1",
    "grunt-mocha": "0.4.15",
    "grunt-modernizr": "0.5.2",
    "grunt-newer": "0.7.0",
    "grunt-ng-annotate": "2.0.2",
    "grunt-rev": "0.1.0",
    "grunt-svg-sprite": "1.3.7",
    "grunt-svgmin": "0.4.0",
    "grunt-systemjs-builder": "0.2.7",
    "grunt-ts": "5.5.1",
    "grunt-usemin": "2.6.2",
    "grunt-wiredep": "1.9.0",
    "jasmine-core": "2.6.3",
    "jit-grunt": "0.9.1",
    "jshint-stylish": "0.4.0",
    "karma": "1.7.0",
    "karma-chrome-launcher": "2.1.1",
    "karma-cli": "1.0.1",
    "karma-htmlfile-reporter": "0.3.5",
    "karma-jasmine": "1.1.0",
    "karma-jasmine-html-reporter": "0.2.2",
    "load-grunt-tasks": "0.4.0",
    "localforage": "1.5.0",
    "lodash": "4.17.4",
    "ng2-file-upload": "1.2.1",
    "spawn-sync": "1.0.15",
    "time-grunt": "0.4.0",
    "typescript": "2.1.6",
    "webpack": "2.6.1",
    "webpack-livereload-plugin": "0.9.0",
    "webpack-merge": "1.1.2"
  },
  • Karma version: 1.7.0
  • I'm using the following plugins in karma.config.js
plugins: [
            require('karma-jasmine'),
            require('karma-chrome-launcher'),
            require('karma-jasmine-html-reporter'), // click "Debug" in browser to see it
            require('karma-htmlfile-reporter') // crashing w/ strange socket error
        ],

Steps to reproduce the behaviour

  1. run karma start karma.conf.js --single-run
kevinsalter added a commit to kevinsalter/karma that referenced this issue Aug 24, 2017
johnjbarton added a commit that referenced this issue Nov 15, 2017
This is a duplicate of @kevinsalter PR #2821. His PR fails on appveyor and we can't figure out how to change the repo config to fix the build there or how to retry that build.  So let's just try from scratch.

Fixes issue #2777
johnjbarton added a commit to johnjbarton/karma that referenced this issue Nov 15, 2017
This is a duplicate of @kevinsalter PR karma-runner#2821. I am re-sending after appveyor fixup.
(We don't seem to have the ability to retry appveyor builds).

Fixes karma-runner#2777
@zzo zzo closed this as completed in #2880 Nov 15, 2017
@amir-arad
Copy link

could this be pushed to version 1 as well?

@johnjbarton
Copy link
Contributor

Maintaining two independent release tracks would drain energy from the mainline. Is there some reason you can't use 2.x?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants