I'm working on an offline sync, and after reconnecting the device to the internet, my app tryies to sync data, as expected. But I receive the error message below:

Cannot assign a Javascript undefined with value undefined to an output parameter of type Text Check the javascript node 'TriggerSyncErrorEvent' of the action 'EndofOfflineDatasync'.

Why is that?

Hi João,

To troubleshoot this situation, we need to take a look at your synchronization logic.
Can you please attach your module to this thread, or submit feedback?

Thanks!

After upgrading to Dev 10.0.303.0 it seems to be fixed, at least on Outsystems Now, or was it a republish matter?

But on the generated apk, I still receive the error I reported here: http://www.outsystems.com/forums/discussion/21321/p10-mobile-app-the-connection-to-the-server-was-lost/

I tryied to generate a new apk and got the error below: 

The project is attached. It's the ToDo lab.

Hi João,

It seems to be a problem with your plugins. Please ensure that the url of each plugin is correct.
If the problem persistis, try to isolate them to see which one is causing this.


Cheers,
Luís Silva


João Melo wrote:

After upgrading to Dev 10.0.303.0 it seems to be fixed, at least on Outsystems Now, or was it a republish matter?

But on the generated apk, I still receive the error I reported here: http://www.outsystems.com/forums/discussion/21321/p10-mobile-app-the-connection-to-the-server-was-lost/

I tryied to generate a new apk and got the error below: 

The project is attached. It's the ToDo lab.



But I'm not explicitly using those plugins in my project. How would I verify their configuration inside my project?

Hello João.

The error message is strange. Can you retry? 

As Luís said, it seems to be a problem with your plugins. Try to isolate them and see if it works.

Thanks


Solution

Ok, I got it!

When I tried to generate the apk again the error changed to a cordova plugin I was indeed using. The dialogs plugin. There was a typo on the URL in the extended configuration of the module.

The right one: https://github.com/apache/cordova-plugin-dialogs

The typo: https://github.com/apache/cordova-plugindialogs

So I think now that the green screen problem was related to this typo.


But I have 3 considerations/requests:

1. I think the feedback should be enhanced. The error screen is not clear, it says just that there is a connection problem.

2. The green screen only disappeared when I physically removed the apk from my mobile phone and put installed it again. Is it acting like it was supposed to?

3. Very weird.. The first time the erros message (when generate apk) was related to 2 plugins I didn't explicitly configure in my app. After trying again, with no new code, the error changed to another plugin.


Solution

I'm having the same problem, where I get "Cannot assign a Javascript undefined with value undefined to an output parameter of type Text Check the javascript node 'TriggerSyncErrorEvent' of the action 'EndofOfflineDatasync'." whenever the app tries to automatically sync data.


I never had any errors with plugins, but just to be sure I checked everything and I didnt have any typo or anything.

Has anyone found another solution to the problem yet?

Hi Ricardo,

Please make sure you have the latest version of Silk installed. That will most likely solve it.

Carlos Xavier wrote:

Hi Ricardo,

Please make sure you have the latest version of Silk installed. That will most likely solve it.

How do I check the installed version? it is just there as a dependency

edit: I updated it but the error still persists

Ricardo, try to delete the apk on the device manually, then download it again.



Ricardo Silva wrote:

Carlos Xavier wrote:

Hi Ricardo,

Please make sure you have the latest version of Silk installed. That will most likely solve it.

How do I check the installed version? it is just there as a dependency

edit: I updated it but the error still persists



João Melo wrote:

Ricardo, try to delete the apk on the device manually, then download it again.



Ricardo Silva wrote:

Carlos Xavier wrote:

Hi Ricardo,

Please make sure you have the latest version of Silk installed. That will most likely solve it.

How do I check the installed version? it is just there as a dependency

edit: I updated it but the error still persists




I forgot to update my question, but I had already solved it. thank you anyway (:

Ricardo, share with us what you've done to get it working..

João Melo wrote:

Ricardo, share with us what you've done to get it working..


I did what Carlos Xavier said and installed the most recent version of silk and it still didn't work for some time. After a while it started working and I'm not sure what I did beyond upgrading silk

The latest version of Mobile Silk UI (Version 1.1.2) on platform Version 10.0.200.0 solved the issue for me.

All that was required was a dependency refresh. No native app regeneration required.

Faced The Same Issue in my App.. Thank You Guys For Your Posts..

Also faced the same issue, and upgrading to SilkUI Mobile v1.1.2 fix it.

Thank you.


But v1.1.2 also introduce new bug: 

http://www.outsystems.com/forums/discussion/21969/mobile-bottom-bar-always-highlight-on-default-screen/

I'm having this same problem.

Being new to outsystems, how do I:

a. check the version of mobile silk UI

b. update it to the latest

Note: I have created a new project today, am I not supposed to have the latest version automatically?

Best regards,

Peter

Nevermind... figured it out for myself how to update:

1. in the "Applications in Development" overview, click "Install application"

2. Look for "Silk UI Mobile" 

3. Click the upgrade button.

Problem is indeed solved with this update of Silk UI Mobile.


I spoke too soon, i'm not getting an error anymore, but the synchronization method fails to update the data when automatic synchronization is launched. 

When calling the OffLineDataSync method from a button, it does work as it should.

I'm displaying a message at the end of OffLineDataSync and this message is shown when automatic synchronization takes place... so I know the method is being called and no error occurs... but why is it not synchronizing the data?

Best regards,

Peter


I turns out the OfflLineDataSync did sync the data, but I didn't see it because the screen was not refreshed.

Suppose now connectivity gets lost and it returns while i'm on a list screen, how do I refresh that screen from the automatically launched OffLineDataSync?

Best regards,

Peter

Hi Peter,

The default Layout and LayoutBlank blocks have event handlers that let you react when offline data sync starts, ends or triggers an error.

You just have to select the parent layout block as follows:


And having the layout block selected you can see it has a few events available:


As you can see you have 3 events related with Offline Data Synchronization:

  • OnSyncStart - triggered when synchronization starts.
  • OnSyncError - triggered when synchronization hits an error. You have the error in an input parameter.
  • OnSyncComplete - triggered when synchronization ends with success.

All you need to do is to specify a new handler for the OnSyncComplete, and refresh the local storage aggregate to refresh the list.


Hope this helps!

Thanks!

Ricardo Ferreira wrote:

Hi Peter,

The default Layout and LayoutBlank blocks have event handlers that let you react when offline data sync starts, ends or triggers an error.

You just have to select the parent layout block as follows:


And having the layout block selected you can see it has a few events available:


As you can see you have 3 events related with Offline Data Synchronization:

  • OnSyncStart - triggered when synchronization starts.
  • OnSyncError - triggered when synchronization hits an error. You have the error in an input parameter.
  • OnSyncComplete - triggered when synchronization ends with success.

All you need to do is to specify a new handler for the OnSyncComplete, and refresh the local storage aggregate to refresh the list.


Hope this helps!

Thanks!

You are the best!

Works like a charm!


Hi all, I face this error and it was pretty annoyng while doing the ToDos learning excercise.

My particular case was solved this way: Looking at the ToDo Database Entity, especifically the "Notes" field was set as Non Mandatory; so I created some ToDos without this info. When I triggered de Button "Sync to Local Storage" it works like a charm, but when coming from OffLine the error popup describe before showed up. So I edited all those Notes filed with some text, and then everyting works fine.

So, is not possible to have non mandatory text fields on this process ? or it's just a bug?

Regards. 

Hi Roberto,

You can have non-mandatory fields in your database and local storage and do data synchronizations.

Can you attach the module with the behavior you report, so we can check what's wrong with it?

Thanks!