Issue loading presets error message

I’m running WLED 11.0 and all of a sudden my presets have disappeared and I’m receiving the error message in the screen shot below:

“Sorry, there was an issue loading your presets”

I’m not sure how this happened. When I try to create a new preset and refresh the browser, I receive the same error. I had to factory reset WLED to clear the error and recreate my presets.

How do I prevent this error from occurring in the future? Is there an easy way to restore presets from the backup that is provided in the error message?

1 Like

This is very similar to one that Aircoookie answered in chat…

To restore your presets, go to http://[WLED-IP]/edit , open the file presets.json (if it doesn’t exist, create it) and replace the file contents with the preset data you copied

Thank you! I was able restore my presets using those steps!! That was easy!

Any idea why the presets disappeared to begin with? I was also seeing this error when the presets disappeared.

image

Hi! This is the second time this issue has happened so far - somehow your preset file got corrupted…

If you want to help me troubleshoot the issue should it happen again, you can send me the corrupted presets.json file before replacing it with the good version from the backup :slight_smile:

1 Like

Thanks Aircookie!

I’ll keep an eye out for the issue and send the json if it happens again.

Happy Holidays!

1 Like

Hi Aircookie, I’m having the same problem on my ESP32, and it happens every time I save a preset, and try to recall it after more than a few minutes. I have captured the presets.json file contents while it’s telling me that it cant load the presets. Can I send it to you to look at? If so, how do I send it? Thanks!

1 Like

Please disregard my earlier post. I found a thread on GITAnswer where Blazoncek talked about a bug in ESPHome-flasher where it reads the block size incorrectly, and so I reflashed my ESP32 at install.wled.me, and the problem seems to have cleared up. BTW, WLED is awesome!

2 Likes

I am having the same problem. It seems to have started after I updated to the vr 13 using the update option from the app.

Goodday,

I have the same issue on DigquadV3 board with LAN (2 boards, same issue. On V0.13.0-b6) Have not got a solution so far, just bumping the thread.

Have you tried a wipe and flash from scratch - USB, not OTA?

Seems to be a number of people with possible filesystem issues???

Hello divsys, I did OTA update, I am a little afraid to ask, but what is the best to do a clean install via USB? I have NodeMCU-PyFlasher-4.0-x64 and esphome-flasher just used a couple of years ago following a video from DrZzs. Is this the way and what steps exactly do I need to do?

I am a little afraid that I ruin the boards (dont have spare with LAN) and F* up my christmas display even more :frowning: Many thanks in Advance (2 years playing with WLED, but still only a user, nothing else!

You should be able to use the web installer at https://install.wled.me/, selecting the most recent release available (0.13.0-b4 on the web installer) and keeping “Clean Install” selected. A clean install will erase all your config and presets, so be sure to save all your settings before the clean install!

I’ll 2nd @mjg1088’s suggestion.
The web installer has been very effective for me on a variety of devices.
I would expect if you can’t get a good connection via USB, it simply won’t work and you’ll be no worse off.

Definitely worth a try at least on one of the 2 boards.

@Aircoookie I just got this issue, system isn’t letting me upload the files (because i’m a new user) but can if you want me to.

Had 5 presets set previously, everything was fine. Updated 2 of the presets 2 nights ago using mobile web (probably hit the save button a couple times while making changes).

Can pass over a copy of the corrupted json, the fixed json, and the backup version wled originally suggested (the corrupted file was just 2 spots, brightness was set to “o55” and a field was “fals” with a corrupted character at the end.

Running into this as well. On 13b4 and have about 10 presets. When I copy over one preset to another using the “Overwrite with state” check box, it corrupts the JSON every single time. In fact, the JSON in the “last good” window doesn’t work either, but if I reformat the JSON and then re-upload it after (via the /edit link), it seems to work.

I have the before/after config/backup files if it will help. But it is 100% reproducible.

1 Like

Does the issue carry forward to 13b6?

It is known that prettified JSON file will behave incorrectly when overwritten.

I wasn’t aware that b6 was out. Just backed up everything and upgraded to b6. When I tried it again, it still corrupted the presets.

Then, just read the post about prettified JSON, so just checked and my presets were “pretty” (from earlier testing). So I pushed them through a minifier and using the /edit tool (what a great thing to have!), replaced the presets with minified version.

Rebooted and so far, with b6 and minified presets, things now seem to be working. At least, I can select a preset and save it into another preset and the config does not appear corrupted (even after a page refresh and/or WLED reboot).

So looks like b6 is the fix!! Glad that was mentioned here!! :slight_smile:

Happy to take credit when you’re willing to do all the work :grinning:

Realistically, I’ll bet the minification was the real fix.
As @blazoncek mentioned, the JSON system really hates extra spaces, punctuation,line feeds, etc.
Nevertheless I’d stay on b6, lots of other good stuff in there.

Glad you’re back up.

I think it was really the b6 update, honestly.

I didn’t have “pretty” JSON when things first starting going wrong under b4. It was only “prettified” while I was trying to diagnose/fix the preset config JSON blob under b4.

The fact that it was still “pretty” after the b6 update was a definitely a complicating issue (that your note let me be able to fix), but the corrupting preset JSON was happening with b4 before anything else on normal (aka minimize/original) JSON.