Updated Arduino IDE libraries, now Tasmota on the Sonoff Basic won't connect to

I have a few Sonoff Basic switches that I have been flashing with Tasmota 6.1.1a using the Arduino IDE (V1.8.5). The first three went well and all I changed between them is the #define PROJECT line. When I got to the 4th and 5th Sonoff's, I started getting this error: "Connect failed as AP cannot be reached".

I downloaded the latest Tasmota source files and Tasmota compiles and flashes OK, but I keep getting the same AP contact error.

I downloaded the latest sonoff.bin file and flashed it with ESPeasy, and everything works fine. The Sonoff connects to the AP and I can change the parameters in the Tasmota console.

But I can't flash Tasmota from the Arduino IDE and connect to the network.
I can flash a sketch that I wrote that does basic network connection and MQTT processing, and it connects to the AP just fine.

Any ideas would be appreciated because I don't like it when things stop working. Plus I want to experiment with the code and I can't do it if the flash via Arduino won't let the Sonoff connect to the AP.

I did do a libraries update on the Arduino IDE before this problem appeared. This is the only thing I can think of that's changed.

Any tips of how to identify which of the library updates might be my problem would be appreciated.

try to erase the flash with esptool and then upload the sketch. the erase should clear WiFi RF settings. the settings don't work good if SDK version is changed (SDK is linked and uploaded with your sketch)

Also posted at:

If you're going to do that then please be considerate enough to add links to the other places you cross posted. This will let us avoid wasting time due to duplicate effort and also help others who have the same questions and find your post to discover all the relevant information. When you post links please always use the chain links icon on the toolbar to make them clickable.