Project doesn't build
Ik you said to redeploy again and again, but I've done it more than 20 times and still still nothing. It fails immediately. Any help?
105 Replies
Without any context, nobody can help. Describe your issue in details. "Something doesn't work" is NOT a valid question to ask.
And?
As I said, it fails immediately
You need to send logs, this is not nearly enough information to go off of
Logs are empty
Fr
You’re probably checking the project logs. there are two sets of logs
the build logs should never be empty
They are
Idk how
screenshot?
K
I see that you’re checking them on mobile, I’m not sure how well the logs will show up on mobile
hmm never mind that’s odd
are you on the dev plan?
Lemme see on desktop
No
if you retry a deploy does it just immediately fail?
Immediately
Red box only
Not blue
In deployments
What start command do you have set?
What environment variables do you have?
Env:
TOKEN = bot_token
And
LOL
For restarting
I dont have a build cmd
Only start cmd
You have an environment variable just called LOL?
Yes
that’s not assigned to anything?
Yes
try deleting it
But the bug started before i assign iy
Ok
Failed
can you send a screenshot of your settings page? You may be using the wrong build packs
I chose all
One by one
Same thing
odd, what’s your project ID? someone else should take a look at this
2f642cc2-86f8-4f8c-93af-f989228dc8d8
Can you also show your project structure please?
So what exactly
Environments etc?
I think they are asking for your project directory structure. Just send the GitHub repository.
Yeah. The code structure. It's fine if it's a private repo, just show the directory structure.
Wdym with that
Yes it's a Priv repo
Is it based on any framework?
Uh
Idts
What exactly is this
.
I cant understand what's wrong
The main branch runs but the beta not
Uh i rolled back an older deploy
And it's up
I'll put the latest version again
I deployed it and failed like the other ones
Kof
Oof
The problem is clearly in the build
Deploying an old deploy worked, because it didn't need to build
How do you run it on your machine?
You mean how I trigger the deploy? I tried changing vars and committing in git
No, they mean what do you do to run it on your personal machine
what command do you put into the command prompt
Oh
When i change my code, I run it on my beta bot
In railway
@KonstTheoGR this is what I meant. I see it's a Python app. Which command do you invoke while you're developing the app?
i presume you are using nixpacks
please make an example you can use to consistently recreate this
You mean python main.py
Wdym
i need an example that causes this to fail
or make ur current project os
So you don't need any build step during development?
Idk what that means
Probably no
you do
can you just send us your project
Are you the author of your app or not? It's your app and you don't know?
just calm down
nixpacks is failing for unknown reason
send a project id and jr will take aloook
For 3 straight days? That guy was struggling to deploy a Python app for 3 days, and it was NIXPACKS all along?
... yes
it's kinda obvious though, like, nothing in his code and the buildpacks system he is using just randomly fails
soo lol
Holy Mother Nature!
not poggers because nixpacks failing but like
yk
@KonstTheoGR - Project Id please?
I'm the author yes
I tried all build backs
Yep brb
Project id: 2f642cc2-86f8-4f8c-93af-f989228dc8d8
Also note that build is what fails
Older deploys redeploy fine (because no build required)
Can you trigger a fresh one so I can see the logs pipe in?
Yup
Still don't see a deploy on your end, tag me when you have one going!
As I said5it fails immediately
Oh, I was looking at the wrong env
Hmmm, do you see the following when it fails? No logs?
Yup
Jeez, not good. I have a tiny hunch. Can you make a new project and try there?
Ok
BuildDeploy
Filter logs using "", (), AND, OR, -
==============
Using Nixpacks
==============
╔═══════════════════════════════ Nixpacks v0.9.0 ══════════════════════════════╗
║ setup │ python38, gcc ║
║──────────────────────────────────────────────────────────────────────────────║
║ install │ python -m venv /opt/venv && . /opt/venv/bin/activate && pip ║
║ │ install -r requirements.txt ║
║──────────────────────────────────────────────────────────────────────────────║
║ start │ python main.py ║
╚══════════════════════════════════════════════════════════════════════════════╝
#1 [internal] load build definition from Dockerfile
#1 sha256:203f0a985e4bce2a9b3d88f28d7b1fca64b1fd3e5db053bf297fb5a288186bd6
#1 transferring dockerfile: 1.87kB done
#1 DONE 0.1s
#2 [internal] load .dockerignore
#2 sha256:d9bb0a7d9d5439334af699d8952340dc247ccd158184954fced885797f4d3161
#2 transferring context: 2B done
#2 DONE 0.1s
#3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:debian-1664237509
#3 sha256:14654d6ad0ab90f84b1d5bb7e36d9fe0da64cb0dce7f66299caee27917d0e4b3
#3 DONE 0.2s
#4 [stage-0 1/11] FROM ghcr.io/railwayapp/nixpacks:debian-1664237509@sha256:b9d126f523701b3c9e6629706f2129990b21f731e3091fe579207cd4805fa27d
#4 sha256:e6e39311ac6d3f89532fa59c41fc892def134eb3f4b0f5af71ce50ddd618cfcb
#4 DONE 0.0s
#5 [stage-0 2/11] WORKDIR /app/
#5 sha256:17c3ef9792c541c82fadcc87ddae9be2606103ef7a3fa9bdd701b9e786361f83
#5 CACHED
#6 [internal] load build context
#6 sha256:968093620651d39071ae0bdbbd04a36fee1248e3d25e255dd5d0d842b44b199f
#6 transferring context: 86.87kB done
#6 DONE 0.1s
#7 [stage-0 3/8] COPY .nixpacks/nixpkgs-a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.nix .nixpacks/nixpkgs-a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.nix
#7 sha256:94320973d810358e494b00f88d2332558ec9dfe337a434ed6f5c18a6db44981a
#7 CACHED
#8 [stage-0 4/8] RUN nix-env -if .nixpacks/nixpkgs-a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.nix && nix-collect-garbage -d
#8 sha256:e88e1a98f8ad5fd1ab61c9df9390b54a452c64e6bad16f25fc4b59bb0262f3ea
#8 CACHED
#9 [stage-0 5/8] COPY . /app/
#9 sha256:d530d33d942353cb572adad9e9235f645bf03764423fcee9d05b19048636c6b8
#9 DONE 2.0s
#10 [stage-0 6/8] RUN printf '\nPATH=/opt/venv/bin:$PATH' >> /root/.profile
#10 sha256:976b1d2fd7fdf48fc05ac7e159e0ab602dbf581bc0a1fb3828bd9a956223d3b7
#10 DONE 0.8s
#11 [stage-0 7/8] COPY . /app/
#11 sha256:e98a4fc86d698e16f5b86f567eb6f31779478358d9203e074cc41fafe706aeb4
#11 DONE 0.7s
#12 [stage-0 8/8] RUN --mount=type=cache,id=s/1aad8305-afe5-45d2-b7f3-a5905f299d63-/root/cache/pip,target=/root/.cache/pip python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt
#12 sha256:19c49302d93877558dec3667fc21b0b9cd3fba44682445555aca29c38e29c0c3
#12 5.905 Collecting nextcord
#12 5.959 Downloading nextcord-2.2.0.tar.gz (932 kB)
#12 6.014 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 932.5/932.5 KB 18.6 MB/s eta 0:00:00
#12 6.368 Installing build dependencies: started
#12 10.43 Installing build dependencies: finished with status 'done'
#12 10.44 Getting requirements to build wheel: started
#12 10.84 Getting requirements to build wheel: finished with status 'done'
#12 10.85 Preparing metadata (pyproject.toml): started
#12 11.27 Preparing metadata (pyproject.toml): finished with status 'done'
#12 11.31 Collecting asyncio
#12 11.33 Downloading asyncio-3.4.3-py3-none-any.whl (101 kB)
#12 11.37 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
101.8/101.8 KB 2.4 MB/s eta 0:00:00
#12 11.48 ERROR: Could not find a version that satisfies the requirement urlib (from versions: none)
#12 11.49 ERROR: No matching distribution found for urlib
#12 11.49 WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
#12 11.49 You should consider upgrading via the '/opt/venv/bin/python -m pip install --upgrade pip' command.
#12 ERROR: executor failed running [/bin/bash -ol pipefail -c python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt]: exit code: 1
-----
[stage-0 8/8] RUN --mount=type=cache,id=s/1aad8305-afe5-45d2-b7f3-a5905f299d63-/root/cache/pip,target=/root/.cache/pip python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt:----- executor failed running [/bin/bash -ol pipefail -c python -m venv /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt]: exit code: 1 Error: Docker build failed Where are you all
Dubai also the team is traveling, so the availibility is week is low.
Sorry about that...
Oh okay
I just
Want my bot to run
And I don't want to change host because railway is convenient
So i am kinda trapped
Really dumb suggestion, does it work with the Heroku buildpacks?
Nix
No, as in, you can change the build solution.
Ik
I've tried
Oh, only Nix
But ill retry
I never know
Sorry, didn't grok your response.
ok
Well
All failed
Can you share your repo, can't debug if I don't see the deps
Will get to it on my flight.
It's private
Can you give me your email or idk what's needed to add you
You’ve been having this issue for a long time, I think it may be time to open up your project so we can do some real digging
Ok so publish the repo
unless you have a reason to keep it private, that’s fine
The only reason to keep it private is because i don't want others to copy it
But rn I have to
Brb gonna publish it
I doubt anyone will copy it, don’t worry
GitHub
GitHub - konsttheogr/GingerBot
Contribute to konsttheogr/GingerBot development by creating an account on GitHub.
After all its not even ready
And private (the Bot) so nobody will find it
so this is the project that doesnt work right
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I assume so yes
Just a note, you have your branches set up so that your "beta" branch is actually your default "main" branch
Your main branch isn't your default branch
got it running. You misspelled urllib in your requirements.txt
railway also seems to not have urllib for some reason, removing it from your requirements.txt, import, and the code that uses it lets me run your code
Oh okay
So there was an internal error
user facing error
That's why i got no logs
Yep, the build logs told me exactly what’s going on
Gonna do so
And bout the branches
They are this way on purpose
When i commit in a project, I want my beta bot to run
After everything is OK, I deploy on main
@A Dumb
Oof
it may be because you’re on mobile. but have you tried deleting the project and recreating it?
there should always be some build logs
Ik
I'll tommorw
By project you mean ALL of it right?
In railway
That’s what pull requests are for, but your way works.
Not fit ofc
Yes
Git*
It worked! Ty fur ur help
About urllib? Should I remove it completely?
I was getting errors when trying to install it on Railway, so yes. There are other package options that you can use
Yes
Like requests
@Angelo, while resetting the settings for my app up, I found the bug
When I set the root directory field. Then, it failed immediately without logs. After clearing it again, it worked fine. So that was the bug