Got the same GPIO error msg...
Changing the ESP32 Espressif boards back to v 2.0.17 worked for my M5Stick C also. Never would have found that. Thanks greatly!