fsNetworkHttpRequestPost callback crashes sim

Version: 1.2.11.0

Frequency: Consistently

Severity: Blocker
(Low - quality of life, workflow optimization, rare enough to not impact production, etc…
High - critical but workarounds are available, important feature not working as expected, frequent enough to impact production
Blocker - prevents from working on the project, prevents from releasing the product)

Marketplace package name: bug observable in SDK sample project

Context: SDK Sample

Similar MSFS 2020 issue: Works just fine in 2020

Bug description:
WASM network API is broken in 2024. Using an fsNetworkHttpRequestPost() call with a callback function causes the entire sim to hang and/or CTD on return from the callback function. During the callback function, a call to fsNetworkHttpRequestGetData(requestId), which returns valid data in 2020, in 2024 returns a pointer which is offset from the actual start of the response data by around 100 bytes or so. fsNetworkHttpRequestGetDataSize() appears unaffected. So if my response is a 200 byte json string, I’ll get 200 byte datasize, but the data pointer shows 100 bytes of the data string I sent in my POST call, followed by the first 100 bytes of the actual response. This behavior is observed both in my project and in the MSFS2024 NetworkAircraft sample project.

Repro steps: Load the NetworkAircraft sample project into MSFS2024 and click on the right-most screen to initiate the POST request.

EDIT: the NetworkAircraft sample actually uses fsNetworkHttpRequestPut() rather than fsNetworkHttpRequestPost(), however identical behavior is observed with both.

I believe this was fixed in SU1 1.3.7.0 through this item:

Fixed potential crashes (buffer overflow) when using the Network API to send a PUT HTTP request that returns a body

Can you check if you are still having this issue in SU1?

Best regards,

Eric / Asobo

1 Like

Seems to be fixed as of 1.3.23.0. Thanks!