-
Notifications
You must be signed in to change notification settings - Fork 12.8k
TS Server fatal error: Debug Failure. Invalid cast. The supplied value [object Object] did not pass the test 'isUnaryExpression'. #53114
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
We'd really need to see the code that causes this |
I have the same issue. For me is a expo/react-native project. I cannot share the code - other projects to works fine, this started happening after updating to last version of vscode. |
@stefan520 I had to download an older version, for me January version works fine |
Same problem here. My project is an expo/react-native. |
Works after downgrade to Feb/23 version |
We're tracking this at #53637 and really need a repro! Please help! |
@lovveapp would you be able to post a (redacted if needed) zip file or other way to reproduce this crash? Thanks! |
@Alekzv9 would you be able to post a (redacted if needed) zip file or other way to reproduce this crash? Thanks! |
@stefan520 would you be able to post a (redacted if needed) zip file or other way to reproduce this crash? Thanks! |
Note the the |
@vecsq thank you! |
Repro 1 is
Repro 2 I'll do tomorrow morning 😅 |
Second is |
Sent a PR for repro 2, that was caused by my SFT PR adding in a node check. Repro 1 is a bad case of our parser's recovery. In JS, we parse I have no idea why this is new, though. Probably the fix is to instead ensure the returned node is a unary, so, wrap the binary expression in another faked up unary node. |
No, I'm wrong, it's not at typo. This recovery mechanism just doesn't appear to work. Still, unsure why it's new. |
Oh, this is because of #52667. Yay, both crashes are my fault! |
Type: Bug
❗️❗️❗️ Please fill in the sections below to help us diagnose the issue ❗️❗️❗️
TypeScript Version: 5.1.0-dev.20230304
Steps to reproduce crash
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 1.76.0 (92da9481c0904c6adfe372c12da3b7748d74bdcb, 2023-03-01T10:22:44.506Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: No
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Extensions (38)
A/B Experiments
The text was updated successfully, but these errors were encountered: