-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Cannot read properties of undefined (reading 'isSelfAccepting') #13030
Comments
Just realized that we are not on the latest version of Vite. Attempting to replicate this with Vite v4.3.3. |
Confirmed that the same error is present on v4.3.3
|
This appears to be some sort of a race condition. It does not happen if I access the web app in a single browser instance. It starts breaking when I try to run Playwright tests against the Vite instance using 5 parallel instances. |
We've also run into this issue. Does it seem to be related to vite cache for you at all? Have you tried deleting all cache files before running tests to workaround it? |
I don't think so. I can pretty consistently replicate this when requesting the web app using several parallel processes. It appears to be some sort of a race condition. |
+1, also getting
I use vite (@latest) with ladle and npm. Next line in log is I found the following (already merged) old PR #7993 also having issues with |
Can someone reproduce this reliably? |
@brillout - On my end, it unfortunately doesn't happen reliably, and I'm not even sure how to replicate it. While debugging, I tried removing; then adding back in the same change that caused it, and it worked fine the second time. When it does happen, I typically have to restart vite, and it works again for a while, but eventually out of the blue it will come back again. Maybe some type of memory leak? Hard to say, but hopefully that's helpful. Happy to provide more information, if there's something else needed? Thanks |
@brillout on my end it fails quite reliable. 10% on start, 80% on first code change save, 10% on second code change save. …but if I only serve the styleguide using ladle and vite (the one which fails), then it seems to work like a charm! I use
edit: Removing |
@justb3a Maybe the reason might be because 2 |
Please try to create a minimal reproduction using vite.new or a github repo to share here. Also, is this something that started happening in Vite 4.3? It looks from @gajus' original issue that 4.2 was also affected. |
It is happening in Vite 4.2 and Vite 4.3. In my case, it is easy to replicate this by running Playwright Tests in parallel against Vite instance, i.e. multiple instances of browser talking with the same Vite HMR instance at once. So it is not something that can be replicated in isolation (as far as I can think), but rather how the client interacts with it. |
It used to work without issues for a long time. |
Same. It happens when running Playwright tests |
Would you try if this PR fixes your issue? #13085 |
Assuming I built everything correctly, it still throws I used StackBlitz Codeflow to build the bundle and types. Somehow, building the types does not work.
Thanks for taking care of the issue 🙏 |
Hi @patak-dev, I've given a #13085 a try and it didn't seem to remove the issue. Let me know if I can help with any further logs or reproduction steps. Given that some other users mentioned this was happening specifically within Playwright tests, here are some of my findings and how it was being produced: Context:
Reproduction steps:
I was able to avoid this by:
Hope this helps in some way! cc @gajus |
Thanks for the detailed comment @JasonObeid! @gajus, I wonder if something similar is happening in your case. Vite should still be able to cope with this scenario though (although the bug showed in this case that Jason's setup could be improved). |
@patak-dev I am in the same team with @JasonObeid :-) |
@patak-dev there seems to be a similar issue popping up while using Storybook with Vite. I've linked the issue above. Like the other commenters above, I'm also not able to consistently get this error to appear - but for me it results in not being able to run Storybook 90% of the time, until it randomly works. I've posted the output in the Storybook issue linked above, hopefully that might help getting to the bottom of this. |
We see this in every CI build of a given project starting from an update (not Vite update) yesterday. The output seems similar to what is described above
The changed files are imported in Sometimes instead of "internal server error", the error is only
|
With the PR version (#13085) I still see
sometimes the error is also combined with
|
When using the PR, the
importer is /home/circleci/pre-lit/frontend/themes/pre-lit/styles.css?inline
|
|
This issue should be fixed by #13231, please report back, and let's reopen it if you still hit this bug after the next patch. |
Describe the bug
Occasionally requests are failing with an error:
Reproduction
N/A
Steps to reproduce
No response
System Info
The text was updated successfully, but these errors were encountered: