We are getting this error when a screen of our mobile application is loading:

SyntaxError: Illegal break statement
    at Object.b.execCb (/scripts/OutSystems.js?3t9IPARg_V5Z5tQICpXBpw:1:12759)
    at Object.T.check (/scripts/OutSystems.js?3t9IPARg_V5Z5tQICpXBpw:1:6460)
    at Object.<anonymous> (/scripts/OutSystems.js?3t9IPARg_V5Z5tQICpXBpw:1:9038)
    at /scripts/OutSystems.js?3t9IPARg_V5Z5tQICpXBpw:1:761
    at /scripts/OutSystems.js?3t9IPARg_V5Z5tQICpXBpw:1:9499
    at each (/scripts/OutSystems.js?3t9IPARg_V5Z5tQICpXBpw:1:236)
    at Object.T.emit (/scripts/OutSystems.js?3t9IPARg_V5Z5tQICpXBpw:1:9467)
    at Object.T.check (/scripts/OutSystems.js?3t9IPARg_V5Z5tQICpXBpw:1:7179)
    at Object.T.enable (/scripts/OutSystems.js?3t9IPARg_V5Z5tQICpXBpw:1:9365)
    at Object.T.init (/scripts/OutSystems.js?3t9IPARg_V5Z5tQICpXBpw:1:5674)


This must be some internal OS bug. I have no idea what could cause it, there were no changes in the application lately. I have spend hours experimenting, and found that it can only be fixed if I remove a list field from a structure used locally inside of the screen, and all usages of that field.

I have no choice but experimenting further because our app is unusable with this error. But can it be that someone with knowledge of OS internals gives a hint what can this error mean?

Hi Igor,

Please prepare a minimal application using same structure which generates this error and share its oml here so that we can check what is the issue.

Hi Igor,

1- Can you reproduce that in previewindevices or only on the generated app? Have you tried debugging it in Chrome?

2 - Are you using any custom javascripts in that screen or app?

3 - What version of the platform are you using?

Cheers,
Tiago Simões

PS: You might want to open a support case for this

Yup, a small sample would help a lot

Tiago Simões wrote:

Hi Igor,

1- Can you reproduce that in previewindevices or only on the generated app? Have you tried debugging it in Chrome?

2 - Are you using any custom javascripts in that screen or app?

3 - What version of the platform are you using?

Cheers,
Tiago Simões

PS: You might want to open a support case for this


The problem is that this is only reproducible in our custom-built devices which use old Android version 4.4.2. There is no problem in browser, and no problem in my mobile. I have built sample application by extracting the screen and logic and data for it - but it works (even on the device)!

Yes off course we are using custom javascripts. I have even searched for "break" occurrences through modules, but at least in our own modules it's not even present.

Looking into history, there were just 2 changes in the application lately (before the issue started): first, we had some refactoring, so some BL references changed, and second - OutSystemsUI was upgraded from 2.2.5 to 2.3.0. So I have also looked there in OutSystemsUI, but didn't find anything suspicious. For now, the only thing left for me to try is to downgrade OutSystemsUI version and check if it will help.

We use P11.

Hi Igor,

Not really sure, but since Android 4.4 is so old it could also be related to the MABS version you are using.

Cheers,
Tiago Simões

Tiago Simões wrote:

Hi Igor,

Not really sure, but since Android 4.4 is so old it could also be related to the MABS version you are using.

Cheers,
Tiago Simões

We have MABS locked to 4.2 for this application because later versions don't work on the device.

Solution

After long time experimenting, I had one last idea: to recreate the screen and copy elements from the old into the new one. This solution was inspired by the fact that demo application which I built in similar way was for some reason working. So I did it and it magically solved the problem!

Solution

That is indeed strange. But I'm glad you were able to sort it out.

Cheers,
Tiago

Igor Kirtak wrote:

After long time experimenting, I had one last idea: to recreate the screen and copy elements from the old into the new one. This solution was inspired by the fact that demo application which I built in similar way was for some reason working. So I did it and it magically solved the problem!

Yes, this is strange but it happens in outsystems. I am also facing a similar problem in my application but it doesn't occur when I recreated same think in new app.