https://linen.dev logo
Deployment with static file crashes in Axum
# help
a
Environment
Copy code
OS: MacOS Ventura 13.0 (M1 tip)
Rust:
  - rustc 1.67.1 (d5a82bbd2 2023-02-07)
  - cargo 1.67.1 (8ecd4f20a 2023-01-10)
What I did I cloned a project with static files from the Axum tutorial and deployed it as is, and an error occurred. It worked fine for a while after deploying with
cargo shuttle deploy
, but after an hour or so, the error message After about an hour, the error
error="Run error: Custom error: failed to provision shuttle_static_folder :: StaticFolder"
occurred and the deploy crashed. What was the problem? Clone original repository: https://github.com/shuttle-hq/examples/tree/main/axum/static-files Error Logs When Deployed:
Copy code
🌱 Local ~/shuttle/static-file-test is πŸ“¦ v0.1.0 via πŸ¦€ v1.67.1
❯ cargo shuttle deploy

2023-03-09T14:48:22.676173587Z  INFO Entering queued state
2023-03-09T14:48:22.676203705Z TRACE shuttle_deployer::deployment::queue: getting a build slot
2023-03-09T14:48:22.682943872Z TRACE {uri="http://gateway:8001/stats/load"} shuttle_deployer::deployment::gateway_client: calling gateway
2023-03-09T14:48:22.686984211Z DEBUG hyper::client::connect::http: connecting to 10.99.48.65:8001
2023-03-09T14:48:22.691359220Z DEBUG hyper::client::connect::http: connected to 10.99.48.65:8001
2023-03-09T14:48:22.695963666Z DEBUG hyper::client::pool: pooling idle connection for ("http", gateway:8001)
2023-03-09T14:48:22.699271346Z TRACE {response="Response { status: 200, version: HTTP/1.1, headers: {\"content-type\": \"application/json\", \"content-length\": \"38\", \"date\": \"Thu, 09 Mar 2023 05:48:21 GMT\"}, body: Body(Streaming) }"} shuttle_deployer::deployment::gateway_client: Load response
I have attached the full log.
r
Hey, I’m assuming you’re running the latest Shuttle release? They recently fixed a bug with the StaticFolder model
a
It looks like the static folder lib was already updated to v0.11.3 so not sure what went wrong there
a
The repository was updated yesterday, so my environment was still "0.11.0". I will try it and let you know the result. Thank you.
With
shuttle-static-folder = "0.11.3"
, I no longer get the deploy crash error! Thank you very much. On the other hand, when I run the
cargo shuttle run
command and try to preview locally, all files in
assets
are now reset to blank. Is this an error only in my environment, or if not, is this problem recognized by the development team?
a
This bug's already been acknowledged and a fix is on the way so things should be running smoothly soonish
a
Thank you for your kind attention to detail! πŸ˜†
a
No worries 😁 feel free to let us know how you get on
3 Views