question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v2.0.6] iOS: crashes on https downloadFile() call

See original GitHub issue

I 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: image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
silkimencommented, Apr 8, 2019

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.

0reactions
chrisjdevcommented, Jun 16, 2022

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().

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found