GyverLibs/GyverPortal

AP Mode Error

CanGuveren opened this issue · 3 comments

I tried basic code. When the button is pressed, pressed will be written on the screen.

Code:

#include <Arduino.h>
#include <GyverPortal.h>

GyverPortal portal;

void build() {
GP.BUILD_BEGIN();
GP.THEME(GP_DARK);
GP.BUTTON("btn", "Button");
GP.BUILD_END();
}

void action() {
if (portal.click("btn")) Serial.println("pressed");
}
void setup() {
Serial.begin(115200);

WiFi.softAP("", "");

IPAddress IP = WiFi.softAPIP();
Serial.print("AP IP address: ");
Serial.println(IP);
Serial.println(WiFi.localIP());

portal.attachBuild(build);
portal.attach(action);
portal.start(WIFI_AP);
}

void loop()
{
portal.tick();
}

Serial monitor:
[E][WebServer.cpp:633] _handleRequest(): request handler not found
[E][WebServer.cpp:633] _handleRequest(): request handler not found
[E][WebServer.cpp:633] _handleRequest(): request handler not found
pressed

It basically works but is there any way to fix these errors?

I tried your code on esp8266. Have no errors

there is an interesting situation. the same code gives error on platform io but works without error on arduino ide.

I don't use platformio for esp boards, because it's pain in ass