Ran into same problem.
For me it was an issue with library/package versions - its important to stick exactly to the versions listed by @frittna
// name: from: version search library manager exactly for:
// ---------------------------------------+------------------------------------------+------ + --------------------------------------------------------------|
#include "Free_Fonts.h" // Library | Arduino | | |
#include <WiFi.h> // Board-pkg| -> Problems? look in the compiler log window what version of WiFi.h is used -> its the ESP32 version **see below |
#include <Preferences.h> // Library | Arduino | | |
#include <M5Stack.h> // Library | Arduino Librarymanager M5Stack | 0.3.1 | "M5Stack" |
#include <Timezone.h> // Library | Arduino Librarymanager Jack Christensen | 1.2.4 | "Timezone" |
#include <time.h> // Library | Arduino Librarymanager Michael Margolis | 1.6 | "timekeeping" |
#include <WebSocketsClient.h> // Library | Arduino Librarymanager Markus Sattler | 2.3.0 | "Websockets" watch for the exact version! |
#include <ArduinoJson.h> // Library | Arduino Librarymanager Benoit Blanchon | 6.17.3| "ArduinoJson" |
#include "M5StackUpdater.h" // Library | Arduino Librarymanager SD-Menu Loader | 0.5.2!| "M5Stack SD" i use 0.5.2 , not new 1.0.2 because of problems |
#include <Adafruit_NeoPixel.h>// Library | Arduino Librarymanager Adafruit NeoPixel | 1.7.0 | "Adafriut Neopixel" |
#include "FS.h" // Tool | github: esp32fs for SPIFFS filesystem | 1.0 | https://github.com/me-no-dev/arduino-esp32fs-plugin |
// ---------------------------------------+------------------------------------------+-------+----------------------------------------------------------------
Also, be sure to use esp32 version 1.04 from the Board Manager. 1.06 did not work for me given the above versions.
Cheers,
Silvereq