# App Crash on Download but not live test (Mobile App)

**URL:** <https://community.thunkable.com/t/app-crash-on-download-but-not-live-test-mobile-app/1632644>\
**Category:** Questions about Thunkable X\
**Tags:** apk, crash\
**Created:** [November 24, 2021, 8:29pm UTC](https://community.thunkable.com/t/app-crash-on-download-but-not-live-test-mobile-app/1632644 "2021-11-24T20:29:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashesdroid](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ashesdroid/32/127531_2.png) [@ashesdroid](https://community.thunkable.com/u/ashesdroid)\
**Post date:** [November 24, 2021, 8:29pm UTC](https://community.thunkable.com/t/app-crash-on-download-but-not-live-test-mobile-app/1632644/1 "2021-11-24T20:29:13Z")

</div>

Hello all,

I recently trimmed down the code blocks on my mobile app. There were some redundant things (lists mostly) that I don’t need now that I understand better how Thunkable works. It works perfectly on the Thunkable Mobile test app. All screens work, logic is clean, nothing is broken.

However, when I download the APK to test on my Android, things change. The app opens as it should, and all screens - except one - work. It is a progress tracker screen. If there is no progress triggers activated when I tap on the “Progress” screen then the app goes back to the Thunkable splash screen and gets stuck. However, if I do a task that I know awards progress, the app no longer crashes when I go to the “Progress” screen. I’m not sure how to diagnose this - other than adding back the redundant code… which I would really rather not do. It’s just bloated with it. I’ll post a Google Drive link to a video I grabbed of it in action:

> **[Screen\_Recording\_20211124-120752\_ALOHA Chain Analysis Deck.mp4 (video)](https://drive.google.com/file/d/1yrNjmM2vvRx0W2sebk-_PjvqA0ha9V6r/view?usp=sharing)**
>
> Google Drive file.

Any ideas how to diagnose it, solve it, or trouble shoot it would be helpful.

Thank you in advance,  
Ash

---

<div class="post-metadata">

**Author:** ![ashesdroid](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ashesdroid/32/127531_2.png) [@ashesdroid](https://community.thunkable.com/u/ashesdroid)\
**Post date:** [November 24, 2021, 8:32pm UTC](https://community.thunkable.com/t/app-crash-on-download-but-not-live-test-mobile-app/1632644/2 "2021-11-24T20:32:32Z")

</div>

Just in case anyone is curious, here is the framework of my logic blocks.

 ![ProgressScreenLogic](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/d/5d41c90a8f5ced51b2985b589eeac2d66d5f4d0a.jpeg)

It’s big, so I zoomed way out but not enough to get all of the blocks. They are just more of the same with different triggers.

---

<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:** [November 25, 2021, 2:30am UTC](https://community.thunkable.com/t/app-crash-on-download-but-not-live-test-mobile-app/1632644/3 "2021-11-25T02:30:21Z")

</div>

I can see you use `stored variable`. Remember that `stored variables` when initialized holds the value of **null** so before using them make sure you set them up or better to check your stored variable at the start of your app and whichever is equals to **null** reset it to the value that fits your app.

Most probably your app works in Live Test because the `stored variable` is not null but when you installed the APK all `stored variables` are rested back to **null** which caused this behavior.

---

<div class="post-metadata">

**Author:** ![ashesdroid](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ashesdroid/32/127531_2.png) [@ashesdroid](https://community.thunkable.com/u/ashesdroid)\
**Post date:** [November 25, 2021, 4:17pm UTC](https://community.thunkable.com/t/app-crash-on-download-but-not-live-test-mobile-app/1632644/4 "2021-11-25T16:17:23Z")

</div>

Thank you! I’m going to play around with it today and see if I can figure out a logic so that the stored value doesn’t get reset each time the app loads. Would I be better off using an `App Variable` instead of using a `Stored Variable`? I’m going to try it anyways and see how it works; but if you have a better way of using variables, I’m all ears!

Even if this isn’t my problem, I really appreciate the detailed and clear answer. It helps me a lot.

---

<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:** [November 25, 2021, 4:47pm UTC](https://community.thunkable.com/t/app-crash-on-download-but-not-live-test-mobile-app/1632644/5 "2021-11-25T16:47:33Z")

</div>

The use if any type of variable is related to the use case you are considering.

- An `App variable` holds data as long as the app is running and once the app is closed, it loses the data and reinitialized the next time the app runs.
- A `Stored variable`, as its name implies, stores the value of it even after the app is closed. This variable is initialized as **null** the first time the app runs and there are a number of functions or components that does not like **nulls** to be passed to them. You need to check if this variable holds data before trying to assign it to another component. It should be noted that `stored variables` are stored in the user’s device and can only be accessed by the app created them.
- A `Cloud variable` again from the name it refers to values saved in a **cloud storage**. When ever this variable is updated the cloud storage is also updated and other apps could see the update.

Hope this clarifies the different variable types.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [February 23, 2022, 4:47pm UTC](https://community.thunkable.com/t/app-crash-on-download-but-not-live-test-mobile-app/1632644/6 "2022-02-23T16:47:58Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
