flipper: iOS network observer has thoroughly broken swizzling
🐛 Bug Report
The iOS network observer has thoroughly broken swizzling; when it calls the original delegate method, it sends the incorrect selector, causing errors
_cmd here is incorrect. It should be URLSession:dataTask:didReceiveResponse:completionHandler:, but as you see, it’s something else. This is broken behavior, and breaks code that use the well known pattern [proxyObj respondsToSelector:_cmd].
To Reproduce
Put a breakpoint in any NSURLSession delegate method.
Print _cmd.
Environment
iOS 13.5 and iOS 14.2
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 56 (24 by maintainers)
I will take a look to see if I can come up with a PR. Thanks
Hey @mweststrate! As a fellow Detox maintainer, I have to stick to Leo’s approach that while there’s no immediate issue with flipper itself, fixing integration issues with other products is as important. All the more so, when we’re discussing Detox. Be advised, Detox itself is used as the de-facto regression tool for RN releases – it could create a real jam-in-wheels case IMO, if not fixed. For now, we’ve applied an ugly workaround that disables flipper; It’s a matter of time till that backfires.
I have provided all the details that an iOS engineer needs to debug the issues, not just a screenshot. But the screenshots are enough to show the problem also. I assume you have iOS engineers that work on the product? They are the ones that should judge the provided information, with all due respect. If something is missing, I’ll be happy to provide.
As to urgency, we recently released Detox 18, which had to provide custom code to disable your product. Is that acceptable to you? Detox is the most widely used end to end testing framework for React Native software.