Turnstile icon indicating copy to clipboard operation
Turnstile copied to clipboard

fatal error: Transfer completed, but there's no current request. NSURLSession

Open andrew804 opened this issue 8 years ago • 2 comments

When running in Linux with Swift version 3.0.2 after receiving a few requests to my Vapor server (perhaps in quick succession) I get the following fatal error:

fatal error: Transfer completed, but there's no current request.: file Foundation/NSURLSession/NSURLSessionTask.swift, line 794

Thanks to @LoganWright I narrowed the problem down to authenticating the incoming request with Turnstile Web. The issue only happens on Linux not macOS but is quite sporadic. The error occurs when Turnstile makes the request to Facebook.

andrew804 avatar Feb 22 '17 18:02 andrew804

This sounds like a Foundation bug... might want to report it at bugs.swift.org if you can find a way to reproduce it.

Try making requests with this HTTP Client: https://github.com/stormpath/Turnstile/blob/master/Sources/TurnstileWeb/URLSession+Turnstile.swift#L16 and see if you can reproduce the bug independent of Vapor/Turnstile.

edjiang avatar Mar 01 '17 22:03 edjiang

Seeing this as well.

hayesbiz1 avatar Apr 08 '17 14:04 hayesbiz1