VS Code SAP Fiori tools error btoa is not defined

Published by Tobias Hofmann on

3 min read

When you try to develop a Fiori app with the SAP Fiori tools for VS Code you get the error “btoa is not defined”. This error is caused by another SAP extension: mobile Development Kit extension for Visual Studio Code. You have to disable the MDK extension to be able to use the SAP Fiori tools extension.

The incompatibility is already known in listed as an issue in GitHub. Let’s hope that the incompatibility between these two extension is solved soon. Many Fiori developers are also mobile developers and will have to be able to use both extensions.

In case you have the same issue and do not find the solution in GitHub, maybe the description here are helpful.

Steps to reproduce

Follow the SAP developers tutorial.

Run SAP Fiori tools and select an OData service.

Ein Bild, das Screenshot enthält.

Automatisch generierte Beschreibung
Ein Bild, das Screenshot enthält.

Automatisch generierte Beschreibung
800
Ein Bild, das Screenshot, Monitor enthält.

Automatisch generierte Beschreibung

Enter OData data source connection information.

Ein Bild, das Screenshot enthält.

Automatisch generierte Beschreibung

Click on login. This will trigger a login to the service. As basic authentication is used, the username and password are Base64 encoded (btoa is used for that).

Ein Bild, das Zeichnung enthält.

Automatisch generierte Beschreibung
Ein Bild, das Screenshot, haltend, Frau, sitzend enthält.

Automatisch generierte Beschreibung

You get an error message: btoa is not defined. Installing btoa in npm is not solving the issue.

Solution

Disable extension mobile Development Kit extension for Visual Studio Code.

See GitHub issue: https://github.com/SAPDocuments/Tutorials/issues/5358

This is only a workaround. The real solution – compatibility of both extensions – must be provided by the extension developer. Until then: happy updating.

A side effect after disabling the problem causing extension is that the SAP Fiori tools can show more available generators. If you install additional generators like CAP Project and that generator shows up, the Fiori tools will work just fine.

Ein Bild, das Screenshot, sitzend, Telefon enthält.

Automatisch generierte Beschreibung
Let the world know

Tobias Hofmann

Doing stuff with SAP since 1998. Open, web, UX, cloud. I am not a Basis guy, but very knowledgeable about Basis stuff, as it's the foundation of everything I do (DevOps). Performance is king, and unit tests is something I actually do. Developing HTML5 apps when HTML5 wasn't around. HCP/SCP user since 2012, NetWeaver since 2002, ABAP since 1998.

1 Comment

Éxodo – III: Configurando el entorno para VS Code | Panazea · September 24, 2020 at 09:07

[…] Se ha detectado un conflicto entre la extensión SAP Fiori tools – Extension Pack y extensión mobile Development Kit […]

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.