You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Through much trial and tribulation I have discovered that the reason the Oak setup page could not connect is that the JSON being returned from the main web server is not well formed. If the SSID of any network within range has a backslash in it that does not create a "proper" JSON escape sequence, the parse JSON call in the web page rejects it (correctly) as malformed JSON and refuses to continue.
In that line, the contents of the SSID are dumped directly into the JSON without any escaping. Any strings put into the JSON need to be properly escaped to prevent this from happening. It's pretty uncommon to have a backslash in your SSID, I admit, but this took a long time to track down. The setup webpage only said that it couldn't connect, which is false, and I had to create my own versions of the page with error logging added to see what the actual problem was.
I'm personally debating doing a PR or just continuing on with my hacked up workaround to properly escape the JSON on the client side.
The text was updated successfully, but these errors were encountered:
Through much trial and tribulation I have discovered that the reason the Oak setup page could not connect is that the JSON being returned from the main web server is not well formed. If the SSID of any network within range has a backslash in it that does not create a "proper" JSON escape sequence, the parse JSON call in the web page rejects it (correctly) as malformed JSON and refuses to continue.
The root cause is here:
OakSystem/OakSystem.ino
Line 296 in b3011fd
In that line, the contents of the SSID are dumped directly into the JSON without any escaping. Any strings put into the JSON need to be properly escaped to prevent this from happening. It's pretty uncommon to have a backslash in your SSID, I admit, but this took a long time to track down. The setup webpage only said that it couldn't connect, which is false, and I had to create my own versions of the page with error logging added to see what the actual problem was.
I'm personally debating doing a PR or just continuing on with my hacked up workaround to properly escape the JSON on the client side.
The text was updated successfully, but these errors were encountered: