RESOLVED:onResponse(...,data) is empty in WebClientDAT even though data was received

I am experiencing that the returned ‘data’ object is empty when a response is received from a Flask server, even though you can see in the webClientDAT window that the base64 encoded image has indeed been received.

If you compare the webClientDAT in the top right corner to the Textport output in the top left corner, you can see the difference. The code is visible in the lower right corner.

I have the same TD patch running on another system where the problem does not occur.

The system with a problem:
Windows 10
TD Build: 2022.32660
Communicating with a Flask server running on Ubuntu in WSL

The system without the problem is
Win10
TD build 2022.31030
Communicating with a Flask server running on a linux-based HPC

I can also confirm that downgrading to 2022.31030 solves the issue.

In the latest official version, we fixed the onResponse callback so that it no longer groups multiple and subsequent server responses together, such as HTTP 100 continue or 302 redirect. They should now come through separately.

In your case that would mean two onResponse calls: one for 100 Continue and one 200 OK. The image will instead come through in the body of the 200 OK response, so your onResponse callback should be changed to reflect that.

1 Like