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

bug: Cannot read properties of undefined (reading 'includes') #29686

Open
3 tasks done
erperejildo opened this issue Jul 3, 2024 · 2 comments
Open
3 tasks done

bug: Cannot read properties of undefined (reading 'includes') #29686

erperejildo opened this issue Jul 3, 2024 · 2 comments
Assignees
Labels
needs: reply the issue needs a response from the user

Comments

@erperejildo
Copy link

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

I can't run my test due to this error:

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
TypeError: Cannot read properties of undefined (reading 'includes')
❯ addStyle node_modules/@stencil/core/internal/client/index.js:691:104
❯ attachStyles node_modules/@stencil/core/internal/client/index.js:702:20
❯ updateComponent node_modules/@stencil/core/internal/client/index.js:1500:5
❯ node_modules/@stencil/core/internal/client/index.js:1490:38
❯ enqueue node_modules/@stencil/core/internal/client/index.js:1492:88
❯ dispatchHooks node_modules/@stencil/core/internal/client/index.js:1490:10
❯ Array.dispatch node_modules/@stencil/core/internal/client/index.js:1454:26
❯ consume node_modules/@stencil/core/internal/client/index.js:3018:16
❯ flush node_modules/@stencil/core/internal/client/index.js:3060:5
❯ invokeTheCallbackFunction node_modules/jsdom/lib/jsdom/living/generated/Function.js:19:26

Expected Behavior

I should be able to run tests

Steps to Reproduce

  1. Clone this repo: https://github.com/erperejildo/myPaysli
  2. run npm run test.unit

Code Reproduction URL

https://github.com/erperejildo/myPaysli

Ionic Info

Ionic:

   Ionic CLI       : 7.2.0 (C:\Users\Dani\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework : @ionic/react 8.2.2

Capacitor:

   Capacitor CLI      : 6.1.0
   @capacitor/android : 6.1.0
   @capacitor/core    : 6.1.0
   @capacitor/ios     : 6.1.0

Utility:

   cordova-res : not installed globally
   native-run  : 2.0.1

System:

   NodeJS : v20.12.2 (C:\Program Files\nodejs\node.exe)
   npm    : 10.5.2
   OS     : Windows 10

Additional Information

I don't have any includes in my component as you can check in the repo.
Would it be possible to remove vitest and use just jest?

@erperejildo
Copy link
Author

The test itself doesn't fail as you can see:
image

image

but it's annoying since it shows 35 errors

@thetaPC
Copy link
Contributor

thetaPC commented Jul 3, 2024

Thank you for submitting the issue!

I'm not able to access the repro. Please verify that it's been given public access.

Also, there's a new release for Ionic Framework that might have fixed it. I would also recommend updating the latest version. We fixed a bug that might be similar to this one.

@thetaPC thetaPC added the needs: reply the issue needs a response from the user label Jul 3, 2024
@ionitron-bot ionitron-bot bot removed the triage label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: reply the issue needs a response from the user
Projects
None yet
Development

No branches or pull requests

3 participants