Skip to content


Overview of common issues.

The Specified Key for the New Entity Is a Duplicate of an Existing Entity

Problem: When creating an entity, you might encounter the error message: Create entity failure – Error: [-10103]. The specified key for the new entity is a duplicate of an existing entity.

Workaround: When you are creating an entity, there will always be a unique key for that entity. Depending on your service, it may automatically assign the key when you create the entity or it may want the client to provide the key. If the back-end is assigning keys and you are offline, then you need to provide a unique local key for offline use until you sync with the back-end. It could be that you are specifying the same id value for each create, which the offline store reports as a key conflict. You may need to write a rule to generate a local unique key for use when creating entities.

Create Entity Failure With 500 Internal Server Error

Problem: Creating a record from Postman, it works fine but from Mobile Development Kit app, you encounter the error message:

code: 500, message: internal Server Error

Workaround: An error 500 indicates the back-end server had a problem processing the request. In such scenarios, check the logs of the back-end for additional information. Also, to better troubleshoot the issue, it is recommend to turn on Mobile Network Trace to capture exactly what the Mobile Development Kit client is sending to the back-end. You may need to add this feature to your application in mobile services if it is not listed. For example: using that trace, you might see that the following is being sent by Mobile Development Kit client for the create entity.

"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"@odata.type\":\"#CatalogService.Products\",\"ID\":101,\"name\":\"Printer\"}" },

In the above example, the root cause is that the back-end is not properly handling @odata.type property and should to be updated to be OData compliant. You can work around this in your Mobile Development Kit application. Log in to SAP Business Application Studio or SAP Web IDE and navigate to your Mobile Development Kit application that was generated from the CRUD template.

  • Expand the Services folder and double click on the .service file for your application.
  • Choose > before Service Options to expand the list of options.
  • Check the box for requiresType and leave the drop-down value set to False.
  • Save your service definition.
  • Deploy and activate your change and test on your device.

This should allow your create or update to process from Mobile Development Kit.

No Usable Data Found

Problem: While scanning the on-boarding QR code on iOS device, you encounter the error message: No Usable data found

Workaround: The No usable data found message will occur on iOS if there are no applications installed on the device that can handle the URL scheme in the QR code. Have you installed the mobile services Client from the Apple App Store on your device already? If yes, did you change the URL Scheme from the default sapmobilesvcs value in the Onboarding dialog? The App Store client expects the URL Scheme to be sapmobilesvcs so please confirm this is the value used.

Could Not Find Module 'SAPMDC' for Target 'x86_64-apple-ios-simulator'; found: arm64

Problem: While running tns run ios --emulator, you may encounter the error message: Could not find module 'SAPMDC' for target 'x86_64-apple-ios-simulator'; found: arm64

Workaround: It could be that when your ran create client you would have specified a device instead of a simulator. Try recreating your client and pick a simulator for the client type.

Authentication Failed. Please Try Again. The Newly Acquired or Refreshed Token Got Rejected

Problem: In Mobile Development Kit client, you encounter the below error message during on-boarding: Authentication failed. Please try again. OAuth2Error.tokenRejected: The newly acquired or refreshed token got rejected

Workaround: Check your connection settings. If your client id is incorrect or there are issues in the URLs that might explain the error.

Unable to Build Release APK Without Signing Keystore

Problem: Tried to generate unsigned release APK file for Android, but tns run android --release requires signing keystore.

Workaround: It's not possible to do that with TNS CLI, NativeScript does not support that. But there's a workaround:

  1. Go to your <generated-app>/platforms/android/app/build.gradle
  2. Find signingConfig signingConfigs.release and change it to signingConfig null
  3. In the command line or terminal navigate to: /platforms/android/ and execute the following:
./gradlew assembleRelease -Prelease

Once completed, you can find the unsigned apk at <generated-app>/platforms/android/build/outputs/apk/release/app-release-unsigned.apk

Custom Client Build Failed With ID: Framework Not Found MDFInternationalization error

Problem: Branded client built via tns build ios or tns run ios or via Xcode is failing with ld: framework not found MDFInternationalization error.

Cause: Your client has overridden the build.xcconfig in .mdkproject/App_Resources/iOS/build.xcconfig and it's missing IPHONEOS_DEPLOYMENT_TARGET property.


  1. Go to your target MDKClient SDK folder and go to: App_SDK/template/app/App_Resources/iOS/build.xcconfig.
  2. Look for IPHONEOS_DEPLOYMENT_TARGET = XX.X XX.X is the target version number. For example, IPHONEOS_DEPLOYMENT_TARGET = 12.0
  3. Copy that and add that to your build.xcconfig in your .mdkprojectfolder.
  4. Re-generate your project via the create client command.

Xcode Build Failed With ID: Framework Not Found MDFInternationalization error

Problem: Your project build is still ailing in Xcode with ld: framework not found MDFInternationalization error. and you already have IPHONEOS_DEPLOYMENT_TARGET in your build.xcconfig or have not previously modified build.xcconfig

Cause: You may have opened .xcodeproj instead of .xcworkspace in the platforms/ios folder.


  1. Close the current Xcode window that opened the .xcodeproj
  2. Open the .xcworkspace

Custom Client Build Failed With 'MaterialMath.h' File Not Found Error

Problem: Branded client built via tns build ios or tns run ios is failing with the following errors or similar errors:

/Users/JohnDoe/Downloads/MDKCLNT02P_3-80005072/MDKClient_SDK/MyMDKApp/platforms/ios/Pods/MaterialComponents/components/Elevation/src/UIColor+MaterialElevation.m:19:9: fatal error:
'MaterialMath.h' file not found
#import "MaterialMath.h"
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description

Unable to apply changes on device: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. Error is: Comman

Cause: One or more Pods components' cache are corrupted. Pods dependencies are usually installed from cache if available. So, it's likely caused by a badly cached dependency (interrupted or incomplete installation of that dependency previously). The cache can be found in ~/Library/Caches/CocoaPods

Solution: Option 1: Executing the following command in the terminal: pod cache clean should clean the cache and allow the pod dependency to be re-installed in the next try.

pod cache clean MaterialComponents

Option 2: Delete the CocoaPods folder in ~/Library/Caches/. This will force all of the Pods dependencies to be downloaded and installed as fresh. Re-run the tns build ios or tns run ios command.

Loading Message Displays While Running Mobile Development Kit Dependency Installer on Windows Machine

Problem: Mobile Development Kit Dependency installer on Windows Machine gets stuck in loading.

Workaround: This issue can be due to Security Policy. If permitted, execute the following command in Power Shell window and then try to run the dependency installer again:

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser

Alternatively, you can also try the following if the previous method does not work:

  1. Open PowerShell (as administrator, if possible)
  2. cd to <MDK_SDK folder>/MDK Dependencies Installer-win32-ia32/resources/app/cli/
  3. Run the command:

    sh powershell -file main.ps1 check

Last update: September 27, 2021