Ivan Todorov
ย ยทย Founder at โœจ Vibes + Logic ๐Ÿค–

Enum <> String Cashing Bugsy Bug

In my Firebase I have a Media collection with a field called "type" which initially was a String. I'm noticing several caching issues I'm able to reproduce.

I deleted and recreated "type" as Enum (MediaTypes) and I wired my UI.

Firebase stopped saving my record when I used the Enum to populate the type, and in different places was complaining about not able to convert "MediaTypes" presumably into String when I was doing filtering operations with Enums (not sure if I'm supposed to do that)

To roll things back I deleted the Enum "type" field and replaced "type" with a String, and deleted the MediaTypes Enum all together.

After a brief moment my errors automatically went from 10 to 1, it seemed FF tried to auto-fix the issue by automatically remapping the old "type" Enum to the new "type" String, but still catching the old Enums, and hiding the errors that link you to all the places to remap as strings. Below is a screenshot of a cashed Enum when in the project that field is already a String.

2
2 replies