RAILWAY DEPLOYMENT ERROR: Docker Build Failed

chiomagrace
HOBBY

a year ago

HI! I had my react-native-web app deployed. I made a simple change, and then I redeployed, and I got an error… I am not too sure how to resolve. Can some assist please? Thanks so much!!

0 Replies

chiomagrace
HOBBY

a year ago

63585bd3-9ed8-4472-80d0-1bae5ad3c571


a year ago

hello!


a year ago

build and or deploy logs please -
(this is a new version of the log downloader)


chiomagrace
HOBBY

a year ago


chiomagrace
HOBBY

a year ago

The main man! hi!


a year ago

please use the new version of the bookmarklet


chiomagrace
HOBBY

a year ago

gotcha. one sec


chiomagrace
HOBBY

a year ago


a year ago

thats strange, ive sen that error just recently, maybe try another deployment?


chiomagrace
HOBBY

a year ago

okay! trying it now


chiomagrace
HOBBY

a year ago

failed again


a year ago

build logs again please


chiomagrace
HOBBY

a year ago


a year ago

looks like either github or google is having network troubles


a year ago

send me your nixpacks.toml file please


chiomagrace
HOBBY

a year ago


chiomagrace
HOBBY

a year ago

ah this would make sense. cause i have google0auth.


a year ago

nope nothing to do with it, unless you mean to say your google auth is now failing lately?


chiomagrace
HOBBY

a year ago

nope it works locally!


a year ago

try this nixpacks.toml file instead -

# https://nixpacks.com/docs/configuration/file

providers = ['node']

# set up some variables to minimize annoyance
[variables]
    NPM_CONFIG_UPDATE_NOTIFIER = 'false' # the update notification is relatively useless in a production environment
    NPM_CONFIG_FUND = 'false' # the fund notification is also pretty useless in a production environment

# install caddy
[phases.caddy]
    nixpkgsArchive = '727db88c063586d2f912af26dc3ce19d6f31af05' # caddy v2.7.6 - https://github.com/NixOS/nixpkgs/commit/727db88c063586d2f912af26dc3ce19d6f31af05
    dependsOn = ['setup'] # make sure this phase runs after the default 'setup' phase
    nixPkgs = ['caddy'] # install caddy

# format the Caddyfile with fmt
[phases.fmt]
    dependsOn = ['caddy'] # make sure this phase runs after the 'caddy' phase so that we know we have caddy downloaded
    cmds = ['caddy fmt --overwrite Caddyfile'] # format the Caddyfile to fix any formatting inconsistencies

# copy caddy and build artifacts to a new image and start the caddy web server
[start]
    cmd = 'caddy run --config Caddyfile --adapter caddyfile 2>&1' # start caddy using the Caddyfile config and caddyfile adapter

chiomagrace
HOBBY

a year ago

okay updating now


chiomagrace
HOBBY

a year ago

okay it looked like it was about to start working but thenit crashed so i am restarting the deployment


a year ago

logs please


chiomagrace
HOBBY

a year ago


a year ago

ah


a year ago

possibly fixed, try again


chiomagrace
HOBBY

a year ago

i did. it crashed again


a year ago

logs please


chiomagrace
HOBBY

a year ago

it's the same as the one i sent above


chiomagrace
HOBBY

a year ago


a year ago

have you updated your nixpacks.toml file with the one above?


chiomagrace
HOBBY

a year ago

yup


a year ago

okay I'll try some things


a year ago

this does work, please make sure you are using it


chiomagrace
HOBBY

a year ago

hey brody! i stepped away and came back and it wasn't crashed anymore


chiomagrace
HOBBY

a year ago

it is up now


chiomagrace
HOBBY

a year ago

when i click "Continue with Google" button that triggers my googleoauth, never happens though. As i mentioned earlier locally this works as expected. do you think this is related to deployment not working?


chiomagrace
HOBBY

a year ago

1231435668258029600


a year ago

nope that would be a code issue, check the browser console logs


chiomagrace
HOBBY

a year ago

hi brody!! i got another error:(


chiomagrace
HOBBY

a year ago


chiomagrace
HOBBY

a year ago

still learning how to debug from the logs but i think it's because i am trying to use some font awesome icons? I read the documentation about what is needed to use them from web: https://www.npmjs.com/package/react-native-vector-icons#web-setup


chiomagrace
HOBBY

a year ago

This is what I did for step 1:

1232111743258329000


chiomagrace
HOBBY

a year ago

This is what I did for step 2:

1232111999383769000


a year ago

are you able to build this locally?


chiomagrace
HOBBY

a year ago

Hi Brody!


chiomagrace
HOBBY

a year ago

I was able to figure out the font awesome icon issue. It is showing locally and deployed


a year ago

awsome!


chiomagrace
HOBBY

a year ago

The other issue I am having on deployment is my hooks aren't working


a year ago

hooks?


chiomagrace
HOBBY

a year ago

react hooks/api calls


a year ago

do they work locally?


chiomagrace
HOBBY

a year ago

Yup yup


a year ago

what errors do you get when deployed to railway?


chiomagrace
HOBBY

a year ago

Really strange actually let me get some pics for ya one sec


chiomagrace
HOBBY

a year ago

so i used an api call to get the auth url. the url is triggered when the user clicks "Continue with Google". My console logs are showing the data on the side


chiomagrace
HOBBY

a year ago

Locally:


chiomagrace
HOBBY

a year ago

1232416386748514300


chiomagrace
HOBBY

a year ago

in deployment my console log returns the html document? haha no idea why


chiomagrace
HOBBY

a year ago

1232416577765376000


a year ago

can you send a link to this page so i can see the error for myself


chiomagrace
HOBBY

a year ago


a year ago

well i cant even click the google button lol


a year ago

clicking does nothing, no console logs and no network activity


chiomagrace
HOBBY

a year ago

really!? interesting. let me redeploy..i think i may have found the issue (fingers crossed)


chiomagrace
HOBBY

a year ago

yeah nvm didn't work haha


chiomagrace
HOBBY

a year ago

so u cant see the console logs ?


a year ago

yeah theres console logs, just nothing is logged when i click on the button


a year ago

these are the logs when i load the page and dont click anything

1232426025040875500


chiomagrace
HOBBY

a year ago

yes the last one is the reason why the button isn't doing anything


chiomagrace
HOBBY

a year ago

it's not retrieving my url from the backend, so there's "nothing" to click on


a year ago

i think i know whats going on


a year ago

i assume you are using an service variable to set the backend url?


chiomagrace
HOBBY

a year ago

yes!


a year ago

are you sure its prefixed with https:// ?


chiomagrace
HOBBY

a year ago

no it's this

1232428101846433800


chiomagrace
HOBBY

a year ago

i have it currently displaying on the app too


chiomagrace
HOBBY

a year ago

1232428202408935400


a year ago

its supposed to be a url value, therefor it needs to be prefixed with https://
i think we have went over this a few times before too 🙂


chiomagrace
HOBBY

a year ago

aw mann


chiomagrace
HOBBY

a year ago

youre so right


chiomagrace
HOBBY

a year ago

i even had that in my notes!


chiomagrace
HOBBY

a year ago

1232436974258880500


chiomagrace
HOBBY

a year ago

i put it in bold now…ha


chiomagrace
HOBBY

a year ago

i made the adjustment and redeployed. this is just a code issue now right? that i can go look for?


chiomagrace
HOBBY

a year ago

1232437078357315600


a year ago

now you are getting a cors error


a year ago

you may have something in your notes about that? we have talked a bit about that before too


chiomagrace
HOBBY

a year ago

yes i remember cors! i ahve it in my server, but i will keep debugging and see if i can get to the bottom of it


chiomagrace
HOBBY

a year ago

1232438580954271700


a year ago

are you sure you have that variable set correctly?


chiomagrace
HOBBY

a year ago

i think so! i used the railway domain cause i thought either or could work. do i need to use the new domain i got?


chiomagrace
HOBBY

a year ago

1232438964992872400


a year ago

but thats not your frontend's domain


a year ago

ideally you use [https://${{.RAILWAY_PUBLIC_DOMAIN](https://${{.RAILWAY_PUBLIC_DOMAIN)}} so that you dont have to worry about manually updating the variable if you change the service domain


a year ago

thats in your notes too 😉


chiomagrace
HOBBY

a year ago

i know youre right


chiomagrace
HOBBY

a year ago

i think because i recently got a domain/changed it i didn't think to update that…


chiomagrace
HOBBY

a year ago

thanks brody!!


chiomagrace
HOBBY

a year ago

all is working now


a year ago

no problem!


chiomagrace
HOBBY

a year ago

unrelated - are you familar with assetlinks.json files?


a year ago

never heard of it


chiomagrace
HOBBY

a year ago

cool. was just curious! thank youu


a year ago

no problem!


chiomagrace
HOBBY

a year ago

Hi again!

I may have celebrated too early… I tried actually clicking "Continue with Google" in deployment and it gives me an error adter it pulls up the google consent screen


chiomagrace
HOBBY

a year ago

locally it says this and after i continue it goes to my home screen:


chiomagrace
HOBBY

a year ago

1232477825089667000


chiomagrace
HOBBY

a year ago

in deployment it says this:

1232477981566570800


chiomagrace
HOBBY

a year ago

then goes to this after:

1232478109119418400


a year ago

that means your backend did not respond to that request, check your deploy logs


chiomagrace
HOBBY

a year ago


a year ago

ValidationError: userProfiles validation failed: confirmPassword: Please confirm submitted password.

a year ago

and your backend fully crashes from this error


chiomagrace
HOBBY

a year ago

ah okay


chiomagrace
HOBBY

a year ago

how did u find that so fast haha


chiomagrace
HOBBY

a year ago

all i saw was this giberrish


chiomagrace
HOBBY

a year ago

1232479338046161000


a year ago

i scrolled to the bottom


a year ago

the latest log lines are at the bottom


chiomagrace
HOBBY

a year ago

gotcha good to know


chiomagrace
HOBBY

a year ago

thanks brody that fixed it!


chiomagrace
HOBBY

a year ago

any way to solve naming convention here? or i have to accept it as is?


chiomagrace
HOBBY

a year ago

1232481117521711000


a year ago

awsome, but i have no clue why it says railway.app, youd need to check the docs for your 0Auth lib that you use


chiomagrace
HOBBY

a year ago

haha we were on the same page.


chiomagrace
HOBBY

a year ago

i actually didnt use a library. found a cool video where he shows u what everyhing is doing so i created the functions on my own following along


a year ago

ah interesting approach, then youd need to check google's docs on how to set those names


chiomagrace
HOBBY

a year ago

sounds good


chiomagrace
HOBBY

a year ago

will do that


chiomagrace
HOBBY

a year ago

thanks again!!


chiomagrace
HOBBY

a year ago

yeah the libraries seem to deappreciate and break people's apps from what i was reading


a year ago

i think there are a few highly maintained 0auth libs


chiomagrace
HOBBY

a year ago

yes for sure


chiomagrace
HOBBY

a year ago

but i was trying to find one for react native web and react native and that i understood and wasnt just copying and pasting


chiomagrace
HOBBY

a year ago

so that limited me haha


a year ago

ah gotcha


chiomagrace
HOBBY

a year ago

and if you were curious about this. looks like google does it this way until i verify the app through them to avoid pishing


a year ago

ah that makes sense


RAILWAY DEPLOYMENT ERROR: Docker Build Failed - Railway Help Station