cancel
Showing results for 
Search instead for 
Did you mean: 

Error on creating Custom Mobile Development Kit Client Using MDK SDK for Android

Padmindra
Explorer
0 Kudos

Hello SAP experts,

I getting the error for creating the custom mobile development kit client using MDK SDK for andorid.

Currently I am following this tutorial to setup the client:

Build Your Mobile Development Kit Client Using MDK SDK | Tutorials for SAP Developers

Errors :

C:\MDK\MDKClient_SDK\dynamicApp>tns run android --emulator

Searching for devices...

Preparing project...

webpack is watching the files...

resolving "./MDKAndroidActivity.ts" to "./MDKAndroidActivity.android.ts"

resolving "./app.css" to "./app.android.css"

resolving "./storage/Paths.ts" to "./storage/Paths.android.ts"

modules info size: 975

(node:24400) [DEP_WEBPACK_MODULE_ID] DeprecationWarning: Module.id: Use new ChunkGraph API

modules info saved: C:\MDK\MDKClient_SDK\dynamicApp\platforms\android\app\src\main\assets\app\modulesinfo.json

assets by path fonts/ 1.6 MiB 10 assets

assets by path *.js 14.2 MiB

asset vendor.js 13.4 MiB [compared for emit] (name: vendor) (id hint: defaultVendor)

asset bundle.js 556 KiB [compared for emit] (name: bundle)

asset app_lifecycleManagement_AppExtractWorker_ts-_package_json.js 108 KiB [compared for emit]

asset runtime.js 87.2 KiB [compared for emit] (name: runtime)

asset default.js 9.6 KiB [compared for emit] [from: app/default.js] [copied]

asset application.js 4.5 KiB [compared for emit] (name: application)

assets by path branding/ 11.6 KiB

assets by path branding/*.template 4.79 KiB

asset branding/BrandedSettings.json.template 2.48 KiB [compared for emit] [from: app/branding/BrandedSettings.json.template] [copied]

asset branding/Overrides.json.template 2.31 KiB [compared for emit] [from: app/branding/Overrides.json.template] [copied]

asset branding/OnboardingCustomizations.sample 4.36 KiB [compared for emit] [from: app/branding/OnboardingCustomizations.sample] [copied]

asset branding/BrandedSettings.json 2.45 KiB [compared for emit] [from: app/branding/BrandedSettings.json] [copied]

asset mdkProject/MDKProjectSettings.json 29 bytes [compared for emit] [from: app/mdkProject/MDKProjectSettings.json] [copied]

Entrypoint bundle 14.1 MiB = runtime.js 87.2 KiB vendor.js 13.4 MiB bundle.js 556 KiB

Entrypoint application 91.7 KiB = runtime.js 87.2 KiB application.js 4.5 KiB

runtime modules 50.5 KiB 27 modules

orphan modules 356 bytes [orphan] 6 modules

modules by path ./node_modules/ 4.66 MiB

javascript modules 4.4 MiB 900 modules

json modules 274 KiB

modules by path ./node_modules/mdn-data/css/*.json 242 KiB 3 modules

modules by path ./node_modules/css-tree/ 31.6 KiB 2 modules

modules by path ./app/ 163 KiB 18 modules

./application/MDKAndroidApplication.android.ts 1.52 KiB [built] [code generated]

external "~/package.json" 42 bytes [optional] [built] [code generated]

webpack 5.50.0 compiled successfully in 11469 ms

Webpack compilation complete. Watching for file changes.

Issues checking in progress...

File change detected. Starting incremental webpack compilation...

resolving "./MDKAndroidActivity.ts" to "./MDKAndroidActivity.android.ts"

resolving "./app.css" to "./app.android.css"

resolving "./storage/Paths.ts" to "./storage/Paths.android.ts"

modules info size: 975

modules info saved: C:\MDK\MDKClient_SDK\dynamicApp\platforms\android\app\src\main\assets\app\modulesinfo.json

assets by status 15.8 MiB [cached] 20 assets

asset default.js 9.6 KiB [emitted] [from: app/default.js] [copied]

Entrypoint bundle 14.1 MiB = runtime.js 87.2 KiB vendor.js 13.4 MiB bundle.js 556 KiB

Entrypoint application 91.7 KiB = runtime.js 87.2 KiB application.js 4.5 KiB

cached modules 4.82 MiB (javascript) 50.5 KiB (runtime) [cached] 1008 modules

javascript modules 1.04 KiB

./app/__@nativescript_webpack_virtual_entry_typescript__ 238 bytes [built]

./app/ sync \.(xml|js|(?<%21\.d\.)ts|s?css)$ 830 bytes [built]

webpack 5.50.0 compiled successfully in 2191 ms

Webpack compilation complete. Watching for file changes.

Issues checking in progress...

No issues found.

Downloading https://services.gradle.org/distributions/gradle-7.4-bin.zip

Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)

at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)

at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)

at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)

at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)

at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)

at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)

at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)

at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)

at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)

at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)

at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)

at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)

at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)

at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2729)

at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2641)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1824)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)

at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)

at org.gradle.wrapper.Download.downloadInternal(Download.java:60)

at org.gradle.wrapper.Download.download(Download.java:45)

at org.gradle.wrapper.Install$1.call(Install.java:62)

at org.gradle.wrapper.Install$1.call(Install.java:48)

at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)

at org.gradle.wrapper.Install.createDist(Install.java:48)

at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)

at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)

at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)

at sun.security.validator.Validator.validate(Validator.java:262)

at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)

at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)

at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)

at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1621)

... 22 more

Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)

at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)

at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)

at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)

... 28 more

Failed to build plugin @nativescript-community/ui-pulltorefresh :

Error: Command gradlew.bat failed with exit code 1

Please suggest me.

Thank you.

Regards,

Padmindra Gurung

Accepted Solutions (0)

Answers (1)

Answers (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

What version of MDK are you using? Also, please see this SAP Note 3159124 about upgrading to Nativescript 8.2.2 to address some recent issues.

Padmindra
Explorer
0 Kudos

Hi Bill,

Thank you for your reply.

MDK version : 6.1.3(latest one)

My native script : 8.2.2

I followed the SAP note 3159124, still I am getting same error.

Regards,

Padmindra

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

The following error using indicates that you are missing trust.

"Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

I recently had to add one of our internal certs to fix a very similar error. These are the steps I followed to import the cert I needed. After that the error disappeared and my builds worked.

jospoon
Explorer
0 Kudos

Hi bill.froelich

Getting the PKIX path error as well. FYI the link you provided no longer valid. But trying this . I used the cert from my company sharepoint url and added it. But I'm still getting the same error.

Is there a specific cert we need to add for the SDK to properly run create client?

jospoon
Explorer
0 Kudos

Also wanted to clarify that the sap note fix has been applied. Running tns version 8.2.2