cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Fiori Tools: error loading webview

htammen
Active Contributor
0 Likes
2,910

I've installed Fiori Tools in my local VS Code installation.
When I run "Fiori: Open Application Generator" from the Command Palette I get this error:

Error loading webview: Error: Could not register service workers: 
InvalidStateError: Failed to register a ServiceWorker:
The document is in an invalid state..

Installed Fiori Tools
version: v1.5.2
Last updated: 2022-03-17

Any suggestions?

Thanks Helmut

Accepted Solutions (0)

Answers (4)

Answers (4)

dustin_self2
Participant
0 Likes

I had the same problem. So I un-installed application wizard....re-started vscode, re-installed the application wizard, and restarted vscode...and it all of the sudden started working. When you initially open the "application generator", you have to be patient and let it install the "template wizard".

Thanks,

Dustin

IanQuigley
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Helmut,

Thanks for the extensive information. It's a strange one, and it looks like the Application Wizard is not installed successfully in your VSCode environment. The application wizard is a VSCode extension from SAP that should be a wrapper for any Yeoman generators that are installed locally (including the Fiori generator). For some reason, there's an error on startup with it.

Can I suggest that you uninstall the Application Wizard and re-install it? In the extensions view in VSCode you should be able to uninstall it, and then search for it again in the Marketplace to re-install it. I'll also ask the development team for the Application Wizard to comment here to see if they can support you.

Thanks

Ian

htammen
Active Contributor
0 Likes

Things become strange now.

As you suggested I deinstalled the application wizard.
When I, after a restart of VS Code, go to the marketplace and click any Extension I get this strange error. I havn't even clicked the "install" button, just clicked on the extension in the list view.

I guess my environment is the problem but I have no idea where to start the search.

Thanks so far
Helmut

IanQuigley
Product and Topic Expert
Product and Topic Expert
0 Likes

Thanks Helmut,

Sorry it's not yet resolved. Can you please confirm what is happening when you launch the Application Wizard in VSCode? That is, view -> Command Palette... -> Open Template Wizard.

This should show you all the installed generators - is the Fiori generator showing up as an installed generator there?

In order to see the logs of the Application Wizard, please open VScode settings -> preferences and search for 'Wizard'. You will then be able to update the Application Wizard Logging Level to 'Debug'. After this, you will able to see any log messages in the "Output" tab under the "Application Wizard" dropdown.

Regards,

Ian

htammen
Active Contributor
0 Likes

Hi Ian,

thanks for your support.

When I "Open Template Wizard" I get the following error:

Error loading webview: Error: Could not register service workers: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..

The log does not give any valuable information

{ "label": "Application Wizard", "level": "info", "message": "Start Logging in Log Level: <debug>", "time": "2022-03-24T12:34:06.010Z"}{ "label": "Application Wizard", "level": "info", "message": "Full Logs can be found in the </home/helmut/.config/Code/logs/20220324T133359/exthost1/SAPOS.yeoman-ui> folder.", "time": "2022-03-24T12:34:06.012Z"}{ "label": "Application Wizard", "level": "info", "message": "SAP Web Analytics tracker was created for ApplicationWizard", "time": "2022-03-24T12:34:06.013Z"}

I also had a look at the mentioned Full logs directory and found no error. The attached file is the zipped content of the logs folder vs-code-log.txt
Please rename it to .zip and extract it for further investigation.

Thanks and best regards
Helmut

IanQuigley
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello Helmut,

That is a strange error :(, not sure what that means. Can you please validate that you have the Fiori generator installed? If you execute "view -> Command Palette... -> Open Template Wizard", this will show you all the generators that you have installed, please ensure the Fiori generator is in this list?

Can you restart VSCode to be sure it's not something that is cached? Otherwise, it may be that the Fiori generator did not install correctly. You can re-install it by doing the following:

- Open a terminal in VSCode

- Type `npm uninstall -g @sap/generator-fiori`. This should uninstall the generator.

- Type `npm install -g @sap/generator-fiori` to reinstall the generator.

Regards,

Ian

htammen
Active Contributor
0 Likes

Hi Ian,

that didn't solve the problem. I can run the generator from yeoman but not from VS Code.

Here ist my environment:
VS Code

Version: 1.65.2
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T15:36:26.048Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.11.0-46-generic snap

npm version: 8.4.0

Any other ideas? How can I view the log?

Thanks Helmut