I just fixed mine, had this same error and it would not save any values to NV. I had to make the following changes to the Arduino IDE for ESP32 settings:
I changed flash mode to DIO as per instructions (my fault)
I enabled PSRAM
Not sure which setting was the fix or both were needed.