cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori client build - Fails during runtime

Former Member
0 Kudos

Hi,

I'm attempting to build and run the Fiori client from the SMP SDK 3.0 SP5 PL01

SDK has been downloaded from the SAP Store https://store.sap.com/sap/cp/ui/resources/store/html/SolutionDetails.html?pid=0000013098&catID=&pcnt...

The creation of the Fiori Client project (node create_fiori_client.js), the preparation (cordova prepare) and the build (cordova build) all goes well.

Howver, when I try to run it (cordova emulate android) on a device with API level 19 it fails during startup with the message

"Unfortunately, <name of app> has stopped"

In the android logs you find the following stack trace:

10-08 02:22:25.710: E/AndroidRuntime(928): java.lang.NoSuchMethodError: org.apache.cordova.CordovaWebView.setWebViewClient

10-08 02:22:25.710: E/AndroidRuntime(928): at com.sap.mp.cordova.plugins.online.Online.initialize(Online.java:20)

10-08 02:22:25.710: E/AndroidRuntime(928): at org.apache.cordova.CordovaPlugin.privateInitialize(CordovaPlugin.java:50)

10-08 02:22:25.710: E/AndroidRuntime(928): at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:191)

10-08 02:22:25.710: E/AndroidRuntime(928): at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:114)

10-08 02:22:25.710: E/AndroidRuntime(928): at org.apache.cordova.PluginManager.init(PluginManager.java:92)

10-08 02:22:25.710: E/AndroidRuntime(928): at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:383)

10-08 02:22:25.710: E/AndroidRuntime(928): at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:368)

10-08 02:22:25.710: E/AndroidRuntime(928): at org.apache.cordova.CordovaWebView.loadUrl(CordovaWebView.java:344)

10-08 02:22:25.710: E/AndroidRuntime(928): at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:376)

10-08 02:22:25.710: E/AndroidRuntime(928): at no.bouvet.sap.fiori.myapp.MYAPP.onCreate(DFO.java:32)

10-08 02:22:25.710: E/AndroidRuntime(928): at android.app.Activity.performCreate(Activity.java:5231)

10-08 02:22:25.710: E/AndroidRuntime(928): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)

10-08 02:22:25.710: E/AndroidRuntime(928): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)

10-08 02:22:25.710: E/AndroidRuntime(928): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)

10-08 02:22:25.710: E/AndroidRuntime(928): at android.app.ActivityThread.access$800(ActivityThread.java:135)

10-08 02:22:25.710: E/AndroidRuntime(928): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)

10-08 02:22:25.710: E/AndroidRuntime(928): at android.os.Handler.dispatchMessage(Handler.java:102)

10-08 02:22:25.710: E/AndroidRuntime(928): at android.os.Looper.loop(Looper.java:136)

10-08 02:22:25.710: E/AndroidRuntime(928): at android.app.ActivityThread.main(ActivityThread.java:5017)

10-08 02:22:25.710: E/AndroidRuntime(928): at java.lang.reflect.Method.invokeNative(Native Method)

10-08 02:22:25.710: E/AndroidRuntime(928): at java.lang.reflect.Method.invoke(Method.java:515)

10-08 02:22:25.710: E/AndroidRuntime(928): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)

10-08 02:22:25.710: E/AndroidRuntime(928): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)

10-08 02:22:25.710: E/AndroidRuntime(928): at dalvik.system.NativeStart.main(Native Method)

The actual exception is triggered in the Kapsel plugin com.sap.mp.cordova.plugins.online.Online.initialize.

The exception is very strange, as CordovaWebView extends android.webkit.WebView which contains the method setWebViewClient

(ref http://developer.android.com/reference/android/webkit/WebView.html#setWebViewClient(android.webkit.W...)

Cordova plugins command gives me the following output

cordova plugins

com.sap.mp.cordova.plugins.apppreferences 3.5.2-sap-01 "AppPreference"

com.sap.mp.cordova.plugins.authproxy 3.5.2-sap-01 "AuthProxy"

com.sap.mp.cordova.plugins.barcodescanner 3.5.2-sap-01 "BarcodeScanner"

com.sap.mp.cordova.plugins.cachemanager 3.5.2-sap-01 "CacheManager"

com.sap.mp.cordova.plugins.corelibs 3.5.2-sap-01 "CoreLibs"

com.sap.mp.cordova.plugins.e2etrace 3.5.2-sap-01 "E2ETrace"

com.sap.mp.cordova.plugins.encryptedstorage 3.5.2-sap-01 "EncryptedStorage"

com.sap.mp.cordova.plugins.fioriclient 3.5.2-sap-01 "FioriClient"

com.sap.mp.cordova.plugins.i18n 3.5.2-sap-01 "i18n"

com.sap.mp.cordova.plugins.logger 3.5.2-sap-01 "Logger"

com.sap.mp.cordova.plugins.logon 3.5.2-sap-01 "Logon"

com.sap.mp.cordova.plugins.online 3.5.2-sap-01 "Online"

com.sap.mp.cordova.plugins.push 3.5.2-sap-01 "Push"

com.sap.mp.cordova.plugins.settings 3.5.2-sap-01 "Settings"

com.sap.mp.cordova.plugins.toolbar 3.5.2-sap-01 "Toolbar"

com.sap.mp.cordova.plugins.xhook 3.5.2-sap-01 "Xhook"

org.apache.cordova.camera 0.3.2 "Camera"

org.apache.cordova.contacts 0.2.13 "Contacts"

org.apache.cordova.device 0.2.12 "Device"

org.apache.cordova.dialogs 0.2.10 "Notification"

org.apache.cordova.file 1.3.1 "File"

org.apache.cordova.geolocation 0.3.10 "Geolocation"

org.apache.cordova.inappbrowser 0.3.4-patched "InAppBrowser"

org.apache.cordova.statusbar 0.1.8 "StatusBar"

cordova -version

3.6.3-0.2.13

Any idea on where to start to troubleshoot this problem? cc      Former Member

PS The only change I've made to the Fiori Client has been in the www/appConfig.js has been to add the Fiori URL.

Message was edited by: Michael Appleby

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

After some troubleshooting, I found out that the likely candidate for the problems where the cordova client version in combination with fiori client.

By installing an older version of the cordova client, I was able to get the Fiori client working.

The cordova version which had issues was:3.6.3-0.2.13

To install an old version of cordova do the following:

1. npm view cordova versions

2. Select an old version (I used 3.5.0-0.2.7)

3. Run npm install -g cordova@3.5.0-0.2.7

4. Verify that you have the right version by cordova -version

Dan_vL
Product and Topic Expert
Product and Topic Expert
0 Kudos

The upcoming PL03 patch for SMP 3.0 SDK SP05 is expected to have support for Cordova 3.6.  Each release of the Kapsel SDK is tested against a specific version of Cordova that is available near the time of the SDK's release.  For further details see the section named Installing Apache Cordova with Node.js in

Getting Started with Kapsel - Part 1

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello All,

   I am facing similar issue(Unfortunately FioriClient has stopped working).

    I'm attempting to build and run the Fiori client from the SMP SDK 3.0 SP05.

    I checked the cordova version . It is 3.5.0-0.2.7. But still I am getting this issue. Console is not throwing any error. When checked in LogCat , the result is this.

Got any solutions for this? Thanks in Advance.

Regards,

Muthu Kannan

Former Member
0 Kudos

I had the same issue and I followed Dagfinn Parnas suggestion which solved it.

At first I just tried to downgrade the Cordova version as Dagfinn suggested and rebuild the existing project, but this was not sufficient to solve the issue.

I tried several things but at the end the only thing that worked for me was to remove the project, and remove my Cordova installation first.

Then install Cordova of the specific version (npm install -g cordova@3.5.0-0.2.7), and start creating the project all over again.

Ofer