-
Notifications
You must be signed in to change notification settings - Fork 181
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
Julia 1.8.0-beta1 gives 404 errors #803
Comments
Can you test with the master branch? |
Same error
|
Because of JuliaWeb/HTTP.jl#803
Why does it say that? Must be something on your system, perhaps you are already running a server on the port that HTTP.jl tries to use in the tests? I can't replicate the error on my machine. |
I believe the problem is how you dynamically generate the router in PlutoSliderServer. It never seens the new endpoints and always just hits the fallback. This diff makes test pass for me $ git diff
diff --git a/src/PlutoSliderServer.jl b/src/PlutoSliderServer.jl
index 72f7ce4..ea84a41 100644
--- a/src/PlutoSliderServer.jl
+++ b/src/PlutoSliderServer.jl
@@ -280,7 +280,7 @@ function run_directory(
params = HTTP.queryparams(HTTP.URI(request.target))
- response_body = HTTP.handle(router, request)
+ response_body = Base.@invokelatest HTTP.handle(router, request)
request.response::HTTP.Response = response_body
request.response.request = request |
I see, thanks so much fredrik! This isn't the first time that the router got me confused, but it looks like this will improve in the future: #786 (comment) I will close this and leave the HTTP.jl test failures up to you :) I might be able to help with improving the stability of the HTTP.jl tests if you think I that would be welcome? Right now the tests seem to fail quite often, which makes me worried about using HTTP.jl in other projects. Thanks again! |
I noticed that tests are failing on my package PlutoSliderServer.jl on Julia 1.8.0-beta1, the server is responding with empty 404 responses, which are not being sent from my code, but by HTTP.jl itself. The same code runs without errors on 1.7.
Example of test failure, not very minimal yet: https://github.com/JuliaPluto/PlutoSliderServer.jl/runs/5456108751?check_suite_focus=true#step:4:938 This 404 is not coming from my code (there is no endpoint that returns 404 without body. I added logs locally to verify that my 404 endpoints are not being hit).
Opening the domain in Chrome also shows 404 with an empty body.
Running the HTTP tests also fails on 1.8, with one similar-looking error:
HTTP test failure output
Let me know if this HTTP test failure is helpful. (There are instructions on setting up CI for the 1.8.0 beta on discourse, it would be great if HTTP.jl would have that.) If not, I could work on turning my test failures into a MWE...
Versions
The text was updated successfully, but these errors were encountered: