Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main JSON response invalid #1

Open
YouCanNotBeSerious opened this issue Nov 22, 2023 · 4 comments
Open

Main JSON response invalid #1

YouCanNotBeSerious opened this issue Nov 22, 2023 · 4 comments

Comments

@YouCanNotBeSerious
Copy link

YouCanNotBeSerious commented Nov 22, 2023

Hi,

I get this error after uploading the code - the board is a Lolin S2 mini - esp32-s2 chip. Wondering if you could help with where to start?

Trying to access the UI in a browser I get "Main JSON response invalid"

I have completely erased flash, and no mods have been made to the code yet. I successfully configure wifi via the serial terminal and then get this error. Have tried several browsers so fairly sure it is not the client end. I have hit the "reset?" link on the page - then after reconfiguring wifi, same error.

@YouCanNotBeSerious
Copy link
Author

YouCanNotBeSerious commented Nov 22, 2023

I am investigating a feeling that it is to do with the flash storage... will try various SPIFFS and FAFFS partition options in the Arduino IDE, is this the right area to investigate?

It's hitting this exception - but I do see the "loading devices" circular image first, so there is images in the filesystem....and the background is green, with the error in red so some of the web server stuff is working.

function handleServerResponse(){
    if(xmlHttpRepository.readyState==4 && xmlHttpRepository.status==200){
        try {
            json_obj = JSON.parse(xmlHttpRepository.response);
        } catch (e) {
            hideWaiting();
            showError("Main JSON response invalid",true);
            return false;
        }

@YouCanNotBeSerious
Copy link
Author

Well, it all works fine with a Lolin D32 board with ESP32-WROOM-32 so I wonder what the difference is that cause it?

@datjan
Copy link
Owner

datjan commented Nov 23, 2023

I had a similar result in my tests.

Cheap ESP32 standard board works perfectly.
M5Stack Atom S3 Lite (ESP32-S3FN8) does not start correctly.

I never had problems with cheap standard ESP32 boards or Lolin boards. M5Stack Atom Lite and Matrix is working, too.

Unfortunately, since I don't have an S2 board, I can't reproduce the problem.
The only chance is to take a look into the developer mode of your webbrowser and look for the JSON response causing the error. Maybe there is a clue to the problem there

@YouCanNotBeSerious
Copy link
Author

YouCanNotBeSerious commented Nov 23, 2023

Thank you for replying, I have been having all kinds of fun today as you will see in your issue tracker :-)

I tried and somewhat successfully used HomeSpan in the past, but my coding skills are low so it seems like this project is exactly what I wanted, I can set up simple devices with no coding. Thank you for making this, it should have a lot more exposure!

So, for now I am happy just to change boards, once I have my things setup I will try and look in the browser if it will help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants