kean / Get

Web API client built using async/await
MIT License
937 stars 74 forks source link

Crashes with Swift 5.7 and Xcode14 #60

Closed obrhoff closed 2 years ago

obrhoff commented 2 years ago

I'm seeing this crash with Get 1.0.3 on an iOS App (code got generated with CreateAPI).

Screenshot 2022-09-17 at 20 46 48
kean commented 2 years ago

Are you implementing this method (didCreateTask) in your code? Which thread does it get called on?

obrhoff commented 2 years ago

Those methods are not implemented. I will check next time, when I catch the crash. (it appears randomly)

kean commented 2 years ago

Thanks for the report. I'm able to reproduce it.

I think it's because didCreateTask, unlike all other delegate methods, is called synchronously on the callers thread, and not on the session's delegate queue.

kean commented 2 years ago

Fixed in 2.1.1

obrhoff commented 2 years ago

Thanks for the fix. Unfortunately CreateAPI didn't move yet to v2. Would it be possible to backport the fix?

kean commented 2 years ago

Yes, I created two patches, including 1.0.4 for 1.x.