[v2.0.6] iOS: crashes on https downloadFile() call
See original GitHub issueI realise that I may not be providing sufficient context and data, however I can positively state that up to v2.0.5 my app works flawless using several https:// downloadFile()
calls.
After updating, the app immediately crashes on the first downloadFile()
call.
Going back to v2.0.5 fixes this and it works as expected.
Here is as far as I can document the issue, an xcode debug screenshot after crashing:
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Sudden crash on launch from all TestFlight builds
The app runs fine under Xcode on an iPad connected by wire to my MacBook. When we publish the app in TestFlight, it...
Read more >FileZilla - The free FTP solution
FileZilla - The free FTP solution for both client and server. Filezilla is open source software distributed free of charge.
Read more >How to Fix Crashing Apps on an iPhone or Android?
Here, we have curated some of them for you, explaining some of the easiest and most common hacks to fix an app crash...
Read more >Xbox 360 Controller Emulator
Xbox 360 Controller Emulator” allows your controller (gamepad, joystick, steering wheel, pedals, etc.) to function on your PC as an Xbox 360 controller....
Read more >Roku Remote app crashes after 2 seconds - Roku Community
If there is an update for the Roku app, download it. ... Note that although my app shows 8.4.0.6, the App Store listing...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, I see. Seems to be a race condition issue. I’ll try to write a test case for this special case to find a working fix. But you’re right, for the first instance, I’ll need to revert this commit.
I finally reproduced this issue by changing my code to use downloadFile(). I’m not sure what it’s for, but there’s a
manager.responseSerializer = [SM_AFHTTPResponseSerializer serializer];
line in downloadFile(). I have no other calls to set the response serializer, and for whatever reason, that serializer returns an NSData* instead of a NSString*. When an uploadFile() call runs after a call to downloadFile(), it throws an exception because it can’t serialize NSData to JSON. It also appears to be opening a new socket for downloadFile(). I’m still looking into why that might be happening, but one workaround might be to remove the line that sets the responseSerializer, or add a new member variable for a SM_AFHTTPSessionManager that’s used only for downloadFile().