# Screen shows 1 sec and then becomes blank

**URL:** <https://community.thunkable.com/t/screen-shows-1-sec-and-then-becomes-blank/1411166>\
**Category:** Questions about Thunkable X\
**Created:** [July 23, 2021, 6:51pm UTC](https://community.thunkable.com/t/screen-shows-1-sec-and-then-becomes-blank/1411166 "2021-07-23T18:51:53Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alenkar\_Avalos](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@Alenkar\_Avalos](https://community.thunkable.com/u/Alenkar_Avalos)\
**Post date:** [July 23, 2021, 6:51pm UTC](https://community.thunkable.com/t/screen-shows-1-sec-and-then-becomes-blank/1411166/1 "2021-07-23T18:51:53Z")

</div>

Hello, I have been with a problem for a while and I can not solve it and the support team have not helped me. I also searched the community and there are many problems with blank screens but none similar to the one I have, I hope you can help me.

The problem I have is that the home screen sometimes loads and sometimes does not. In my app there is the option that allows you to skip the login to navigate within the app without registering. In this case, the home screen displays fine, with no errors

![WhatsApp Video 2021-07-23 at 1.26.27 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/8/285e57a28b8e33afb38d6ea1736c20bb58f9721c.gif)

But the problem comes when logging in, once your authentication is correct, it sends you to a screen where you must choose a branch, once you choose it, it sends you to the home screen. The problem is that when you choose the branch and open the home screen, it shows the content of the home screen for 1 second and suddenly goes blank.

![WhatsApp Video 2021-07-23 at 1.25.37 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/a/8ad45e23bd49a2e04ebd417988a78242ecd5c468.gif)

It may seem that the problem is in the branch screen, but in reality this screen only has a data viewer where you must select a branch for the app to do a distance calculation and save it in a variable, after this, open the home screen, but that’s when the problem happens.

I attach screenshots of the branch screen blocks, as you can see, it only do calculations, change the value of a variable and just open the home screen

 ![Captura de pantalla (19)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/4/24717219aa5924c14e6decc4e00c8e8c8a2a6603.png)

Thanks to all

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 23, 2021, 8:26pm UTC](https://community.thunkable.com/t/screen-shows-1-sec-and-then-becomes-blank/1411166/2 "2021-07-23T20:26:23Z")

</div>

> [@Alenkar\_Avalos](#):
>
> In my app there is the option that allows you to skip the login to navigate within the app without registering. In this case, the home screen displays fine, with no errors

This is the first clue that thing are probably ok on the home screen…

> [@Alenkar\_Avalos](#):
>
> this screen only has a data viewer where you must select a branch for the app to do a distance calculation … that’s when the problem happens.

This would suggest that there’s an error in your block, in the part where you’re doing the calculation.

> [@Alenkar\_Avalos](#):
>
> I attach screenshots of the branch screen blocks

Thanks for the screenshot - I can see that you’re trying to get 200 rows, but the limit is actually 100 rows (which is set by Airtable for all users, independent of Thunkable)

Making an invalid call like this will cause your app to crash.

This is a case of user error, rather than a Thunkable error as you have initially suggested.

* * *

> [@Alenkar\_Avalos](#):
>
> the support team have not helped me

This is a very unfair remark to make - all 5 questions you asked in the past 5 weeks were answered by a member of the team. You closed 4 of them and didn’t respond to our questions on the 5th. Please take care what you post in the Community.

Thanks

---

<div class="post-metadata">

**Author:** ![Alenkar\_Avalos](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@Alenkar\_Avalos](https://community.thunkable.com/u/Alenkar_Avalos)\
**Post date:** [July 23, 2021, 9:51pm UTC](https://community.thunkable.com/t/screen-shows-1-sec-and-then-becomes-blank/1411166/3 "2021-07-23T21:51:48Z")

</div>

> Blockquote  
> This is a very unfair remark to make - all 5 questions you asked in the past 5 weeks were answered by a member of the team. You closed 4 of them and didn’t respond to our questions on the 5th. Please take care what you post in the Community.

First of all, sorry if it sounded too hard, my English is not that good, I meant that I could not solve the problem with the help team. And I sent 5 chats because the response time was sometimes several days. In the end I did not answer because my membership expired and the chat disable

> Blockquote  
> This would suggest that there’s an error in your block, in the part where you’re doing the calculation.

I am sure this is working correctly, i only use math blocks to get a number and compare with another.

> Blockquote  
> I can see that you’re trying to get 200 rows

I didn´t know that, i wil try it and coment what happens  
Thank you so much

---

<div class="post-metadata">

**Author:** ![Alenkar\_Avalos](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@Alenkar\_Avalos](https://community.thunkable.com/u/Alenkar_Avalos)\
**Post date:** [July 24, 2021, 11:46pm UTC](https://community.thunkable.com/t/screen-shows-1-sec-and-then-becomes-blank/1411166/4 "2021-07-24T23:46:24Z")

</div>

UPDATE:

The app still crashes, I´ve verified the formula for distance calculation (Haversine formula) and is ok, I´ll try to move the function to another screen

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [July 25, 2021, 12:02am UTC](https://community.thunkable.com/t/screen-shows-1-sec-and-then-becomes-blank/1411166/5 "2021-07-25T00:02:57Z")

</div>

I’ve used Haversine. It’s very tricky to get the right answer but it shouldn’t crash your app unless you’re dividing by zero or something like that.

Try debugging by adding Wait blocks and changing label values to highlight where in the code you’ve reached right _before_ it crashes. This is my process: [Debugging in Thunkable X (Video)](https://community.thunkable.com/t/debugging-in-thunkable-x-video/849471).

---

<div class="post-metadata">

**Author:** ![Alenkar\_Avalos](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@Alenkar\_Avalos](https://community.thunkable.com/u/Alenkar_Avalos)\
**Post date:** [July 25, 2021, 4:00pm UTC](https://community.thunkable.com/t/screen-shows-1-sec-and-then-becomes-blank/1411166/6 "2021-07-25T16:00:20Z")

</div>

> [@tatiang](#):
>
> I’ve used Haversine. It’s very tricky to get the right answer but it shouldn’t crash your app unless you’re dividing by zero or something like that.

Do you think that the error shows when you dont allow location access? Like if deny access gives a 0 that is being divided?. Anyway I will check that post

Thanks!

---

<div class="post-metadata">

**Author:** ![Alenkar\_Avalos](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@Alenkar\_Avalos](https://community.thunkable.com/u/Alenkar_Avalos)\
**Post date:** [July 25, 2021, 7:14pm UTC](https://community.thunkable.com/t/screen-shows-1-sec-and-then-becomes-blank/1411166/8 "2021-07-25T19:14:16Z")

</div>

I´ve been checking. I realized that the error is on the login screen. If you log in, the home screen shows it blank. But if you skip the login it loads normal. But this problem just happen on iOS, on Android works fine. Any idea?

I attach some screenshots:

This is the code for the skip logging in button. This just fills variables and navigate to another screen (This is working fine)

![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/b/eb764e4a25b7d44db823592cbda559df5d5bd25a.png)

And this is the code for the log in button. As you can see, first read firebase database to check the user info (and hide some components), then fills the same variables but using firebase data, and then navigate to another screen (This is not working)

 ![2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/5/85e3933214d45f16ccf8be835a02e5a853782720.jpeg)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [July 25, 2021, 8:22pm UTC](https://community.thunkable.com/t/screen-shows-1-sec-and-then-becomes-blank/1411166/9 "2021-07-25T20:22:01Z")

</div>

Are you using the variable “UsuarioNombre” in anything in the next screen?

You are trying to get the value in this variable asynchronously so it could fail.

---

<div class="post-metadata">

**Author:** ![Alenkar\_Avalos](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@Alenkar\_Avalos](https://community.thunkable.com/u/Alenkar_Avalos)\
**Post date:** [July 26, 2021, 3:41am UTC](https://community.thunkable.com/t/screen-shows-1-sec-and-then-becomes-blank/1411166/10 "2021-07-26T03:41:31Z")

</div>

> [@muneer](#):
>
> Are you using the variable “UsuarioNombre” in anything in the next screen?

Yes. Im using that variable on the next screen, same as other variables UsuarioXXXXX but as I said, when use the skip log in button, fills the same variable that use on the next screen/s. But my head breaker now is why on Android works normally

---

<div class="post-metadata">

**Author:** ![Alenkar\_Avalos](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@Alenkar\_Avalos](https://community.thunkable.com/u/Alenkar_Avalos)\
**Post date:** [July 27, 2021, 7:18pm UTC](https://community.thunkable.com/t/screen-shows-1-sec-and-then-becomes-blank/1411166/11 "2021-07-27T19:18:02Z")

</div>

UPDATE: The app still crashing, I´ve tested on many iPhones. I’ve moved the branch screen and still crashing so i don’t think it´s this the cause. On many iPhones the app crashes, on some of them not. I´m thinking that is a bug on the Thunkable Platform because of this. I attach 2 screenshots of the same version on the app running on 2 different iPhones:

iPhone 7: The app runs correctly, log in working fine  
 ![WhatsApp Video 2021-07-27 at 2.06.59 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/1/e1ef6df2b61f4cd20c6304b054f34a9de6a2e228.gif)

iPhone 11: The app crashes when you log in, as you can see, before set blank screen you can see the home screen for a second  
 ![WhatsApp Video 2021-07-27 at 2.05.34 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/5/05c441250d62949ae2c0ef3b8c83c1949eb972e2.gif)

Here is the link of my project if someone want to check the involved screens are “BIENVENIDO” and “INICIO”  
[https://x.thunkable.com/projects/5f5263d2612ab8d640b02917/5bd1119f-9f17-4023-a92a-2072eba2765c/designer](https://x.thunkable.com/projects/5f5263d2612ab8d640b02917/5bd1119f-9f17-4023-a92a-2072eba2765c/designer)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:17pm UTC](https://community.thunkable.com/t/screen-shows-1-sec-and-then-becomes-blank/1411166/12 "2024-11-08T13:17:49Z")

</div>


