Known Issues¶
General Issues¶
-
You added an entry to the "Externals" array during app deployment for an imported module that is already installed in your custom branded client, however, when the app update is applied in your custom branded client, it failed with the module not found error and rolled back.
- Reason: This is because from Mobile Development Kit version 6.0 or newer, there's a change on how the NativeScript optimize the inclusion of external modules. Therefore, you must include the same Externals in the
MDKProject.json
of your custom branded client project, this will ensure your module is included in your custom branded client. - Solution: Add the same module in the "Externals" property array in the
MDKProject.json
of your custom branded client project and regenerate and rebuild your custom branded client.
- Reason: This is because from Mobile Development Kit version 6.0 or newer, there's a change on how the NativeScript optimize the inclusion of external modules. Therefore, you must include the same Externals in the
-
"Cannot use import statement outside a module" error when launching the app
- This error occurs when you have installed the NativeScript plugins to your custom client. You will encounter the following error:
mdk.trace.app: Error: SyntaxError: Cannot use import statement outside a module SyntaxError: Cannot use import statement outside a module
and the app fails to launch. - It is due to those plugins that have migrated to use the
@nativescript/core
import for compatibility with the latest NativeScript 7.0 runtime, which is yet to be supported by Mobile Development Kit. - Solution: install the previous version of the plugins that have not yet migrated to use the
@nativescript/core
import. -
If you are using
NSPlugins
in theMDKProject.json
, you can specify the version number for example."NSPlugins":["nativescript-some-plugin@2.1.0"]
- This error occurs when you have installed the NativeScript plugins to your custom client. You will encounter the following error:
-
The command
tns run ios
failed after upgrading to Xcode 12 or newer (iOS platform only)- Getting an error such as
"Unable to apply changes on device: 0A1B2C3D4-AA11-BB22-4818-1234567890AB. Error is: ENOENT: no such file or directory, scandir '/Users/JohnDoe/Library/Developer/CoreSimulator/Devices/0A1B2C3D4-AA11-BB22-4818-1234567890AB/data/Applications'."
- Solution: Create the missing folder by executing
mkdir
e.g.mkdir /Users/JohnDoe/Library/Developer/CoreSimulator/Devices/0A1B2C3D4-AA11-BB22-4818-1234567890AB/data/Applications
and then re-execute thetns run ios
command.
- Getting an error such as
23.8.0¶
Compilation of Extension's NativeScript Plugin Failed¶
Problem¶
When compiling your Extension's NativeScript Plugin using version 23.8 or newer, you may encounter the following error:
plugins/extension-MyPlugin/MyControl.android.ts(7,12): error TS2610: 'nativeView' is defined as an accessor in class 'View', but is overridden here in 'MyControl' as an instance property.
Reason¶
The latest NativeScript version (8.5.3 or newer) expects accurate TypeScript syntax to be provided. In the above example, a variable that's defined as an accessor
type in the base class is being overridden in your class as an instance property
.
Solution¶
There are a few options to solve this depending on your use case:
- Rename the variable (e.g. from
nativeView
to_nativeView
) - Change the variable to match the type too (e.g. change it to accessor type)
- Remove the variable if you are not intending to override it (you can still access the one in the base class)
e.g.
From:
export class MyControl extends View {
public nativeView: any;
....
Change to:
// Rename the property name
export class MyControl extends View {
public _nativeView: any; // And change any reference to this new name too.
....
Or change to:
// Change to match accessor type if you are really intending to override the accessor
export class MyControl extends View {
get nativeView(): any {
return this.xyzView;
}
set nativeView(value: any) {
this.setNativeView(value);
}
....
6.0.0¶
- Release version of Android application crashes on launch.
- This is caused by configuration in
webpack.config.js
which is not compatible with release version for the Android. - This issue is fixed in Mobile Development Kit 6.0.1 patch or newer.
- This is caused by configuration in
5.2.0¶
-
Android application crashes if there is a mismatch of MultiUser flag between client and server.
- Application would crash if “Allow Upload of Pending Changes from Previous User” is unchecked in SAP Mobile Services cockpit and the app is in MultiUser mode i.e in
BrandedSettings.json
ifMultiUserEnabled = true
. - Ensure to enable the flag “Allow Upload of Pending Changes from Previous User” for the corresponding app in the SAP Mobile Services cockpit, else multi user functionality will not work and lead to such a crash.
- Application would crash if “Allow Upload of Pending Changes from Previous User” is unchecked in SAP Mobile Services cockpit and the app is in MultiUser mode i.e in
-
Custom Styling via LESS file is not applied.
- If your app only has a single LESS file and this LESS doesn't have '.light' or '.dark' suffix, the styling will not be applied as expected.
- Workaround: Create another copy of your LESS file in the Styles folder with
.light
suffix or rename your LESS file with.light
suffix.- If you have
MyStyles.less
, then create a copy with the following name or rename the file toMyStyles.light.less
- If you have
- This issue is fixed in Mobile Development Kit 5.2.1 patch or newer.
5.1.0¶
-
tns
commands failed to find iOS devices in macOS Big Sur.- After upgrading to macOS Big Sur,
tns
commands such astns devices
ortns run ios --device abx-xyz
failed to detect connected iOS devices. - This is a bug in the NativeScript command line tool.
-
As a workaround:
-
Identify the following file at the location where NativeScript command line tool is installed:
~/.nvm/versions/node/<NODE_VERSION>/lib/node_modules/nativescript/lib/common/validators/iTunes-validator.js
- For example, Mobile Development Kit 4.3.4, 5.0.1 or newer versions require
Node
version 12.18.4, so it should be available in~/.nvm/versions/node/v12.18.4/lib/node_modules/nativescript/lib/common/validators/iTunes-validator.js
- You can check the current node version that you are using by executing the command
node --version
in the terminal.
-
Search for the following lines:
if (!this.isiTunesInstalledCore(coreFoundationDir, mobileDeviceDir)) { return ITunesValidator.NOT_INSTALLED_iTUNES_ERROR_MESSAGE; }
-
And commented it out, e.g.
if (!this.isiTunesInstalledCore(coreFoundationDir, mobileDeviceDir)) { // return ITunesValidator.NOT_INSTALLED_iTUNES_ERROR_MESSAGE; }
-
To find your device ID without
tns devices
command, you can find it in Xcode: Window > Devices and Simulators > Devices tab > Select your connected device > Identifier field in the device details is your device ID.
-
- After upgrading to macOS Big Sur,
-
Attachment Form Cell - Attaching photo from the photo library failed only if the Selected Photos access permission is given by the user (iOS platform only)
- After the user provides the "Selected Photos" access to the app and then on selecting one of the permitted photos, the attachment failed to show up the Attachment Form Cell control.
- This is a known issue and would be fixed in the upcoming Mobile Development Kit patch.
5.0.0¶
- Onboarding QR Code Scanner not working in a certain condition in iOS 14.0.1 (iOS platform only)
- When starting the onboarding scan for the first time, if user chooses to give "Camera" and "Photos" access permission, in a certain condition, the QR code scanner is no longer working.
- This happens only in a certain situation and might not affect all devices.
- This is related to iOS 14 changes on how "Photo" permission is requested.
- Workaround: Give camera permission and deny photo permission.
- Search field bar code scanner is not working with Side Drawer (iOS platform only)
- When a Side Drawer page is used as the app's main page, bar code scanner in search field is no longer showing up when pressed.
- No workaround at the moment.
- Previewing web client app in SAP Web IDE gives HTTP 404 error
- When previewing a web client app by running the
index.html
in themetadata/<YourProjectName>
folder ofMDKWebpackFactory
project in SAP Web IDE workspace,HTTP Status 404 – Not Found
error is displayed. - Workaround: Remove the
metadata/<YourProjectName>/
path from the preview URL generated by SAP Web IDE.
- When previewing a web client app by running the
4.2.0¶
- Content-Length Header Stripped Out (Android platform only)
- When using
CreateMedia
/CreateRelatedMedia
/UploadStream
OData action to upload a media to online back-end service, ifContent-Length
is set to the action'sHeaders
property, theContent-Length
will be stripped out ignored and the setting will not send to the back-end service. - Upgrade to the Mobile Development Kit 4.2.6 or newer release.
- When using
- In-App QR code scanner
- Users onboarding to an app for the first time can now use an in-built QR code scanner provided with the client. For successive onboarding such as onboarding to another app while already onboarded into client this feature cannot be used.
- Upgrade to Mobile Development Kit 4.3 or newer, or use a third party QR code scanner app.
- Chart Card Collection
- In Android order of the data series rendering does not follow the order specified in metadata. For example if the metadata has the 4 different data sets say for year 2017, 2018, 2019, 2020. While rendering the order of the plot would change to 2018, 2017, 2020, 2019.
- There is currently no workaround for this issue.
- Chart Content Section
- In Android mismatch in size of data sets would lead to crash. For example if
Data
array has 2 data sets one with 6 values and second with 3 values then on-click of chart plot would result in crash. - Workaround for this issue is to pad second data set with 3 additional zeros.
- In Android mismatch in size of data sets would lead to crash. For example if
4.1.2¶
- NativeScript CLI tool 6.3.3 caused the following issues:
- Running client via
tns run ios --emulator
from command line will automatically attach a debugger, this will cause crash if you try to attach a debugger via Visual Studio Code.- Solution A: Execute the command with
--no-hmr
e.g.tns run ios --emulator --no-hmr
- Solution B: Launch and debug the app via
MDK
Launch on iOS in Visual Studio Code
- Solution A: Execute the command with
- While
tns run ios --emulator
(or--device
) command is running and watching for file changes, if your local metadata project is changed, bundled and deployed to the local client's app folder, thetns watcher
will no longer reload the app automatically.- Solution A: Execute the command with
--no-hmr
e.g.tns run ios --emulator --no-hmr
(ortns run ios --device xyz --no-hmr
) command. - Solution B: Stop and re-run
tns run ios --emulator
(or--device
) command.
- Solution A: Execute the command with
- Running client via