https://linen.dev logo
Cannot Deploy Any Project with Shuttle
# help
b
I closed my previous "Deployment Difficulties" thread in favour of starting fresh. It seems I cannot deploy any project with Shuttle, on any computer I try from, be it WSL on a Windows machine or MacOS on my M1 MacBook Pro. Here's a summary of my latest attempt, from my Windows 11 desktop running WSL 2: 1. I used cargo shuttle login to login to the service. I verified the API key was recorded correctly in ~/.config/shuttle/config.toml 2. I made a fresh, empty directory in ~/dev/source/repos called "shuttle-axum-boilerplate". I changed into that directory and ran cargo shuttle init --axum. 3. I responded to the questions, putting the boilerplate code in ./server. I answered "no" to setting up a new shuttle project (thought I'd do that after). The code is the same as in the "Axum" example on the website. 4. I changed into the ./server directory and did a cargo build, followed by a cargo shuttle run to run locally. Everything works. 5. I did cargo shuttle deploy and received a 404 error, with the message that I needed to run 'cargo shuttle project new'. 6. I ran 'cargo shuttle project new' and was rewarded with a 400 bad request, with the message that a project with the same name already exists. 7. I did a cargo shuttle project list and there is no project with the same name. Kind of stuck and not sure what to do next to resolve. I have one project deployed with shuttle and it's working great, even after I upgraded it from 0.9.0 to 0.10.0. I can't seem to create anything new and deploy it on version 0.10.0. Thoughts would be greatly appreciated. I hope the deployment process is going to get easier going forward 🙂 I'm looking forward to that GUI...
k
cargo shutle project list
only lists your projects, but someone else could have a project with that name. Could that be the issue here, or did you try a lot of names?
b
Does the name in cargo.toml need to be changed? I wonder if that’s my mistake.
k
The name in shuttle.toml will be used if it exists, otherwise cargo.toml
(Unless you pass in --name to project new, that trumps all)
b
Nope, didn’t add anything.
k
I'm afk so I cant test anything, but you could try creating a project with a name that is definitely unique to see if that works.
b
I’m about to go out for the afternoon, so will continue later trying things out.
a
I've had a look at trying to reach the
shuttle-axum-boilerplate
project from the assumed URL but it returns a 404, so it's probably not a deployed project. What might have happened is that the project name is already used by someone else but it's not deployed, and if you don't choose to set up an environment on shuttle initially it never checks to see if the project/subdomain name is taken so it only checks when you run
cargo shuttle project new
as a precaution when I don't immediately set up a shuttle environment I always set up
shuttle.toml
since it's much easier to view your project name there (and change it if required) - otherwise I personally tend to run into the
400 bad request
error quite a lot since my project names tend to have no imagination whatsoever put into them
b
Ok, have managed to sort out my issue, I think. I provided a name in cargo.toml that matched up with the project name that I set when running cargo shuttle init. All good now. I've tested out using a Shuttle.toml file for configuring the name and I see how that works now.
18 Views