cancel
Showing results for 
Search instead for 
Did you mean: 

SMP 3.0 Device Registration issue

sumit_lal
Explorer
0 Kudos

Hello,

We followed these steps for deployment of hybrid application in smp 3.0 server, we are getting some error.Please find attachment for detailed error analysis.

Step 1:installed JDK, and set it to environment variable

Step 2 : installed apache ant, and set it to environment variable

Step 3: installed node.js, and set it to environment variable

Step 4: installed cordova, And set it to environment variable

Step 5: installed ADT Plugins in Ecllipse

Step 6: In Management cockpit

           a) Create new application- given ID, Name, and Type of application (Hybrid).

           b) On selecting application  specified Back-End Point and Authentication

           c) Go to  APP SPECIFIC SETTINGS then upload that Myapp zip.

           d) Deployed it.

Step 7: Now,in Command Prompt 

           a) cordova create <foldername>  <application id>  <AppName>

           b) cd <foldername>

           c) cordova platform add android

           d)cordova –d plugin C:\SAP\MobileSDK3\KapselSDK\plugins\logon

           e) Downloaded register.html from SCN and replaced with index.html in WWW folder and   generated apk.

           f) We are getting error while opening apk on mobile device that is “SAP is not defined” .

Step 8: Created one folder that is Myapp/android/.

            This android folder contains www folder and config.xml file

Step 9: Now compressed Myapp folder.

Step 10: In Management cockpit

        a) Create new application- given ID, Name, and Type of application (Hybrid).

        b) On selecting application  specified Back-End Point and Authentication

        c) Go to  APP SPECIFIC SETTINGS then upload that Myapp zip.

        d) Deployed it.

      

Step 11:  Opened this link on https://host:port/Admin/kapsel/jaxrs/KapselApp/app-id.

        a) Got the logon screen.

        b) After specifying User name & Password, its showing error sap is not defined.

Accepted Solutions (1)

Accepted Solutions (1)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

I just tried Logon plugin. I am able to register with SDK SP08 PL01 being on SMP3 sever SP07 PL02. I suggest you to upgrade SMP server and SDK to latest version and then try. I looked at xml file also. This is my finding which is same as mine (default one).

HTTP port:8080

HTTPS port:8081 (one way communication)

HTTPS Admin port: 8083 (for Admin cockpit and GW cockpit)

HTTPS Port: 8082 (mutual authentication)          

I still wonder howcome you are able to execute https://smphost:8083

Nevertheless update this post once you are done with server and SDK upgrade.

Regards,

JK

sumit_lal
Explorer
0 Kudos

hi Jitendra,

whenever we are trying to upgrade, error was coming SMP 3.0 SP03 is not supported version to upgrade SP07.

regards,

Sumit

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Can you share the screenshot of the error? Existing SMP server is a single-server or cluster one?

sumit_lal
Explorer
0 Kudos

Hi Jitendra,

Again I reinstalled smp 3.0 sp03 ,now its working.But after device registration through browser ,how to run the application(Cordova project).And I want to know how to do device registration through mobile browser.

Regards,

Sumit

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

All the steps are mentioned here Registering using the Logon Plugin

sumit_lal
Explorer
0 Kudos

Hi Jitendra,

Can you please provide some documents for the upgradation process of SMP 3.0 SP03 to SP07.

We are facing problem,showing error that SMP 3.0 SP03 is not supported version to upgrade SP07.

Regards,

Sumit.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

This query is different than your original post. Please raise a new thread for new one, also provide screenshot of the error you are facing.

Regards,

JK (Moderator)

midhun_vp
Active Contributor
0 Kudos

Hi Sumit,

You can't register app from a browser using the Kapsel login plugin. You could register only from your Cordova app.


SMP SP07 supports both fresh installation and upgrade from previous installation for SMP 3.0.x. So it should support upgrade of SP03 to SP07. Double check you downloaded the right file.

Regards,Midhun

SAP Technology RIG

Answers (2)

Answers (2)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

yes, you can upgrade directly from SP03

Once done, you have to upgrade cordova version to 4.2.0 also. Please follow the steps mentioned Back to Getting Started With Kapsel and Logon

I will look at the index.html file again and get back to you.

sumit_lal
Explorer
0 Kudos

Hi Jitendra,


What about "default-server.xml"  file. Did you check it.

Regards,

Sumit

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Can you tell us what is SMP server and SMP Mobile SDK version you are working with? Can you follow below steps once and let us know if you still see same error

1. cordova -d create C:\Kapsel_Projects\LogonDemo com.mycompany.logon LogonDemo "{\"plugin_search_path\":\"C:/SAP/MobileSDK3/KapselSDK/plugins/\"}"

2. cd C:\Kapsel_Projects\LogonDemo

3. cordova -d platform add android

4.cordova -d plugin add com.sap.mp.cordova.plugins.logon

5. Replace index.html file

6. cordova -d prepare

7. Use Android IDE to deploy and run the project

More info

Regards,

JK

sumit_lal
Explorer
0 Kudos

Hi Jitender,

I tried for this but for Device Registration I am using REST Client in chrome, I am getting some error. Plz check the attachment for error analysis.

Regards,

Sumit

midhun_vp
Active Contributor
0 Kudos

Hi Sumit,

Are you sure that you added all the required plugins to the project? You could find the list of cordova plugins by executing the command: cordova plugins

If you are following the blog

Make sure you didn't miss the below steps:


  • Add the Logon plugin and optionally the console plugin so that the results of console.log can be seen when run on an iOS device in the All Output view.

cordova -d plugin add com.sap.mp.cordova.plugins.logon
cordova -d plugin add org.apache.cordova.console

  • Note, it is possible to use Cordova 4.3.0 with SP08 of the SDK but it requires using the following format when adding Kapsel plugins.
  • cordova plugin add com.sap.mp.cordova.plugins.logon --searchpath C:\SAP\MobileSDK3\KapselSDK\plugins or cordova plugin add C:\SAP\MobileSDK3\KapselSDK\plugins\logon --searchpath C:\SAP\MobileSDK3\KapselSDK\plugins or cordova plugin add com.sap.mp.cordova.plugins.logon --searchpath %KAPSEL_HOME%\plugins

Follow this blog to try it from Rest client:

Provide index.html file

Regards,Midhun

SAP Technology RIG

sumit_lal
Explorer
0 Kudos

Hi Mithun,

Plz check the attachment below,I am getting this error.

Regards,

Sumit

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Just to confirm, can you check if you are able to hit http://smpserverhost:8080 in the browser? I assume you have configured application with a defined App ID in admin cockpit.

Regards,

JK

Former Member
0 Kudos

Hi Sumit,

Can you try

appCID = result.applicationConnectionId  instead of result.ApplicationConnectionId

Regards,

Dhani

sumit_lal
Explorer
0 Kudos

Hi Dhani,

I am getting result undefined during debugging.How to resolved it.Any idea???

Regards,

Sumit

Former Member
0 Kudos

Hi Sumit,

Can you share the code used by you? Are you using port 8080 for registering? (In your code line #24 appends 8083 port to the host. For onboarding you should use port 8080)

Regards,

Dhani

sumit_lal
Explorer
0 Kudos

Hi Dhani,

I am attaching images where I was doing registration so please check and tell me.I have marked with red pen where registration issue came.

Regards,

Sumit

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

By looking at index2.PNG, you have used port "8083", you should use either 8080 (http) or 8081 (https)

in index3.PNG, you mentioned

(device.platform == "window")

it should be windows

DeviceTypeDevice
AndroidAndroid Devices
BlackberryBlackberry devices
iOSiOS devices
iPadApple iPad
iPhoneApple iPhone
iPodApple iPod
Windows

includes desktop or servers with Windows OS such as Windows XP, Windows Vista, Windows 7, and Windows Server series OS

Windows8includes Windows desktop version
WinPhone8includes Windows mobile

(ref )

Please correct it and then try.

Regards,

JK

sumit_lal
Explorer
0 Kudos

Hi Jitendra,

We applied same but our management cockpit running 8083 port.I changed window to Windows still same problem is coming.

Regards,

Sumit

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

We applied same but our management cockpit running 8083 port.


Management cockpit always run on Admin port that is 8083 (sometime 8084 if 8083 is occupied by some other service)


for registration/on-boarding, you have to use 8080 (HTTP)



If you are testing the app in the mobile, can you make sure that you are able to access http://smpserverhost:8080 in the mobile browser


Regards,

JK

sumit_lal
Explorer
0 Kudos

Hi Jitendra,

I am unable to access through the url given by you, but able to access through 8083 port.Find the attachment below. Its showing build number.

Regards,

Sumit

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

oh.. i got it now. In your case 8083 is oneWaySSL port (HTTPS) >> by default, it is 8081

from your code can you modified ?

                    "serverHost": "smp server FQDN", //Place your SMP 3.0 server name here

                    "https": "TRUE",

                    "serverPort": "8083",

FQDN: fully qualified domain name. xx.xx.com

If you have access to SMP server machine, can you tell about port used in smpConnectorName="noSSL under  C:\SAP\MobilePlatform3\Server\config_master\org.eclipse.gemini.web.tomcat\default-server.xml

For me, its 8080

<Connector acceptCount="100" connectionTimeout="20000" enableLookups="false" maxThreads="250" port="8080" protocol="HTTP/1.1"

redirectPort="8081" server="SAP" smpConnectorName="noSSL" />

You are working on first release of SMP server version, latest SMP server version is 3.0 SP07 with SMP Mobile SDK SP08. If possible, upgrade it to latest to avail new features and functionality.

Regards,

JK

sumit_lal
Explorer
0 Kudos

Hi Jitendra,

What u said I did it,then also I am getting some error in line no 57 that is Cannot read property "int" of undefined , please check the image below.Also I am attaching "default-server.xml"  file.You check it.

Regards,

Sumit

sumit_lal
Explorer
0 Kudos

Hi Jitendra,

Our SMP Server is in SP 03 and sdk also SP 03.So,can I apply directly SP07 server and SP08 for SDK as you have recommended without applying SP04,SP05,SP06.

Regards,

Sumit