getappmap / vscode-appland

AppLand extension for VSCode
MIT License
142 stars 16 forks source link

AppMaps over 50 MiB cannot be opened in the extension #407

Closed dividedmind closed 2 years ago

dividedmind commented 2 years ago

This is due to an intentional limitation in VSCode custom text editor interface, cf. https://github.com/microsoft/vscode/issues/111849

We don't really need to use that interface; indeed, custom (not text) editor is a better fit anyway to what we're doing (in particular, not editing; see documentation). The extension should instead use the CustomEditor interface.


Original report:

Another question happened:

the AppMap plugin (version : 0.29.1) in vscode is broken when I try to open the generated file. It shows :

Assertion Failed: argument is undefined or null.

Is there any way I can print the debug log and send it to you to fix?

Originally posted by @ericinfins in https://github.com/applandinc/appmap-python/issues/158#issuecomment-1162570303

ericinfins commented 2 years ago

Error messages in vscode are:

ERR The "path" argument must be of type string. Received undefined: TypeError: The "path" argument must be of type string. Received undefined at new NodeError (node:internal/errors:371:5) at validateString (node:internal/validators:119:11) at Object.join (node:path:1172:7) at provideCompletionItemsInternal (/Users/eliu/.vscode/extensions/shamanu4.django-intellisense-0.0.2/out/suggest.js:46:36) at Object.provideCompletionItems (/Users/eliu/.vscode/extensions/shamanu4.django-intellisense-0.0.2/out/suggest.js:84:20) at ie.provideCompletionItems (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:143269) at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:168258 at te._withAdapter (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:158424) at te.$provideCompletionItems (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:168233) at s._doInvokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:86:13828) at s._invokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:86:13512) at s._receiveRequest (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:86:12121) at s._receiveOneMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:86:10843) at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:86:8949 at g.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:58:145) at b.deliver (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:58:2265) at v.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:58:1843) at a.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:66:19025) at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:102:34863 at g.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:58:145) at b.deliver (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:58:2265) at v.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:58:1843) at a.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:66:19025) at r._receiveMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:66:23606) at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:66:21140 at g.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:58:145) at b.deliver (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:58:2265) at v.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:58:1843) at v.acceptChunk (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:66:15856) at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:66:14986 at Socket.R (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:102:13798) at Socket.emit (node:events:390:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) at Socket.Readable.push (node:internal/streams/readable:228:10) at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)

ERR Error: Assertion Failed: argument is undefined or null at i (workbench.desktop.main.js:70:8350) at Vn.resolve (workbench.desktop.main.js:2749:93457) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Pa.setInput (workbench.desktop.main.js:1753:77551) at async doSetInput (workbench.desktop.main.js:2722:6429) at async doOpenEditor (workbench.desktop.main.js:2722:4791) at async d.openEditor (workbench.desktop.main.js:2722:3783) at async workbench.desktop.main.js:2925:16970 at async workbench.desktop.main.js:3059:68381

kgilpin commented 2 years ago

Note that you can open Developer Tools from the VSCode menu and you’ll get a Chrome Inspector - there you can see various JS console output

On Wed, Jun 22, 2022 at 12:36 PM Rafał Rzepecki @.***> wrote:

Another question happened:

the AppMap plugin (version : 0.29.1) in vscode is broken when I try to open the generated file. It shows :

Assertion Failed: argument is undefined or null.

Is there any way I can print the debug log and send it to you to fix?

Originally posted by @ericinfins https://github.com/ericinfins in applandinc/appmap-python#158 (comment) https://github.com/applandinc/appmap-python/issues/158#issuecomment-1162570303

— Reply to this email directly, view it on GitHub https://github.com/applandinc/vscode-appland/issues/407, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVC6426VTYESPTB566JR3VQM6JVANCNFSM5ZQ4YRXQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

dividedmind commented 2 years ago

Thanks @ericinfins , this is very helpful! We've seen this problem before but couldn't reproduce it. Sorry it happened to you too, but now that I can reproduce it I'll fix it and let you know. :)

dividedmind commented 2 years ago

Hi @ericinfins , just a quick update: the problem appears to be caused solely by the AppMap size. We're working on a fix, but in the meantime try to prune your appmap for example by excluding some less interesting packages or classes from recording in the appmap.yml file.

ericinfins commented 2 years ago

Now I can open it after changing the setting in appmap.yml. Thanks a lot!

dividedmind commented 2 years ago

I'm glad it helped! BTW, here's a doc that has some tips on making leaner AppMaps: https://appland.com/docs/reference/refine-appmaps.html

appland-release commented 2 years ago

:tada: This issue has been resolved in version 0.31.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

ericinfins commented 2 years ago

I'm glad it helped! BTW, here's a doc that has some tips on making leaner AppMaps: https://appland.com/docs/reference/refine-appmaps.html

Hi @dividedmind , I can't use the stats command for your cli.

I see this line: Once you’ve made a recording of a use-case, you can use the stats subcommand of the AppMap CLI

But the stats subcommand I can't see it in your client cli. Could you let me know how to use it? Thanks.

image

npx @appland/appmap --version 3.29.4

kgilpin commented 2 years ago

Hi, sorry this is a bit confusing but it’s actually a different CLI:

https://github.com/applandinc/appland-cli

We need to port the stats command to the JS cli but we haven’t yet.

On Tue, Jun 28, 2022 at 7:44 PM zhenyu (Eric) Liu @.***> wrote:

I'm glad it helped! BTW, here's a doc that has some tips on making leaner AppMaps: https://appland.com/docs/reference/refine-appmaps.html

Hi @dividedmind https://github.com/dividedmind , I can't use the stats command for your cli.

I see this line: Once you’ve made a recording of a use-case, you can use the stats subcommand of the AppMap CLI https://appland.com/docs/reference/appmap-client-cli.html

But the stats subcommand I can't see it in your client cli. Could you let me know how to use it? Thanks.

[image: image] https://user-images.githubusercontent.com/102937168/176322351-42e6fb89-ae80-4020-85d2-b084d64ea003.png

— Reply to this email directly, view it on GitHub https://github.com/applandinc/vscode-appland/issues/407#issuecomment-1169391837, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVC6ZSJYWQO4WKKOTPWATVROE7JANCNFSM5ZQ4YRXQ . You are receiving this because you modified the open/close state.Message ID: @.***>

ericinfins commented 2 years ago

Hi @kgilpin , now I can use it with this CLI. I think you can specify this project link in the document to make it more clear. :D Thanks! All the best!