-
Notifications
You must be signed in to change notification settings - Fork 12.8k
TS Server fatal error: Cannot read property 'flags' of undefined #47299
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
Comments
Please share a small project that triggers this issue so we can investigate this |
Does this help? |
@otto-urpelainen-nt Thanks but that was reported with an old TS version. We need a repo that still crashes with TS 4.5.4 too |
I think it does crash with exactly that version. There was a different problem with that repo though, |
That repo looks completely unrelated. This issue and the attached stack trace can only possibly happen in an editor running TS Server. This repo demonstrates some simple compilation errors with tsc that are working as intended. |
It is related, but in an indirect way. So, we can reproduce this issue in our proprietary, large repository.
The call stack looks very similar for both problems! Thanks to excellent debugging effort of @ttamminen,
The reproducer repository is a minimal example having those lines and Let me know if this is still to indirect to get forward. |
Unfortunately, it’s a total coincidence that https://github.com/ttamminen/tsc-crash has the same fix as the crash you’re experiencing. The repro you are experiencing in your proprietary codebase does indeed look related, but the supposed minimal repro is in fact completely unrelated. If you can give me private read access to your proprietary repo, then we can make some progress on this problem. But sadly https://github.com/ttamminen/tsc-crash doesn’t help with it 😕 |
Thank you for taking a look at this. I put some effort to this and distilled a better reproducer from our repository. If this is still not useful, |
Yes, that repros for me! Thank you so much @otto-urpelainen-nt, I know it’s not easy to create a minimal repro from a huge project. We were really stuck and now we’re not 🥳 |
@andrewbranch @otto-urpelainen-nt Excellent! Great work Otto and thank you, Andrew, for taking look at this. I on the other hand have to check (out of curiosity) what were the differences between our repos. 👍 |
Issue Type: Bug
❗️❗️❗️ Please fill in the sections below to help us diagnose the issue ❗️❗️❗️
TypeScript Version: 4.5.4
Steps to reproduce crash
1.
2.
3.
TS Server Log
❗️Server logging disabled. To help us fix crashes like this, please enable logging by setting:
After enabling this setting, future crash reports will include the server log.
TS Server Error Stack
Server:
semantic
VS Code version: Code - Insiders 1.64.0-insider (Universal) (9930557, 2022-01-03T05:15:53.904Z)
OS version: Darwin arm64 21.2.0
Restricted Mode: No
System Info
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Extensions (24)
(1 theme extensions excluded)
A/B Experiments
The text was updated successfully, but these errors were encountered: