unexpected token < in JSON at position 0

Nova

Apprentice elf
Joined
Dec 23, 2020
Messages
61
Location
Perth, WA
Hello,

I have just setup my show network using fpp and a handful of ESP32s running WLED. I have configured fpp to route between my home network and my show network so that I can access each esp from my home network. However, when I search http://192.168.1.85/proxy/192.168.2.101/ to connect to the esp, it loads the UI but then gives me this error:

unexpected token < in JSON at position 0
Connection to light failed!

If I connect my laptop to the show network directly, I can connect using the IP address mentioned above, but when I search http://192.168.2.2/proxy/192.168.2.101/ it still comes back with the error.
When I use Xlights, it can see that WLED is online and I can upload configurations to the controller. But when I click 'Open' it searches the above URL and fails.

Does anyone know how to fix this issue?
Thank You!

P.s.
My fpp exists on my home network as 192.168.1.85, and exists on my show network as 192.168.2.2.
The WLED controller exists on the show network at 192.168.2.101
 
Sounds like there is some code in WLED GUI that doesn't like being proxied through FPP. It may have something hard coded (expecting http://IPAddress/folder here whereas now it's http://fpp_ip/proxy/wledIP/folder) - and so it can't access the file.
I'll have a quick look tonight at the web code for WLED, but I don't think there's anything straight up that you can do to fix it if you're using the FPP proxy method.
 
I'm running 1.13 beta 5 release. The newer versions don't work with xlights
 
That error typically means that something is returning a html body instead of JSON. I’ve never looked at FPP connect to understand fully how it works though. Does it try and modify anything?
 
last version of wled that ive found to work with xlights is (WLED_0.13.0-b5_ESP32_Ethernet) UNLESS you use the nightly builds
 
From what I'm reading above, xLights API connectivity via the FPP is working fine, it's just the Web GUI for WLED that's not working?
 
Looking further into this tonight - it's using Websockets to connect from the UI to the back end.
This most likely won't be supported in the FPP instance out of the box. I'm running up a version now to see if there are config changes to support it.
I believe that WLED can be compiled without WS support, but this would require more effort.
 
That error typically means that something is returning a html body instead of JSON. I’ve never looked at FPP connect to understand fully how it works though. Does it try and modify anything?
I had a look at the source html that is sent to WLED. I'm no wizard when it comes to html, but it seems as though somthing is not parsed to JSON correctly. Almost as if a section has been missed when converting to JSON? I will upload a text file with the html soon where the error occurs.

Xlights can upload outputs to the controllers so it is a very specific issue, rather than general communication between the two programs.
 
last version of wled that ive found to work with xlights is (WLED_0.13.0-b5_ESP32_Ethernet) UNLESS you use the nightly builds
I originally installed 0.13.1 but then downgraded to 0.13.0-b5 because xlights did not like the current version and so it recommended this one.
 
Yes, the later releases are broken for xLights config push, this has been fixed in the code but not released yet (0.13.2 will have it).

Let me just re-iterate the problem so we understand it clearly -
* xLights is unrelated here - it's pushing config fine.
* WLED web interface works fine when accessing it from your show network
* WLED web interface gives an error when using FPP Proxy (putting IP into FPP, and clicking the link)

Is that correct?
 
Looking further into this tonight - it's using Websockets to connect from the UI to the back end.
This most likely won't be supported in the FPP instance out of the box. I'm running up a version now to see if there are config changes to support it.
I believe that WLED can be compiled without WS support, but this would require more effort.
Because this is my first time working with fpp, I am not 100% sure of the capabilities/features it can provide.

Does fpp truly bridge my home network connection?
I understand that it allows other programs and devices to access anything on my show network. But that would only be half a bridge? In a true bridged connection, it should give devices on my show network a connection to the internet (world wide web). If not, what is the point of setting up a DNS address on fpp? It doesn't need one.
Also, I cannot ping any device that exits on my show network (understandably) but I get very limited results when it comes to pinging from my show network to my home network. I can sometimes ping my home router but then other times it can't read the destination. My home network is DHCP but I have set static routes for my APs and Router.

I'm not sure if this affects what was mentioned above, but thought it might be useful.
 
Last edited:
Yes, the later releases are broken for xLights config push, this has been fixed in the code but not released yet (0.13.2 will have it).

Let me just re-iterate the problem so we understand it clearly -
* xLights is unrelated here - it's pushing config fine.
* WLED web interface works fine when accessing it from your show network
* WLED web interface gives an error when using FPP Proxy (putting IP into FPP, and clicking the link)

Is that correct?
Yes. That is correct.
 
Back
Top