https://linen.dev logo
Build failed (dashmap and IO errors)
# help
s
Build failed when running cargo shuttle deploy caused apparently by errors in some packages (dashmap, etc) and incompatible crates version (the debug info suggests me to recompile the crates using rustc 1.59, which I don't know how to downgrade? I'm on 1.65). (https://github.com/Yunichie/discord-smasaku-shuttle)
This is what I mean by "errors in some packages"
There are quite a lot of them
I'm using the latest version of cargo-shuttle already
tried to do whatever the debug info suggests me (cargo clean, cargo update, etc) still didn't solve the issue
I've also tried to
cargo shuttle project rm
and
cargo shuttle project new
again but none worked, as well as
cargo shuttle clean
k
Hey Yann! Yeah, we have an issue where crates with a
rust-toolchain.toml
override will install that toolchain and use it to compile those crates in our containers. I believe in your case the issue is with
dashmap
, which is brought in with the
cache
feature of serenity. There is a work-around for this, which is forking dashmap and removing the
rust-toolchain.toml
, and using the fork with a
[patch.crates-io]
in your
Cargo.toml
. You can see how this user achieved it by looking at their repo linked in this issue: . Hopefully we can find a solution where this work-around won't be needed soon, though.
s
Ah, yep, that's exactly what I'm running into
Thank you for the response! I'll try the workaround!
The workaround worked! but then, I got this error. I wonder what does this mean?
The error above is now resolved, I think there was some issue with cargo. Now, this
Copy code
2022-12-18T23:25:03.216816408Z ERROR {error="Internal I/O error: No such file or directory (os error 2)"} shuttle_deployer::deployment::queue: service build encountered an error
There is no file/dir call in my code. I wonder what causes it?
k
I'm not a 100% sure but it may be caused by
dotenv
, you could try to use our
shuttle_secrets
plugin for this instead:
s
Makes sense. I'll try that
k
We have an example for secrets with serenity that has a bit cleaner error handling here: . You can handle the error with anyhow
Context
s
That's indeed cleaner
No error being thrown anymore now. But, why is it "Deployment has not entered the running state"?
Oh, hey, my app is live!
I wonder why has it not entered running state even though my bot is online?
cargo shuttle deployment list
shows two loading deployment
And they are still loading now
k
Indeed, I was just looking at your apps logs and it did seem to be running, but still reporting
loading
state. We have a few issues with the deployment states not updating correctly when unexpected errors occur. We have an issue for it here:
I'm glad you got it working though! 🥳
We'll work on resolving this incorrect state issue, as well as the non-descriptive errors you got before in the coming weeks.
has not entered the running state
isn't the most helpful message 😄
s
I agree
Also, thank you for the help! Keep up the good work!
By the way, will I get notified if my deployment is down or something?
k
We don't have a system for that yet, no. And although we are in alpha and unforeseen issues occur, I would expect it to stay up barring major updates/events reported on our discord.
s
Got it. Thank you very much 👍
k
No prob!