FLEXTool / FLEX

An in-app debugging and exploration tool for iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Empty response for async bytes

flejmer opened this issue · comments

Environment

  • Platform+version: iOS 16.1.2
  • FLEX version: 5.22.10

Bug Report

I checked the FLEX networking debugger and requests that I make appear with empty response. That is not correct since I'm getting the data that is displayed on the app. I looked into similar issues mentioned in #603 and #611 but I'm not using firebase so it's not related.
I do networking using concurrency so perhaps that could be part of an issue with FLEX.
URLSession with bytes(for request: URLRequest, delegate: URLSessionTaskDelegate?) to be specific.

Mechanism in network history is listed as

NSURLSessionDataTask (delegate: _TtC10FoundationP33_1935C07EE287982D980AA89BB85ACEFA28URLSessionAsyncBytesDelegate)

Screenshot 2023-01-12 at 17 26 16

Platform+Version: iOS 15.x, 16.2
FLEX Version: 5.22.10

I think this is an issue specific to iOS 16 with capturing the response body when using the new async interface methods of URLSession introduced in iOS 15's Foundation updates. (Not just bytes, I see it with data as well)

I am experiencing the same behavior only when using the new async interface for URLSession, specifically data(for: URLRequest, delegate: URLSessionTaskDelegate?). Any calls to the non-async interface of URLSession continue to be captured and displayed in FLEX.

In the iOS 16.2 simulator, FLEX behaves exactly as shown above in @flejmer 's post. The response body shows as empty and it shows as "Awaiting Response" in the list of requests even after the app has received and process data from this call.

The exact same code in an iOS 15.0 simulator does show responses in FLEX.

I can confirm the same issue on my side.

Hey! An example project would be really helpful if someone can make one :)

I can also confirm this issue. I use standard dataTask(with request:, completionHandler:) and multiple requests are marked as Awaiting Response.

I took a quick stab at a demo project for this bug: https://github.com/brianplattenburg-delta/FLEXAsyncEmptyDemo

Is there any progress for this issue?

I had the same issue, empty response

Is there any progress on this issue?