App crashes when open page

Hi, I am facing this weird issue, occurred today. A page is being open when I press the button. The page is calling rest API and then from response setting up page and app variable values. It was working perfectly till yesterday night. But now it is broken. whenever I try to open that page only a white screen appears and then after some time the preview app crashes.

Could you please look into this? Application id 196163 and page id 24.
I need to deliver this ASAP to someone. Please let me know. Thanks

is there any changes being made on the flows which are calling the APIs for example get collection and create record etc?

in the debugger, the console is showing me this error for page 24
Invariant Violation: Component(…): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null

Hey @Aqil_Abbas_khan,
Do you have some testing credentials, so that I could reproduce the issue on my device?

@Kristian_Gerkman Thanks for the reply.
user name: aqil
password: aqill
when you log in click on the mission button, Mission button opens page 24.

@Aqil_Abbas_khan found the issue!
It seems to be that if checkbox’s visible field evaluates to null/undefined, the preview crashes. So what I’d suggest you to do is to add IF(<current formula>, true, false) so that if it evaluates to null, then it is not shown at all.

@Kristian_Gerkman I really appreciate your effort. I will check that. And return back to you. Thanks a lot man

Hold on, the issue goes deeper, the fix above wont work :sweat_smile:

@Aqil_Abbas_khan alright - found the actual issue, and it cannot be worked around inside of the formula. So one option that I verified to work, is to add a container around the checkbox, and then move the formula from the checkbox to the container. (and set the checkboxes visible to be true)

It was actually formula functions that evaluated to be null and caused the crash, so using IF() results in the same crash

@Kristian_Gerkman Thanks a lot for your help. I am going to try it now. But it was working before and just stopped working last night.

won’t the same formula crash for the container?

There was a runtime update released on Wednesday for android, and if you connected to a wi-fi it might have auto updated the preview app.

And the reason why container works and checkbox doesn’t is that there is apparently a bug on with checkbox which prevents formula functions from working in the visible field. and there is another bug which crashes the app if the checkboxes visible field is null

@Kristian_Gerkman the issue is something else. I have removed the checkbox completely ( for testing purposes ) but the app still keeps crashing

@Aqil_Abbas_khan I can still see the checkboxes in composer :thinking:

there is other page 15, which has same logic. I am testing on that page.

Interesting… the page 15 does crash, but with another kind of crash… sorry about this…

yeah, I don’t know what is the problem. It was working fine. I was about to finalize the project. But this happens. I need to deliver this by Sunday. what could be the possible problem @Kristian_Gerkman

@Aqil_Abbas_khan I found the other crash, it is caused by the card with large image’s box shadow properties - not sure why they are not linked properly, since they look OK, but to remove the crash you would need to set the properties to not be linked to theme variables.

Reason why this occurs just now, is that the box shadows were fixed thus enabled in this release. And the card component is quite old, and it seems to be out of date. So it needs to be updated by us.

okay, let me remove the card component and then test it.