Skip to content

Global error: Uncaught TypeError: Cannot read property 'pct' #296

Open

Description

@vignesh20794

getting this error when i ran 'COVERAGE=true ember test' have some screen shots stating the same

1.console error
image

2: VScode terminal error
image

3: debugged view
image

the issue is because of stringification of the data object as in (debugged view screenshot)
can u please look into it

ember-cli: 3.22.0
node: 10.16.3
ember-cli-code-coverage : 1.0.2
os: darwin x64

will be happy to help if needed

Activity

  1. GCheung55 commented on Nov 7, 2020

    @GCheung55

    @vignesh20794 would you mind creating a repo to reproduce this issue? That would be very helpful to debug.

  2. gobeli commented on Dec 2, 2020

    @gobeli

    I run into the same issue on this Repo: https://github.com/opensource-challenge/opensource-challenge-client/tree/dependency-updates (branch dependency-updates) somehow the xhr.response is a string which would need to be parsed before accessing...

  3. rwjblue commented on Jul 20, 2021

    @rwjblue
    Collaborator

    I debugged this with someone earlier today, and in our case the issue was that some tests were not properly resetting the pretender instance so window.XMLHttpRequest was the FakeRequest object that Pretender installs, which does not respect the responseType property.

    Specifically, someone was calling this.server = setupMirage() in their test, but never this.server.shutdown().

  4. kategengler commented on Jul 20, 2021

    @kategengler
    Collaborator

    😭 That explains so very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions