Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftyRequest crashes randomly on Linux due to NSUnimplemented #25

Closed
mman opened this issue May 3, 2018 · 9 comments
Closed

SwiftyRequest crashes randomly on Linux due to NSUnimplemented #25

mman opened this issue May 3, 2018 · 9 comments
Assignees

Comments

@mman
Copy link

mman commented May 3, 2018

Using SwiftyRequest in production randomly crashes the process with

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

Not sure where is this called from but looks like somewhere deep in Linux URLSession code, not necessarily the SwiftyRequest code.

@ianpartridge
Copy link
Contributor

Hmm yes I think this is a limitation in the current implementation of URLSession on Linux. @pushkarnk @nethraravindran do you have any thoughts on this? Could we implement seekInputStream()?

@ianpartridge
Copy link
Contributor

As this is not a SwiftyRequest issue per se but caused by the implementation of URLSession on Linux I'm closing this for now.

@mman
Copy link
Author

mman commented Oct 11, 2018

This issue should not be closed as it falsely leads people to believe that SwiftyRequest works on Linux, whereas if I am not missing anything it still randomly crashes via NSUnimplemented as seekInputStream() still remains unimplemented. Thus using this library on Linux will crash randomly as of swift 4.2.

@ianpartridge
Copy link
Contributor

I'd accept PRs updating the documentation to make this clearer. However, seekInputStream() is in the process of being implemented so this is all going to resolve itself in due course.

@mman
Copy link
Author

mman commented Oct 11, 2018

Whatever works for you @ianpartridge. It's just that I came back after 6 months and almost accidentally pulled in SwiftyRequest believing it's all good and shiny while it still crashes.

@ianpartridge
Copy link
Contributor

That's fair. I've just updated the README to warn people accordingly. Thank you.

@mman
Copy link
Author

mman commented Oct 11, 2018

@ianpartridge 👍

@hyouuu
Copy link

hyouuu commented Apr 25, 2019

Do you guys know why it happens randomly and not every time?

@hyouuu
Copy link

hyouuu commented Apr 25, 2019

Screen Shot 2019-04-25 at 12 06 06 PM

Found someone's explanation for anyone interested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants