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

Is this extension broken? #353

Closed
viluMatilda opened this issue Mar 29, 2023 · 17 comments
Closed

Is this extension broken? #353

viluMatilda opened this issue Mar 29, 2023 · 17 comments

Comments

@viluMatilda
Copy link

viluMatilda commented Mar 29, 2023

Installed it, restarted VSCode and opened the TS-Type-Expand window, but nothing happens when I click different types in the editor, it's just blank and empty.

@DanKaplanSES
Copy link

DanKaplanSES commented Apr 22, 2023

I have the same experience today. When I restarted VS Code, I got this pop-up:

image

Unfortunately, the output tab provides no more information. The extension isn't even available in the filter drop-down. Is there some way I can provide more troubleshooting information?

The readme says: "You can downgrade to v0.12 if you find it inconvenient." After I downgraded I got a different error:

image

I can't find any more information than that either. Something that may help is one of my active tabs has a compilation error.

@tdd
Copy link

tdd commented Jun 16, 2023

Same, absolutely zero display in my projects.

@d-kimuson
Copy link
Owner

📝 Results of operation check using a machine on hand

  • on Mac (Apple Silicen): work as expected
  • on Windows: broken
    • The message UnExpected is displayed
  • on WIndows(WSL2): broken
    • No message is displayed and no expansion information can be seen when the type is selected.

@d-kimuson
Copy link
Owner

#373 (comment)

I have an Apple Silicon Mac that works as expected, but there are comments of similar symptoms on Macs, so maybe the same problem exists on Intel Macs? (If anyone has the same symptoms on an Apple Silicon Mac, I would appreciate comments.)

@d-kimuson
Copy link
Owner

After checking the logs, I found the following causes for each

  • Windows
    • The location where the error occurs in the code is here
    • ts-type-expand writes logs under $HOME/.ts-type-expand, but $HOME is undefined
    • In my environment, I can get it with echo $HOME, but this error occurs, so I'm not sure what the final cause is, but I think I can get it to work by not logging when it is not found.
  • Windows (WSL)

@tdd
Copy link

tdd commented Jul 23, 2023

FWIW the correct cross platform way of getting the homedir would be with os.homedir(), then use path.resolve/join for building paths from it.

https://nodejs.org/api/os.html#oshomedir

@felipap
Copy link

felipap commented Jul 31, 2023

Broken for me too, nothing shows up.

@mdoull-whereto
Copy link

I'm on apple silicon and it doesn't work at all. the only console output i see is under extension host

2023-08-03 10:37:55.559 [info] ExtensionService#_doActivateExtension kimuson.ts-type-expand, startup: false, activationEvent: 'onView:typeExpand'

@alexandroid
Copy link

Same issue (M1 Mac). I found logs in ~/.ts-type-expand/logs. They contain a bunch of network errors (presumably during VSCode startup?) and then internal server errors. I've unescaped the \t and \n for readability:

{
  "context": "ts-type-expand",
  "kind": "FAILED_TO_FETCH_SERVER_ACTIVATED",
  "level": "error",
  "message": "request to http://localhost:54334/trpc/isServerActivated failed, reason: connect ECONNREFUSED 127.0.0.1:54334",
  "stack": "TRPCClientError: request to http://localhost:54334/trpc/isServerActivated failed, reason: connect ECONNREFUSED 127.0.0.1:54334
  at TRPCClientError.from (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/out/extension.js:15979:12)
  at /Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/out/extension.js:16230:56
  at process.processTicksAndRejections (node:internal/process/task_queues:96:5)"
}
{
  "context": "ts-type-expand",
  "level": "error",
  "message": {
    "error": {
      "data": {
        "code": "INTERNAL_SERVER_ERROR",
        "httpStatus": 500,
        "path": "getTypeFromPos",
        "stack": "TRPCError: error: Error: Node is not defined
    at /Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:4962
    at HC.middlewares (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:618:122623)
    at d (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:179)
    at next (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:282)
    at n (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:618:121625)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async d (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:173)
    at async next (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:276)
    at async d (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:173)
    at async next (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:276)"
      },
      "meta": { "response": { "size": 0 } },
      "name": "TRPCClientError",
      "shape": {
        "code": -32603,
        "data": {
          "code": "INTERNAL_SERVER_ERROR",
          "httpStatus": 500,
          "path": "getTypeFromPos",
          "stack": "TRPCError: error: Error: Node is not defined
    at /Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:4962
    at HC.middlewares (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:618:122623)
    at d (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:179)
    at next (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:282)
    at n (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:618:121625)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async d (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:173)
    at async next (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:276)
    at async d (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:173)
    at async next (/Users/user1/.vscode/extensions/kimuson.ts-type-expand-1.0.4/node_modules/ts-type-expand-plugin/dist/index.js:627:276)"
        },
        "message": "error: Error: Node is not defined"
      }
    },
    "kind": "TRPC_SERVER_ERROR"
  }
}

@oliviervanbulck
Copy link

oliviervanbulck commented Aug 24, 2023

In the beginning, most of the time I got a message saying the extension was dead. Now it seems to work and is active, but I don't get any information in the ts-type-expand part. Anyone who knows why this is? I work in a next react project.

image

EDIT: In the logs I also find the "Node is not defined" errors, despite node being on my machine.

@TonyGravagno
Copy link

New user here on Windows, same experience as noted above. Only providing highlights. 😉

users\me.ts-type-expand\logs\extension ...
TRPC_SERVER_ERROR
FAILED_TO_FETCH_SERVER_ACTIVATED ... INTERNAL_SERVER_ERROR
{"kind":"ON_UPDATE_CONF","port":54334}}
{"kind":"START_TS_EXPAND_PLUGIN","port":54334}}
http://localhost:54334/trpc/isServerActivated failed
"path":"getTypeFromPos","stack":"TRPCError: error: Error: Node is not defined
kimuson.ts-type-expand-1.0.4
\node_modules\ts-type-expand-plugin
{"context":"ts-type-expand-plugin","level":"info","message":{"kind":"ON_UPDATE_CONF","port":60330}}
{"context":"ts-type-expand-plugin","level":"info","message":{"kind":"START_TS_EXPAND_PLUGIN","port":60330}}
{"context":"ts-type-expand","kind":"REQUEST_PLUGIN","level":"info","message":"configurePlugin","port":60330}

HTH

@AndreaPontrandolfo
Copy link

Same for me on MacOS. This extension used to work until some months ago, then stopped working.

@d-kimuson
Copy link
Owner

d-kimuson commented Aug 27, 2023

Sorry for the very long delay.
I have just released version 1.0.5, which includes a fix for this issue!

https://github.com/d-kimuson/ts-type-expand/releases/tag/1.0.5

Previously

I have an Apple Silicon Mac that works as expected

I wrote the above, but I was getting the same Node is not defined error (perhaps the VSCode version was not up-to-date?), so I have fixed this problem.
I will check the behavior on Windows (including WSL) and Ubuntu later, but I assume it has been fixed on other operating systems as well.

I'll leave the issue open to see how it goes, so if you continue to experience problems/resolutions, I'd appreciate your comments.

@d-kimuson
Copy link
Owner

PS: I have tested it on Windows(including WSL) and confirmed that it works correctly.

@TonyGravagno
Copy link

v1.0.5 looks good on Windows. Thank you! ... and Congratulations! 🎉

@senkenn
Copy link
Contributor

senkenn commented Sep 3, 2023

v1.0.5 also worked on Ubuntu22.04!

@viluMatilda
Copy link
Author

works on my M1 Pro as well! thank you for the great work :D

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