# Code not running on start

**URL:** https://community.thunkable.com/t/code-not-running-on-start/1042328
**Category:** Questions about Thunkable X
**Created:** [January 7, 2021, 4:31pm UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328 "2021-01-07T16:31:13Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![saramdl.gaunde021](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@saramdl.gaunde021](https://community.thunkable.com/u/saramdl.gaunde021)
#### Post date: [January 7, 2021, 4:31pm UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/1 "2021-01-07T16:31:13Z")

</div>

i updated my app today and it was great (fully functioning) until few hours ago.  
and now, whenever i launched it, it stuck on first screen.  
and it stoped when i designed (not any single code running)  
actually when it starts, i change label one of my loading messages but it isnt working now.

and what i really dont understand is, all of my past versions having same problem.  
every version and even thunkable live has same symptom

what should i do??

FYI, apple and google permited this app like few hours ago.

---

<div class="post-metadata">

### Author: ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)
#### Post date: [January 7, 2021, 4:59pm UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/2 "2021-01-07T16:59:03Z")

</div>

Are your block in the Open Event? This week a bug appeared causing the Open Event on android devices not to execute

> [@List Viewer not set on Screen Open](http://community.thunkable.com/t/list-viewer-not-set-on-screen-open/1042157/3):
>
> UPDATE: I replicated the problem on my android device. If there is a loading\_icon on the screen, the open event does not occur. Do you have a loading\_icon? Visible or not Visible does not matter. Here is a sample. it works on Live Preview Web, but not on android. frowning

> <https://github.com/thunkable/thunkable-issues/issues/799>
>
> \### Platform
> ✕ Android companion
> 
> \### Issue/Request Origin
> https://community….thunkable.com/t/list-viewer-not-set-on-screen-open/1042157
> 
> \### Project Link
> https://x.thunkable.com/copy/8511e2e52bbc35dcf8a85f991bd86f16
> 
> \### Expected Behavior
> The open event should occur
> 
> \### Actual Behavior
> OPen Event does not occur
> \`\`\`

---

<div class="post-metadata">

### Author: ![saramdl.gaunde021](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@saramdl.gaunde021](https://community.thunkable.com/u/saramdl.gaunde021)
#### Post date: [January 8, 2021, 3:48am UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/4 "2021-01-08T03:48:11Z")

</div>

> [@drted](#):
>
> Are your block in the Open Event? This week a bug appeared causing the Open Event on android devices not to execute
> 
> [List Viewer not set on Screen Open - #3 by drted](http://community.thunkable.com/t/list-viewer-not-set-on-screen-open/1042157/3)  
> [Open Event does not occur on Android Live Test if Loading Icon Present · Issue #799 · thunkable/thunkable-issues · GitHub](https://github.com/thunkable/thunkable-issues/issues/799)

yes yes.  
actually there were ‘there was no anything but white screen’ happens a few times in this week. when i tested by apple.

and now im having trouble in iOS. not tested on android oh god.

- i checked android too. both OS are SAME

what i really dont understand is, how can whatever this bug is affect apks already published which were totally fine

is there anyone knowing about this? is thunkable app always connect to company or something at start?

somebody help me. this is emergency. uploaded on github too.

---

<div class="post-metadata">

### Author: ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)
#### Post date: [January 8, 2021, 8:04am UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/5 "2021-01-08T08:04:42Z")

</div>

Please check the troubleshooting docs and are you using any thing like a drawer navigator or top tab navigator or a bottom tab navigator etc… if yes, make sure you have kept the components inside the navigator

---

<div class="post-metadata">

### Author: ![saramdl.gaunde021](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@saramdl.gaunde021](https://community.thunkable.com/u/saramdl.gaunde021)
#### Post date: [January 8, 2021, 8:10am UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/6 "2021-01-08T08:10:17Z")

</div>

> [@v.krishna](#):
>
> Please check the troubleshooting docs

you mean this one? [Troubleshooting | Thunkable Docs](https://docs.thunkable.com/troubleshooting)

> [@v.krishna](#):
>
> are you using any thing like a drawer navigator or top tab navigator or a bottom tab navigator etc… if yes, make sure you have kept the components inside the navigator

and yes im using top and bottom navigator both.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/1/017e8de29e72ad6516d1259dd2639616c308ae13.png)  
i done this before. am i using wrong?

---

<div class="post-metadata">

### Author: ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)
#### Post date: [January 8, 2021, 8:11am UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/7 "2021-01-08T08:11:32Z")

</div>

this was all correct and you were using it well

---

<div class="post-metadata">

### Author: ![saramdl.gaunde021](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@saramdl.gaunde021](https://community.thunkable.com/u/saramdl.gaunde021)
#### Post date: [January 8, 2021, 8:12am UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/8 "2021-01-08T08:12:11Z")

</div>

but you think (or know) there is some issue about navigators right?

---

<div class="post-metadata">

### Author: ![v.krishna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/v.krishna/32/84811_2.png) [@v.krishna](https://community.thunkable.com/u/v.krishna)
#### Post date: [January 8, 2021, 8:12am UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/9 "2021-01-08T08:12:44Z")

</div>

I need to see your blocks and can you show me please.

---

<div class="post-metadata">

### Author: ![saramdl.gaunde021](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@saramdl.gaunde021](https://community.thunkable.com/u/saramdl.gaunde021)
#### Post date: [January 8, 2021, 8:24am UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/10 "2021-01-08T08:24:39Z")

</div>

its like this at first screen

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/7/d7df17bd203d5ba3b285b72a80760daa5ec85409.png)

it said in korean so you may not understand though  
like i said, my app is not running at least one of these codes.  
it was, and it isnt now.

---

<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: [January 8, 2021, 8:30am UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/11 "2021-01-08T08:30:35Z")

</div>

The last update has some issues with the [Open] event of the screen.

---

<div class="post-metadata">

### Author: ![saramdl.gaunde021](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@saramdl.gaunde021](https://community.thunkable.com/u/saramdl.gaunde021)
#### Post date: [January 8, 2021, 10:12am UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/13 "2021-01-08T10:12:47Z")

</div>

yes i heard that… so what can we do now?

i already went through droped away my five months working project becuz it turned out, i used so many codes so if i insert one line more then thunkable doesn’t save. so i made it like 99% but i can’t add any single code so i droped it (becuz it was too hard to reducing codes and if i did but oviously i need more in the future) it was so terrible experience becuz i made it day and night so hard.

please thunkable team dont do this to me… seriously… 😭

---

<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: [January 8, 2021, 1:03pm UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/14 "2021-01-08T13:03:44Z")

</div>

> [@saramdl.gaunde021](#):
>
> whenever i launched it, it stuck on first screen.

Can you share a screenshot of the blocks you are using @saramdl.gaunde021?

* * *

> [@saramdl.gaunde021](#):
>
> all of my past versions having same problem.

That doesn’t sound right - are you trying to connect to an API somewhere that is having issues?

* * *

> [@saramdl.gaunde021](#):
>
> uploaded on github too.

Thanks - will take a look there now too

* * *

> [@saramdl.gaunde021](#):
>
> its like this at first screen

Are you doing any error handling here? If there’s an error when your app opens that can cause the crash.

Also noticing that you have two functions with empty sockets - you’re missing the starting values for \_tempList, \_randomNumber, \_lon, and \_lat - this seems like a very likely source of errors.

* * *

> [@saramdl.gaunde021](#):
>
> i used so many codes so if i insert one line more then thunkable doesn’t save.

This sounds like completely separate - and serious - issue. How many blocks do you have in your project in total?

---

<div class="post-metadata">

### Author: ![saramdl.gaunde021](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@saramdl.gaunde021](https://community.thunkable.com/u/saramdl.gaunde021)
#### Post date: [January 8, 2021, 1:07pm UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/15 "2021-01-08T13:07:45Z")

</div>

> [@domhnallohanlon](#):
>
> Can you share a screenshot of the blocks you are using @saramdl.gaunde021?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/a/daca89495008e14689f85bca15dfea2307fda6dd.png)  
here, loading animation and label  
and blocks here [Code not running on start - #10 by saramdl.gaunde021](http://community.thunkable.com/t/code-not-running-on-start/1042328/10)

---

<div class="post-metadata">

### Author: ![saramdl.gaunde021](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@saramdl.gaunde021](https://community.thunkable.com/u/saramdl.gaunde021)
#### Post date: [January 8, 2021, 1:09pm UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/16 "2021-01-08T13:09:16Z")

</div>

> [@domhnallohanlon](#):
>
> That doesn’t sound right - are you trying to connect to an API somewhere that is having issues?

oh i never thought about that. so you think it is not possible that if thunkable team changed something, but it never affect apk files (or iOS too) already published right?

---

<div class="post-metadata">

### Author: ![saramdl.gaunde021](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@saramdl.gaunde021](https://community.thunkable.com/u/saramdl.gaunde021)
#### Post date: [January 8, 2021, 1:12pm UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/17 "2021-01-08T13:12:25Z")

</div>

> [@domhnallohanlon](#):
>
> Are you doing any error handling here? If there’s an error when your app opens that can cause the crash.
> 
> Also noticing that you have two functions with empty sockets - you’re missing the starting values for \_tempList, \_randomNumber, \_lon, and \_lat - this seems like a very likely source of errors.

functions have no problem. it is intended to. just temporary variables only birth and terminate in those functions. but i think may API you mentioned cause problem. i used many of it.

---

<div class="post-metadata">

### Author: ![saramdl.gaunde021](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@saramdl.gaunde021](https://community.thunkable.com/u/saramdl.gaunde021)
#### Post date: [January 8, 2021, 1:24pm UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/18 "2021-01-08T13:24:52Z")

</div>

> [@domhnallohanlon](#):
>
> This sounds like completely separate - and serious - issue. How many blocks do you have in your project in total?

actually we talked about this before, i dont think i express accurately but.  
i counted now and there are 15 screens and total 27,577 codes 😆😭 its crazy right?  
at most almost 5 thousand codes in a screen. obviously becuz im not a good programmer but second of all there were same function since we cannot use function globally here (i know there is someway using timer but sometimes it has some limit so)

---

<div class="post-metadata">

### Author: ![saramdl.gaunde021](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@saramdl.gaunde021](https://community.thunkable.com/u/saramdl.gaunde021)
#### Post date: [January 8, 2021, 2:52pm UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/19 "2021-01-08T14:52:09Z")

</div>

> [@saramdl.gaunde021](#):
>
> > [@domhnallohanlon](#):
> >
> > That doesn’t sound right - are you trying to connect to an API somewhere that is having issues?
> 
> oh i never thought about that. so you think it is not possible that if thunkable team changed something, but it never affect apk files (or iOS too) already published right?

Nope. APIs are just fine  
i can’t imagine what changes and my apps (including more than 5 previous versions) doesnt working suddenly.

---

<div class="post-metadata">

### Author: ![saramdl.gaunde021](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@saramdl.gaunde021](https://community.thunkable.com/u/saramdl.gaunde021)
#### Post date: [January 9, 2021, 3:23am UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/21 "2021-01-09T03:23:26Z")

</div>

i found one.

> [@saramdl.gaunde021](#):
>
> ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/1/017e8de29e72ad6516d1259dd2639616c308ae13.png)

like this structure, i used navigator in navigator.  
still there is error i couldn’t find yet, beside it, when i nagivate a screen in navigator then it stops.  
so i moved screen outside nagigator, then it works.

i don’t know why this happen but @v.krishna mentioned there is navigator issue, so i tried and that was right. @domhnallohanlon

---

<div class="post-metadata">

### Author: ![saramdl.gaunde021](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@saramdl.gaunde021](https://community.thunkable.com/u/saramdl.gaunde021)
#### Post date: [January 9, 2021, 3:54am UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/22 "2021-01-09T03:54:14Z")

</div>

and firebase realtime db isn’t working. i mean cloud variable and realtime block too.  
if i get them to print, it just saying “null”

i double checked database url and api key and they remain just fine.

---

<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: [January 9, 2021, 3:59am UTC](https://community.thunkable.com/t/code-not-running-on-start/1042328/23 "2021-01-09T03:59:36Z")

</div>

Create a new project using the API keys and database URL to check connectivity with the Firebase RTDB and check if you are getting null.

[Next page](https://community.thunkable.com/t/code-not-running-on-start/1042328.md?page=2)
