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]: Intermittent error "TypeError : xyz is not a function" "TypeError : Cannot read properties of undefined" #30431

Closed
sunilsurana opened this issue Apr 19, 2024 · 5 comments

Comments

@sunilsurana
Copy link
Member

Version

1.42.1

Steps to reproduce

The issue is not reproducible in seperate the repository. In our internal repository it occurs intermittently

Expected behavior

The playwright test should execute all the functions

Actual behavior

We get error TypeError: (0 , TestSetupUtils_1.getTestEnvironmentInfo) is not a function. Even when this function is present
and another similar error. Attaching screenshot of both errors
TypeError: Cannot read properties of undefined (reading 'NONE')

image

image

Additional context

This is an intermittent issue we face. It is not reproducible on local machine and CI machine it occurs intermittently. If this fail then we try to retry which most of the time succeds.
It was working fine till version 1.40.0

The error sometime says function is missing and sometime says enum property is missing. Although they are present in the other TS files.

Looks like some issue in typescript transpilation which is included in playwright is not loading typescript file correctly.
This problem was there in 1.23 version also

Environment

OS: linux
Node - 18.17
@yury-s
Copy link
Member

yury-s commented Apr 19, 2024

Can you share an example project where it fails so that we could run it locally?

@sunilsurana
Copy link
Member Author

Sure. I'm trying to find repro steps. This issue has been difficult to repro on local machine and on CI machine it happens intermittently. Trying to find out repro steps. My initial suspect is the babel/typescript-preset version was update in 42.1 release and for some reason with our combination of code its running in some race condition.

I'll let know if i have repro.

@yury-s
Copy link
Member

yury-s commented Apr 19, 2024

My initial suspect is the babel/typescript-preset version was update in 42.1 release and for some reason with our combination of code its running in some race condition.

That may well be the case. We need a repro to figure out what's going on.

@yury-s
Copy link
Member

yury-s commented Apr 23, 2024

We need more information to act on this report. Please file a new one and link to this issue when you get back to it!

@yury-s yury-s closed this as completed Apr 23, 2024
@sunilsurana
Copy link
Member Author

By patching playwright to put logs we were able to track down the cause of the issue. SO created new issue
#30577
And also a PR to fix it #30578

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

No branches or pull requests

2 participants