Fatal error: seekInputStream(to:) is not yet implemented in URLSession


(Ole G ) #1

Hello, sorry, my english is very bad...
I use URLSession just inside my own library written in pure swift with Foundation for Linux(Debian) without any frameworks. And sometimes I have this error

Fatal error: seekInputStream(to:) is not yet implemented: 
file Foundation/URLSession/NativeProtocol.swift, line 264

Illegal instruction

Please, help me :upside_down_face:

(Johannes Weiss) #2

Don’t worry, your English is just fine!

You are seeing this problem because the seekInputStream function is not implemented on Linux yet.
@IanPartridge do you know if there’s an issue implementing it or should it be quite straightforward?

(Ian Partridge) #3

The good news is that there is a PR to implement this here: https://github.com/apple/swift-corelibs-foundation/pull/1629

I have just kicked off the CI tests it. Hopefully we can merge soon and get a release out, as quite a few people have hit this problem.

(Ole G ) #4

@IanPartridge @johannesweiss
Guys, thanks for your answers, I appreciate it! I’m really-really can’t wait for this fix cause my app always crashing on seekInputStream(to:) :crazy_face: