iljapostnovs / VSCodeUI5Plugin

Visual Studio Code Extension for UI5 Development
Apache License 2.0
61 stars 6 forks source link

Refering to #390: Can't get Plugin work #391

Closed alschinnen closed 7 months ago

alschinnen commented 9 months ago

Hi, the problem is that I cannot really provide something reproduceable if I don't know what the problem is. I never got it run and thought it must be my VPN connection. But the issue even exists without VPN. I recently uninstalled it, cleared the caches and just reinstalled it under VSCode's extensions. image image That's it.

My OS is Windows 10, VS Code version is this: image

My workspace is like Workspace, Folder(s), SAPUI5 Projects in subfolders: image It doesn't work in any of my projects. Here is an example package.json and neo-app.json and a part of manifest.json. neo-app.json package.json image

The settings are pretty much the ones it has by default, except for the SAPUI5 version 1.71.60: image image image image image

Maybe it is incompatible with other extensions. Here are the installed ones, some I deactivated. image image image image image

I found this in the Windows log in VSCode. Does the plugin scan all XML files of all projects and their fragments during startup? I've got a lot of projects and XML views in my workspace.

[2023-12-12 16:06:06.864] [renderer1] [error] [Extension Host] RangeError: Maximum call stack size exceeded at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546619) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657) at c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546685 at Array.forEach () at d.getFragmentsInXMLFile (c:\Users\US15223.vscode\extensions\iljapostnovs.ui5plugin-0.14.35\dist\extension.js:2:546657)

image

Thanks and best regards Alex

iljapostnovs commented 9 months ago

Hi,

Well, I can't tell anything for sure if I can't reproduce the issue as well. Looks like something goes into endless recursion, according to the log you sent, I can only guess that maybe you have included e.g. Fragment1 in Fragment2, and Fragment2 in Fragment1 and it went into recursion, but again, I can't tell anything if I can't reproduce it. Anyway, it is somehow related to the project and if my previous statement is not true, I will need minimal project example in order to reproduce and debug the issue, otherwise I will not be able to help.

alschinnen commented 9 months ago

Hi,

I've now got 2 projects, one where your plugin works, one where it does not. The projects only differ in the webapp\SelScreen.js. But that js-file alone is not the issue, looks like it is the combination of several things, probably the many fragments we use in this project. In other, smaller projects it doesn't cause anything.

Hope it is reproduceable on your end, too. Below is the log again for the erroneous project.

Thanks Alex ui5_test_not_ok.zip ui5_test_ok.zip

[2023-12-18 17:53:51.752] [exthost] [info] Extension host with pid 14404 started [2023-12-18 17:53:51.752] [exthost] [info] Skipping acquiring lock for c:\Users\US15223\AppData\Roaming\Code\User\workspaceStorage\f08991cb76e9f699a1ce91a9f9468db5. [2023-12-18 17:53:51.971] [exthost] [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:javascript' [2023-12-18 17:53:51.994] [exthost] [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication, startup: false, activationEvent: 'onAuthenticationRequest:microsoft' [2023-12-18 17:53:52.029] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: true, activationEvent: '' [2023-12-18 17:53:52.036] [exthost] [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '', root cause: vscode.git [2023-12-18 17:53:52.053] [exthost] [info] ExtensionService#_doActivateExtension vscode.ipynb, startup: true, activationEvent: '' [2023-12-18 17:53:52.059] [exthost] [info] ExtensionService#_doActivateExtension donjayamanne.githistory, startup: true, activationEvent: '' [2023-12-18 17:53:52.089] [exthost] [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: true, activationEvent: '', root cause: GitHub.vscode-pull-request-github [2023-12-18 17:53:52.107] [exthost] [info] ExtensionService#_doActivateExtension iljapostnovs.ui5plugin, startup: true, activationEvent: '' [2023-12-18 17:53:52.123] [exthost] [info] ExtensionService#_doActivateExtension SAPOSS.app-studio-toolkit, startup: true, activationEvent: '', root cause: SAPOS.yeoman-ui [2023-12-18 17:53:52.172] [exthost] [info] ExtensionService#_doActivateExtension SAPOSS.vscode-ui5-language-assistant, startup: true, activationEvent: '' [2023-12-18 17:53:52.526] [exthost] [info] ExtensionService#_doActivateExtension SAPSE.sap-ux-application-modeler-extension, startup: true, activationEvent: '' [2023-12-18 17:53:53.153] [exthost] [info] ExtensionService#_doActivateExtension SAPSE.sap-ux-help-extension, startup: true, activationEvent: '' [2023-12-18 17:53:53.959] [exthost] [info] ExtensionService#_doActivateExtension SAPSE.sap-ux-service-modeler-extension, startup: true, activationEvent: '' [2023-12-18 17:53:54.384] [exthost] [info] ExtensionService#_doActivateExtension vscode.npm, startup: true, activationEvent: 'workspaceContains:package.json' [2023-12-18 17:53:55.750] [exthost] [error] Activating extension iljapostnovs.ui5plugin failed due to an error: [2023-12-18 17:53:55.750] [exthost] [error] Couldn't initialize plugin: "Maximum call stack size exceeded" [2023-12-18 17:54:00.368] [exthost] [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '' [2023-12-18 17:54:00.393] [exthost] [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '' [2023-12-18 17:54:00.402] [exthost] [info] ExtensionService#_doActivateExtension GitHub.vscode-pull-request-github, startup: true, activationEvent: '' [2023-12-18 17:54:00.424] [exthost] [info] ExtensionService#_doActivateExtension SAPOS.yeoman-ui, startup: true, activationEvent: '*' [2023-12-18 17:54:00.531] [exthost] [info] ExtensionService#_doActivateExtension vscode.configuration-editing, startup: false, activationEvent: 'onLanguage:jsonc' [2023-12-18 17:54:00.536] [exthost] [info] ExtensionService#_doActivateExtension vscode.json-language-features, startup: false, activationEvent: 'onLanguage:jsonc' [2023-12-18 17:54:04.662] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onStartupFinished' [2023-12-18 17:54:04.672] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished' [2023-12-18 17:54:04.678] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-wsl-recommender, startup: false, activationEvent: 'onStartupFinished' [2023-12-18 17:54:04.692] [exthost] [info] ExtensionService#_doActivateExtension carlosorozcojimenez.ui5-tools, startup: false, activationEvent: 'onStartupFinished' [2023-12-18 17:54:05.564] [exthost] [info] ExtensionService#_doActivateExtension dbaeumer.vscode-eslint, startup: false, activationEvent: 'onStartupFinished' [2023-12-18 17:54:05.578] [exthost] [info] ExtensionService#_doActivateExtension formulahendry.code-runner, startup: false, activationEvent: 'onStartupFinished' [2023-12-18 17:54:05.642] [exthost] [info] ExtensionService#_doActivateExtension jacek-wozniczak.vscode-ui5-api-reference, startup: false, activationEvent: 'onStartupFinished' [2023-12-18 17:54:07.628] [exthost] [info] Eager extensions activated

iljapostnovs commented 8 months ago

Hi,

Thanks for the example, I have debugged it and the issue was as I previously stated: fragment is referring to itself

<!--<core:Fragment fragmentName="monitor.view.fragments.SelectDialog" type="XML"/>-->

I will add a check that the refering to itself should not be in the comments, but meanwhile you can remove it and everything will work.

alschinnen commented 8 months ago

Hello, yes, it's working now. Thanks a lot. I'll leave the GIT# open in case you want to add anything. Thanks Alex

iljapostnovs commented 7 months ago

Please check if latest version (1.16.6) works for you.

alschinnen commented 7 months ago

I no longer get this issue with the new version. Thanks a lot.