Request to investigate an issue with building and deploying updates when fetching the web build from GitHub.

3 months ago

I am facing an issue where the web build is not being applied; the server remains on the old files, and no updates are taking effect.

$10 Bounty

17 Replies

Railway
BOT

3 months ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • 3 months ago


3 months ago

What happened?


3 months ago

what do you mean by web build here? is it your application? if its not updated, try redeploy latest commit


3 months ago

Yes, it is a web application. By "web build", I mean the production build of the web app that Railway is supposed to compile and serve.

I have already tried redeploying the latest commit multiple times. The deployment finishes successfully and shows as "Active" in the dashboard, but the live URL still serves the older version of the application.


3 months ago

is your last deployment message same as your last github commit message?


3 months ago

try add NO_CACHE=1, railway probably cache your build, adding this variable will disable the cache


3 months ago

Thanks for the tip! I am adding NO_CACHE=1 to my service variables right now and triggering a fresh redeploy. I will let you know if the updates reflect once it's done.


marlonwq
FREE

3 months ago

Fingers crossed the NO_CACHE=1 does the trick! If it still serves the old version after the fresh deployment, the issue is happening after the build phase


marlonwq
FREE

3 months ago

Test the URL in an Incognito window or do a Hard Refresh


marlonwq
FREE

3 months ago

Maybe, the might be successful, but the start command is serving an outdated folder. For example, if you are using a framework like Nuxt or Next.js, your build might output new files to .output or .next, but your Start Command in Railway's settings might still be pointing to an older dist or build folder that wasn't overwritten


3 months ago

I'm using an Arabic keyboard so my assistant is writing this for me.

Two problems:

  1. Push notifications reset on every page load — After I enable notifications and refresh the page, I have to enable them again. My code checks localStorage (ps_push_on flag) and Notification.permission == 'granted', but both return false/empty after refresh. I tried in normal browser, not incognito. Subscriptions don't persist.

  2. Wrong commit deployed — Railway shows commit 8e7b300d running, but this commit doesn't exist on GitHub. My latest push is 70db0f8 and is confirmed at github.com/PSbikers/PSBikers (main branch). I added NO_CACHE=1, tried rebuild, and still get the wrong commit hash.

Can you check why Railway is serving a commit that doesn't exist in the repo? And why push state doesn't survive refresh?


3 months ago

Push notifications reset on every page refresh, and even though I push commits to GitHub, Railway doesn't serve the new code. My assistant OpenCode helped me rewrite the entire push provider, tried different detection methods (localStorage, Notification API, getSubscription, server check), pushed multiple builds, added NO_CACHE=1, nothing works.


3 months ago

?


3 months ago

Try open the url in incognito browser like marlonwq suggest above, if its still serving the old version, try disconnect and reconnect the github repo


3 months ago

I have just disconnected and reconnected my GitHub repository as suggested. Now, I am triggering a new build to see if the latest updates will reflect on the live site. I will keep you updated.


3 months ago

It worked! After disconnecting and reconnecting the GitHub repository, I triggered a new web build and pushed it to Railway. The build completed successfully, and all the latest updates are now reflecting perfectly on the live site.


3 months ago

Thank you so much for your guidance and help


3 months ago

Glad it worked!


Welcome!

Sign in to your Railway account to join the conversation.

Loading...