Rollbase Mobile: Error shown in running Rollbase Mobile Nati

Posted by cammyc on 09-Jul-2014 08:01

Hi,

I have created a Rollbase mobile app and I can test it in desktop web browser and using Rollbase Mobile Native Tester for Android without any problem.

When I try to test it using Rollbase Mobile Native Tester for iOS at iPad Air, I receive error "Session must be instantiated before calling login service" during login to the mobile app.

As the same app can be run in Rollbase Mobile Native Tester for Android successfully, may I know what additional steps are required when using Rollbase Mobile Native Tester for iOS? 

Many Thanks in advance!

Cammy

Posted by whenshaw on 14-Jul-2014 09:28

Hi Cammy,

One of the engineers who works with the Native Tester for iOS said that the problem you and egarcia found is fixed in a new version of the Native Tester and that new version is currently being tested.

--Wayne

All Replies

Posted by egarcia on 09-Jul-2014 15:18

Hello,

The error message that you are getting is shown when the Session Service has not been invoked before calling the Login Service.

A possible suggestion is to add debug messages to confirm that the Session Service is being called prior to the Login Service. Perhaps, add code to the success and error callbacks.

Another way to debug this is to enable the Web Inspector on your iOS device (Safari/Advanced/Web Inspector) then connect to a Mac via USB. You would then be able to use Safari on the Mac to debug the WebView on the Native Tester.

I hope this helps.

Posted by whenshaw on 10-Jul-2014 11:42

Hi,

Were you able to get any more information by following egarcia's suggestions above? Can you send us a backup of the app, or provide more details about how it works? For example, what is the authenticationModel (I assume it's Form, but it's worth checking), what is the serviceURI, when does it invoke the SessionService_Session service, and when does it invoke the SessionService_Login service (the names may be different, but they will be something like that, I think -- they appear as Data Sources and are probably called DefaultSession and DefaultSessionLogin).

Regards,

Wayne

Posted by cammyc on 13-Jul-2014 03:57

Hi,
 
I have followed egarcia's suggestion to add a debug message by adding a Run JavaScript action to display a message after invoking the default Session Service.
When running the mobile app in the native tester for iOS, the debug message is displayed. But I still get the error "Session must be instantiated before calling Login Service" after clicking 'Login' button.
 
I am only using the Rollbase sample Mortgage Processing application and create a new mobile app by adding a "All companies" view. I do not add any object to the login page and AppDetailPage and I do not modify any default session and login services. The mobile app only contain default pages and services.
 
The error is only displayed if I am trying to test a mobile app in Rollbase Native Tester for iOS at iPad Air.
I do not have other iOS device for testing. I will check with other colleague and see if they have any issue using Rollbase Native Tester for iOS at iPhone or iPad.
 
However, I can run all the Rollbase mobile apps created by desktop web browser and Rollbase Native Tester for Android. I can also install and run the mobile apps at my Android phone without Native Tester for Android.
 
I just want to know if I need to do any step for testing in Rollbase Native Tester for iOS as the same apps can be run successfully in Android.
Do I have to follow the below documentation to package the mobile app and export it before testing in Rollbase Native Tester for iOS? Please advise.
 
http://documentation.progress.com/output/Rollbase/index.html#page/rb/Rollbase.263.html#wwconnect_header
 
Many Thanks & Regards,
Cammy
 
 
[collapse]
From: whenshaw [mailto:bounce-whenshaw@community.progress.com]
Sent: Friday, July 11, 2014 12:43 AM
To: TU.Rollbase@community.progress.com
Subject: RE: [Technical Users - Rollbase] Rollbase Mobile: Error shown in running Rollbase Mobile Native Tester for iOS
 
RE: Rollbase Mobile: Error shown in running Rollbase Mobile Native Tester for iOS
Reply by whenshaw

Hi,

Were you able to get any more information by following egarcia's suggestions above? Can you send us a backup of the app, or provide more details about how it works? For example, what is the authenticationModel (I assume it's Form, but it's worth checking), what is the serviceURI, when does it invoke the SessionService_Session service, and when does it invoke the SessionService_Login service (the names may be different, but they will be something like that, I think -- they appear as Data Sources and are probably called DefaultSession and DefaultSessionLogin).

Regards,

Wayne

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by egarcia on 13-Jul-2014 09:50

Hello,

I took a look at this issue and I was able to reproduce it.

When I added debug messages on success and error for the DefaultSession service, they were not displayed.

I added code to invoke the service using JavaScript so I could add additional debug messages.

I found that that the call to new progress.data.Session() was failing because somehow progress.data was undefined.

I looks like somehow the JavaScript file that contains it is not being loaded.

I worked around this issue by adding a private copy (using new JavaScript file) of progress.jsdo.2.2.js to the project.

After this change the DefaultSession service was instantiate and I was able to login. However, I ran into another issue.

Are  you using the Native Tester for iOS so that you can test native services?

Does scanning the QR code from the Test option work for you on iOS?

I hope this helps.

Thanks.

Posted by cammyc on 14-Jul-2014 08:25

Hi egarcia,
 
Thank you very much for your testing and workaround (adding a private copy using new JavaScript file of progress.jsdo.2.2.js to the project). I will try it.

Yes, I am trying to use Native Tester for iOS for testing mobile native services. I just try scanning the QR code from the Test option and I can run the mobile apps at iPad.

Many Thanks for your help!
 
Best Regards,
Cammy
 
[collapse]
From: egarcia [mailto:bounce-egarcia@community.progress.com]
Sent: Sunday, July 13, 2014 10:51 PM
To: TU.Rollbase@community.progress.com
Subject: RE: [Technical Users - Rollbase] Rollbase Mobile: Error shown in running Rollbase Mobile Native Tester for iOS
 
RE: Rollbase Mobile: Error shown in running Rollbase Mobile Native Tester for iOS
Reply by egarcia

Hello,

I took a look at this issue and I was able to reproduce it.

When I added debug messages on success and error for the DefaultSession service, they were not displayed.

I added code to invoke the service using JavaScript so I could add additional debug messages.

I found that that the call to new progress.data.Session() was failing because somehow progress.data was undefined.

I looks like somehow the JavaScript file that contains it is not being loaded.

I worked around this issue by adding a private copy (using new JavaScript file) of progress.jsdo.2.2.js to the project.

After this change the DefaultSession service was instantiate and I was able to login. However, I ran into another issue.

Are  you using the Native Tester for iOS so that you can test native services?

Does scanning the QR code from the Test option work for you on iOS?

I hope this helps.

Thanks.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by whenshaw on 14-Jul-2014 09:28

Hi Cammy,

One of the engineers who works with the Native Tester for iOS said that the problem you and egarcia found is fixed in a new version of the Native Tester and that new version is currently being tested.

--Wayne

Posted by cammyc on 14-Jul-2014 23:27

Hi Wayne,
 
Thank you very much for your update. We are looking forward to the new version of Native Tester for iOS.
 
Thanks & Regards,
Cammy
 
[collapse]
From: whenshaw [mailto:bounce-whenshaw@community.progress.com]
Sent: Monday, July 14, 2014 10:29 PM
To: TU.Rollbase@community.progress.com
Subject: RE: [Technical Users - Rollbase] Rollbase Mobile: Error shown in running Rollbase Mobile Native Tester for iOS
 
RE: Rollbase Mobile: Error shown in running Rollbase Mobile Native Tester for iOS
Reply by whenshaw

Hi Cammy,

One of the engineers who works with the Native Tester for iOS said that the problem you and egarcia found is fixed in a new version of the Native Tester and that new version is currently being tested.

--Wayne

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

This thread is closed