# App keeps crashing on Android APK & Live

**URL:** <https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554>\
**Category:** Questions about Thunkable X\
**Created:** [May 26, 2021, 5:10pm UTC](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554 "2021-05-26T17:10:19Z")\
**Posts on this page:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [May 30, 2021, 4:51am UTC](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554/21 "2021-05-30T04:51:49Z")

</div>

Well…

I finally decided that doesn’t matter how big my screen is, I am going to recreate it. So I then created a brand new project, added a new screen & then manually added 150+ components in it. Everything worked fine, until I added a Web-Viewer. I have an HTML file in my app’s files/assets, whose task is to check whether an entered email is in a valid format.

The moment I set the web-viewer’s URL to my local file (`verifyemail.html`), and opened the screen in Thunkable Live, my app crashed. I then removed the URL, and added an actual URL (eg. [https://www.bing.com](https://www.bing.com)), and found that now it doesn’t crash. Then I added the local URL again, and it again crashed.

Since all these tests were done in a new test app, I tried the same thing on my original project (removing the local URL from the web-viewer) and found out that my original app doesn’t crash. It works very smoothly.

So turns out, all along the problem was not with the `navigate to` block, but with the web-viewer with the URL set to a local file.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/f/9fb96bf2f2e74ab4846ab36e992048f561c7b47a.png)

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [May 30, 2021, 5:01am UTC](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554/22 "2021-05-30T05:01:09Z")

</div>

But now, what should I do with the local file? I need to use both the files, because the only way I can check if the email is valid or not is through the first file, `verifyemail.html`. The second file’s task is to encrypt text, `encodedata.html`.

I send the `encodedata` file some text I need to encode through the web-viewer POST message method, and then receive the encoded data through the `received message` event; and then use the encrypted data further.

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/8/a81e66602eb8c607b25871290fb78a54f034dda2.png)

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/5/e59e42f6c115f2ab338c5dc5dadbf60765f8ad92.png)

* * *

The files worked all the time through the web-viewer. Everytime I would successfully get the email validation & the encoded data. The problem is, it just crashes my app.

Is there any way you could suggest, so not only I could use the local files with the web-viewer, but also prevent my app from crashing?

Thanks a lot! 😀

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [May 31, 2021, 3:24am UTC](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554/23 "2021-05-31T03:24:52Z")

</div>

@jared If I am right I remember you also worked with local HTML files in one of your apps - Do you have any advice on this? (refer to the last post)

Thanks!

---

<div class="post-metadata">

**Author:** ![jane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jane/32/27575_2.png) [@jane](https://community.thunkable.com/u/jane)\
**Post date:** [May 31, 2021, 9:50am UTC](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554/24 "2021-05-31T09:50:38Z")

</div>

Thanks for sharing this finding!  
If you open verifyemail.html in a normal web browser, does it look OK?  
If you get a sample HTML file from the internet and try to display that in your project, does it cause the same behavior?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [May 31, 2021, 11:36am UTC](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554/25 "2021-05-31T11:36:19Z")

</div>

So you first get the data and can see it but then the app crashes?

---

<div class="post-metadata">

**Author:** ![ninja\_x](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ninja_x/32/125825_2.png) [@ninja\_x](https://community.thunkable.com/u/ninja_x)\
**Post date:** [May 31, 2021, 11:50am UTC](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554/26 "2021-05-31T11:50:37Z")

</div>

My app is also crashing sometimes… I don’t know why

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [June 1, 2021, 11:58am UTC](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554/27 "2021-06-01T11:58:41Z")

</div>

Hi, @jane @jared!

First off, sorry for the delay - I’ve been unable to reply…

I tested all the points, and found out the following conclusions -

- I hosted that HTML file on my website (so it would be as `https://xyz.com/verifyemail.html`) and put its URL into the web-viewer in order to test it to see if it worked.

- The **web-viewer** doesn’t work & crashes the app when **set to invisible**.

- Both the online hosted HTML file & locally stored file showed crashes when they were set to a web-viewer which was invisible. They both started working when I added some height to the web-viewer.

**Conclusion:**  
The main problem lied in the invisible web-viewer. If a web-viewer is set to invisible/height=0px, then it would crash your app. If you really want to hide it, you can set it’s height to 1px, so it won’t be visible.

So, I did the same as above, and it worked. Thanks!

---

<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:** [June 1, 2021, 5:36pm UTC](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554/28 "2021-06-01T17:36:38Z")

</div>

This is what I did for the web viewer to work (DnD UI) to make it work. It never worked good if set to **invisible**.

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

---

<div class="post-metadata">

**Author:** ![bon.sosnowiczaninfi4](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bon.sosnowiczaninfi4/32/120125_2.png) [@bon.sosnowiczaninfi4](https://community.thunkable.com/u/bon.sosnowiczaninfi4)\
**Post date:** [November 4, 2021, 9:36am UTC](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554/29 "2021-11-04T09:36:44Z")

</div>

Resizing is ok, but how to bring previous size (full container)?

---

<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 4, 2021, 9:55am UTC](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554/30 "2021-11-04T09:55:36Z")

</div>

In DnD UI, there is no auto sizing therefore there is no `full container`.

---

<div class="post-metadata">

**Author:** ![bon.sosnowiczaninfi4](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bon.sosnowiczaninfi4/32/120125_2.png) [@bon.sosnowiczaninfi4](https://community.thunkable.com/u/bon.sosnowiczaninfi4)\
**Post date:** [November 8, 2021, 9:37am UTC](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554/31 "2021-11-08T09:37:12Z")

</div>

Ok solved it by setting

set WebViewer URL to BLANK (pink, empty field)

set column with WebViewer to false

---

<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:22pm UTC](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554/32 "2024-11-08T13:22:17Z")

</div>

Closed on November 8, 2024, 1:22pm UTC



[Previous page](https://community.thunkable.com/t/app-keeps-crashing-on-android-apk-live/1309554.md?page=1)
