# bad type error

**URL:** <https://community.fly.io/t/bad-type-error/9133>\
**Category:** General\
**Tags:** elixir, phoenix-files\
**Created:** [December 2, 2022, 7:46am UTC](https://community.fly.io/t/bad-type-error/9133 "2022-12-02T07:46:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazarynfly](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@mazarynfly](https://community.fly.io/u/mazarynfly)\
**Post date:** [December 2, 2022, 7:46am UTC](https://community.fly.io/t/bad-type-error/9133/1 "2022-12-02T07:46:34Z")

</div>

Hi, We are developing a web social network and launched it on fly, use Mnesia as a Database, everything worked well but after developed Mail Approval and tested it locally we get bad type error on fly, the issue is that we don’t face any error locally and it’s happening just on launched app on fly, We restarted the app but the issue is exists, Don’t know how to fix it, can it be related to fly.toml or do we lack Sth ?

> **[GitHub - mazarynio/mazaryn: an online community which empower users to be...](https://github.com/mazarynio/mazaryn)**
>
> an online community which empower users to be more productive & explore their talents! - mazarynio/mazaryn

[https://mazaryn.io/](https://mazaryn.io/)

---

<div class="post-metadata">

**Author:** ![jaeyson](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jaeyson/32/44176_2.png) [@jaeyson](https://community.fly.io/u/jaeyson)\
**Post date:** [December 5, 2022, 8:51am UTC](https://community.fly.io/t/bad-type-error/9133/2 "2022-12-05T08:51:48Z")

</div>

To those experiencing the same issue: you might want to try to remove the contents of the mnesia dir (in this example) although the cons here is your data will be wiped out. then redeploy the instance. Part of the reason (I guess) why it’s throwing `bad_type` is because the data type of the field previously wasn’t the same as now.
