SAP / ui5-language-assistant

VSCode Extension and Editor Tooling for SAPUI5
Apache License 2.0
53 stars 25 forks source link

An error has occurred building context. #703

Closed pfiffab closed 2 months ago

pfiffab commented 3 months ago

When starting to edit view.xml files I receive the error message in the title. I can't seem to find any error messages from the plugin telling me what the issue is or where to look, can anyone help me out?

I have created a new Application with the generator so I don't think it's that. I am running on Node version 21.7.1 and UI5 Version 3.9.2.

MN-public commented 3 months ago

@pfiffab Could you please let us know what error message you see? Maybe make a screenshot?

pfiffab commented 3 months ago

Thanks for the quick response. My issue is that this is all I see. There is no mention or anything of where I can actually get a detailed error message. image

marufrasully commented 3 months ago

@pfiffab Thanks for reporting the issue.

Is it possible to share project? If not, please share information about which generator you used to created project.

What do you mean by UI5 Version 3.9.2.

pfiffab commented 3 months ago

Haven't uploaded the project anywhere yet as I just created it now. I created it with Application Generator -> SAP Fiori -> Basic -> None Data Source Everything else default.

I just ran ui5 --version in a terminal to get UI5 Version 3.9.2.

MN-public commented 3 months ago

@pfiffab Could you please also check and let us know the version of UI5 language assistant used in your environment and mention if you work in VSC or SAP BAS? We would also need the value of minUI5Version used in the manifest.json of your project.

JFYI: We had the similar issue in the past with some specific UI5 versions defined as minUI5Version, see https://github.com/SAP/ui5-language-assistant/issues/694, but it should be resolved in the latest releases of UI5 language assistant.

pfiffab commented 3 months ago

I work in VSC. UI5 Language Assistant Version: 4.0.56 The generator automatically set "minUI5Version": "1.122.1".

I will try a different minUI5Version maybe, once I get back.

pfiffab commented 3 months ago

The generator creates a manifest.json with minUI5Version of 1.122.1 but it seems like that does not work with UI5 language assistant. Changing the minUI5Version to 1.120.0 and everything worked fine. Should I close the issue or do you want to have a look at why the new version doesn't work?

marufrasully commented 3 months ago

@pfiffab context issue could be probably due to internet connection loading content over this link https://ui5.sap.com/1.122.1/test-resources/sap/ui/core/designtime/api.json Check if you have access to that link and correct content is loaded.

Can you please reload window and try again with version 1.122.1.

Furthermore, I will add logging logic to code when it fails to build context so that more debug info is averrable when such issue is faced.

Hope that helps and best regards

pfiffab commented 3 months ago

I can access the information in the link without issue but when switching minUI5Version back to 1.122.1 I receive the Context error again. Really weird. For now I can work with a lower minUI5Version, so thanks for the quick help :)

marufrasully commented 3 months ago

@pfiffab that is a good news that lower min UI5 version works fine. For UI5 version 1.122.1, let's check if correct content is downloaded and cached. Follow these steps

Change UI5 logging level to trace

Focus UI5 Output channel

search for globalstorage. Global storage path looks something like <other-path>/globalStorage/saposs.vscode-ui5-language-assistant/ui5-resources-cache/SAPUI5/1.122.1

Open 1.122.1 folder and check downloaded files. On my mac it is as follows 33.371.159 bytes (33,6 MB on disk) for 79 items If the size differ on your machine, please remove 1.122.1 folder and reload vscode.

Let me know if that solves issue with UI5 version 1.122.1

MN-public commented 2 months ago

@pfiffab As we did not hear back from you on this for a while, we assume it works for you with the steps outlined in https://github.com/SAP/ui5-language-assistant/issues/703#issuecomment-2039745765, so I'm closing the issue. If you still does not work for you, please feel free to reopen with the comment on the steps above