2 years 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
2 years ago
hello!
2 years ago
build and or deploy logs please -
(this is a new version of the log downloader)
2 years ago
please use the new version of the bookmarklet
2 years ago
thats strange, ive sen that error just recently, maybe try another deployment?
2 years ago
build logs again please
2 years ago
looks like either github or google is having network troubles
2 years ago
send me your nixpacks.toml file please
2 years ago
nope nothing to do with it, unless you mean to say your google auth is now failing lately?
2 years 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 adapterokay it looked like it was about to start working but thenit crashed so i am restarting the deployment
2 years ago
logs please
2 years ago
ah
2 years ago
possibly fixed, try again
2 years ago
logs please
2 years ago
have you updated your nixpacks.toml file with the one above?
2 years ago
okay I'll try some things
2 years ago
this does work, please make sure you are using it
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?
2 years ago
nope that would be a code issue, check the browser console logs
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
2 years ago
are you able to build this locally?
I was able to figure out the font awesome icon issue. It is showing locally and deployed
2 years ago
awsome!
2 years ago
hooks?
2 years ago
do they work locally?
2 years ago
what errors do you get when deployed to railway?
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
in deployment my console log returns the html document? haha no idea why
2 years ago
can you send a link to this page so i can see the error for myself
2 years ago
well i cant even click the google button lol
2 years ago
clicking does nothing, no console logs and no network activity
really!? interesting. let me redeploy..i think i may have found the issue (fingers crossed)
2 years ago
yeah theres console logs, just nothing is logged when i click on the button
2 years ago
these are the logs when i load the page and dont click anything

it's not retrieving my url from the backend, so there's "nothing" to click on
2 years ago
i think i know whats going on
2 years ago
i assume you are using an service variable to set the backend url?
2 years ago
are you sure its prefixed with https:// ?
2 years 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 🙂
i made the adjustment and redeployed. this is just a code issue now right? that i can go look for?
2 years ago
now you are getting a cors error
2 years ago
you may have something in your notes about that? we have talked a bit about that before too
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
2 years ago
are you sure you have that variable set correctly?
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?
2 years ago
but thats not your frontend's domain
2 years 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
2 years ago
thats in your notes too 😉
i think because i recently got a domain/changed it i didn't think to update that…
2 years ago
no problem!
2 years ago
never heard of it
2 years ago
no problem!
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
2 years ago
that means your backend did not respond to that request, check your deploy logs
2 years ago
ValidationError: userProfiles validation failed: confirmPassword: Please confirm submitted password.2 years ago
and your backend fully crashes from this error
2 years ago
i scrolled to the bottom
2 years ago
the latest log lines are at the bottom
2 years 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
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
2 years ago
ah interesting approach, then youd need to check google's docs on how to set those names
yeah the libraries seem to deappreciate and break people's apps from what i was reading
2 years ago
i think there are a few highly maintained 0auth libs
but i was trying to find one for react native web and react native and that i understood and wasnt just copying and pasting
2 years ago
ah gotcha
and if you were curious about this. looks like google does it this way until i verify the app through them to avoid pishing
2 years ago
ah that makes sense















