Comments (8)
created PR apple/swift-corelibs-foundation#2061
from kiturakit.
@Andrew-Lees11 could you document the double invocation of the callback you found from URLSession.dataTask when Kitura sends a 401: Unauthorized
response? And also link to the StackOverflow issue you found which is likely to be the same / related to this.
I wonder if this is somehow related to apple/swift-corelibs-foundation#1569 - in which case maybe @saiHemak could investigate?
from kiturakit.
I created a gist that would recreate the test failure here.
When a Kitura server returns a 401 unauthorized code the callback on URLSession.dataTask is called twice. once with "The operation could not be completed" and then with the response from Kitura. This is not true for other error codes and only happens on Swift 5 on Linux.
I think This Stackoverflow error May be running into the same problem since it is only failing on Linux but i'm not entirely sure.
from kiturakit.
Could successfully recreate the issue from TestFoundation. Upon instrumenting the code I could see the TaskRegistry.remove
is getting called twice . Instrumenting further to identify why the remove
call has been triggered twice ..
from kiturakit.
@saiHemak this seems to be reported over Twitter too https://twitter.com/mxcl/status/1111073495017029635
from kiturakit.
session.taskRegistry.remove(task)
has been called twice once from urlProtocol(`protocol`, didFailWithError: urlError)
and the from the switch case case .dataCompletionHandler(let completion):
from kiturakit.
Please open an issue to track re-enabling these tests once Swift 5.0.1 ships with the fix.
from kiturakit.
Raised an issue to uncomment the tests here
from kiturakit.
Related Issues (9)
- Support custom encoders/decoders HOT 1
- Publish Cocoapod and dependancies HOT 1
- Uncomment linux test once foundation bug resolved
- Support JWT authentication HOT 1
- Fails to deserialize complex JSON object without error HOT 1
- Release v1.0
- Kitura Extra argument 'query' in call
- Make extensions of public structs public HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kiturakit.