# State is null and cause component deletion failure

**URL:** https://community.thunkable.com/t/state-is-null-and-cause-component-deletion-failure/1495448
**Category:** Questions about Thunkable X
**Tags:** bug
**Created:** [September 8, 2021, 10:45pm UTC](https://community.thunkable.com/t/state-is-null-and-cause-component-deletion-failure/1495448 "2021-09-08T22:45:14Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![kabelee92p1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kabelee92p1/32/108594_2.png) [@kabelee92p1](https://community.thunkable.com/u/kabelee92p1)
#### Post date: [September 8, 2021, 10:45pm UTC](https://community.thunkable.com/t/state-is-null-and-cause-component-deletion-failure/1495448/1 "2021-09-08T22:45:14Z")

</div>

You can find the project here: [Thunkable](https://x.thunkable.com/copy/c1db6f27fff246cb56c495ddc4d5f766)

Steps to reproduce:

1. Try to delete any component (e.g., Home Screen → Get Started button)
2. Nothing is deleted
3. Check the browser console, and there will be an error “Cannot convert undefined or null to object”
4. This error is related to a redux reducer, I believe. The state (variables.js) is somehow null, which I think is unexpected.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/f/6fca6928c7fa5eac6b13c93e3c8dbd1f2880b04a.png)

This is very frustrating as my students in a class are looking forward to using Thunkable to build their apps, but it seems issues keep coming. Hope it can be solved ASAP, and I can help if possible.

---

<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: [September 9, 2021, 3:31am UTC](https://community.thunkable.com/t/state-is-null-and-cause-component-deletion-failure/1495448/2 "2021-09-09T03:31:19Z")

</div>

I think it’s a corrupt project. Have you tried creating a new project to see if the problem exists there? You might want to reach out to Thunkable staff via the chat icon at the bottom-right of the projects page (or from within the project itself).

---

<div class="post-metadata">

### Author: ![kabelee92p1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kabelee92p1/32/108594_2.png) [@kabelee92p1](https://community.thunkable.com/u/kabelee92p1)
#### Post date: [September 9, 2021, 4:47pm UTC](https://community.thunkable.com/t/state-is-null-and-cause-component-deletion-failure/1495448/3 "2021-09-09T16:47:20Z")

</div>

Thanks for the reply! I was wondering the same, as I noticed there was an issue with the Thunkable server yesterday afternoon. And the student was working on the project during the time. To answer your question, creating a freshly new project does NOT have this issue. However, I am curious why corruption would happen and think it should be handled more properly. Thanks for the tips and I will contact the team!

---

<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: [September 9, 2021, 4:56pm UTC](https://community.thunkable.com/t/state-is-null-and-cause-component-deletion-failure/1495448/4 "2021-09-09T16:56:07Z")

</div>

I would agree that corruption shouldn’t happen but… it sometimes does. That being said, I’ve used Thunkable for a while and created hundreds of projects and had this happen very rarely. It’s generally reliable.

And there was a server error last night that may have compounded things.

---

<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: [September 9, 2021, 4:56pm UTC](https://community.thunkable.com/t/state-is-null-and-cause-component-deletion-failure/1495448/5 "2021-09-09T16:56:11Z")

</div>

Many users are experiencing failures in projects designed by StP (Snap to Place) UI also called Legacy UI. Not every project but projects that have `Web API` components.

Are you using it in that project?

---

<div class="post-metadata">

### Author: ![kabelee92p1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kabelee92p1/32/108594_2.png) [@kabelee92p1](https://community.thunkable.com/u/kabelee92p1)
#### Post date: [September 9, 2021, 5:01pm UTC](https://community.thunkable.com/t/state-is-null-and-cause-component-deletion-failure/1495448/6 "2021-09-09T17:01:24Z")

</div>

Thanks for the heads-up. But the student was using the DnD interface and the only blocks the student used were Click a button then Navigate to a new screen. The student also did not use `Web API` components.

---

<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: [September 9, 2021, 5:05pm UTC](https://community.thunkable.com/t/state-is-null-and-cause-component-deletion-failure/1495448/7 "2021-09-09T17:05:12Z")

</div>

Another member reported a similar behavior with his project.

> [@Events Not Working](https://community.thunkable.com/t/events-not-working/1495834/24):
>
> I found that after removing the buttons in my project, it stopped crashing.

---

<div class="post-metadata">

### Author: ![wei](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/wei/32/26160_2.png) [@wei](https://community.thunkable.com/u/wei)
#### Post date: [September 9, 2021, 11:43pm UTC](https://community.thunkable.com/t/state-is-null-and-cause-component-deletion-failure/1495448/8 "2021-09-09T23:43:20Z")

</div>

This issue is fixed. I believe I replied you in the forum.

Wei

---

<div class="post-metadata">

### Author: ![kabelee92p1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kabelee92p1/32/108594_2.png) [@kabelee92p1](https://community.thunkable.com/u/kabelee92p1)
#### Post date: [September 9, 2021, 11:58pm UTC](https://community.thunkable.com/t/state-is-null-and-cause-component-deletion-failure/1495448/9 "2021-09-09T23:58:16Z")

</div>

Yep! Thanks for the quick fix!  
Solution: There is no operation required from the user end, but an internal bug fix I believe.

---

<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:16pm UTC](https://community.thunkable.com/t/state-is-null-and-cause-component-deletion-failure/1495448/10 "2024-11-08T13:16:54Z")

</div>


