Invalid auth token when connecting to Blynk through WifiManager

Hi All,

I have been using Blynk with WifiManager on my Wemos D1 Mini for about a year or two now, and it has worked like a charm!

Recently, I have updated my libraries to:
Arduino IDE to 1.8.10
Blynk to 0.6.1
WifiManager to 0.15.0 - beta

Since then, I am unable to communicate with Blynk, and on my Serial Monitor I see:

[46610] Connecting to blynk-cloud.com:80
[46821] Invalid auth token

Although when I connect to Blynk without WifiManager (Blynk.begin(auth, ssid, pass);), with the same token, it works fine.

Is this a WifiManager bug, or am I doing something extremely stupid?

Here is my code:


#define BLYNK_PRINT Serial

#include <WiFiManager.h> 
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = "My_thirty_two_charac_autho_token";

void setup()
{
  // Debug console
  Serial.begin(9600);

 // wifi
  WiFi.disconnect();
  WiFiManager wifiManager;
  wifiManager.autoConnect("SMS Config WiFi");
  Serial.println("Connected!");
  WiFiManagerParameter custom_blynk_token("Blynk", "blynk token", auth, 34);
  wifiManager.addParameter(&custom_blynk_token);

  Serial.println(custom_blynk_token.getValue());
  wifiManager.autoConnect("Blynk");
  Blynk.config(custom_blynk_token.getValue());
}

void loop()
{
  Blynk.run();
}

//gets called when WiFiManager enters configuration mode
void configModeCallback (WiFiManager *myWiFiManager) {
  Serial.println("Entered config mode");
  Serial.println(WiFi.softAPIP());
  //if you used auto generated SSID, print it
  Serial.println(myWiFiManager->getConfigPortalSSID());
}

Hi!, could you solve this issue? Im facing the same thing.

Thanks a lot!

@marty1982 please don’t keep posting “me too” in old topics and expecting a sensible answer. Create your own topic, and provide the relevant information needed to obtain an answer to your issue.
I’ve locked this topic, and the other one where you’ve done the same thing.

Pete.