502 error

Hi guys,

I've setup my first "app" within the system and I've set the custom domain to listen on port 8080, I don't have a dropdown option to choose the port so just typed 8080.

Im a bit new to this platform and getting:

Application failed to respond

This error appears to be caused by the application.

If this is your project, check out your deploy logs to see what went wrong. Refer to our docs on Fixing Common Errors for help, or reach out over our Help Station.

If you are a visitor, please contact the application owner or try again later.

Request ID:
gWd8iADjSZ6Ph6Pi0-QtfA

Cloudflare is set as per the instructions & the project deploys sucessfully and builds.

I'd love to get some advice please?

$10 Bounty

15 Replies

alexwebgr
HOBBY

8 months ago

502 usually means there is no server available to handle the requests from your app

did you deploy by Dockerfile?

what language is your project in?


Hiya

I've deployed via Git, all went okay. No docker .

Lanuage is react / typescript / vue / node


alexwebgr
HOBBY

8 months ago

awesome! feel free to mark this thread solved if you issue is resolved pray emoji


phoenixauro
HOBBY

8 months ago

What application are you running?


alexwebgr

awesome! feel free to mark this thread solved if you issue is resolved

Yes, lol sorry should have been cleared, it's not resolved. Just letting you know that everything went "fine" but still getting the 502 error


phoenixauro

What application are you running?

My own custom built one.


phoenixauro
HOBBY

8 months ago

From what I have seen, this mostly happens when your application is not running on the port you specified, or your application has not started even though your container has.

Also if it is a public git repo, can you give a link to it?


phoenixauro

From what I have seen, this mostly happens when your application is not running on the port you specified, or your application has not started even though your container has.Also if it is a public git repo, can you give a link to it?

Its not public, sadly. What port should it be on, I went with 8080


phoenixauro
HOBBY

8 months ago

You can try these common ports 80, 3000, 5173, 8000, 4200, 1234. Maybe one of them might work.
your custom app is built in which language for example php. Maybe from there I can figure out what port it might be.


alexwebgr
HOBBY

8 months ago

the port is the one that server runs locally slightly_smiling_face emoji make sure it is the same for the Generated domain and the custom domain

things to check

is your nodejs server running?

can you access the app via the generated domain ?

the cloudflare proxy needs to be enabled

could you share the package.json scripts section from the nodejs app ?


alexwebgr

the port is the one that server runs locally make sure it is the same for the Generated domain and the custom domainthings to checkis your nodejs server running?can you access the app via the generated domain ?the cloudflare proxy needs to be enabledcould you share the package.json scripts section from the nodejs app ?

{
  "name": "vite_react_shadcn_ts",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "build:dev": "vite build --mode development",
    "lint": "eslint .",
    "preview": "vite preview",
    "build:tailwind:extension": "npx tailwindcss -i ./chrome-extension/tailwind.css -o ./chrome-extension/tailwind.build.css --minify"
  },
  "dependencies": {
    "@hookform/resolvers": "^3.9.0",
    "@radix-ui/react-accordion": "^1.2.0",
    "@radix-ui/react-alert-dialog": "^1.1.1",
    "@radix-ui/react-aspect-ratio": "^1.1.0",
    "@radix-ui/react-avatar": "^1.1.0",
    "@radix-ui/react-checkbox": "^1.1.1",
    "@radix-ui/react-collapsible": "^1.1.0",
    "@radix-ui/react-context-menu": "^2.2.1",
    "@radix-ui/react-dialog": "^1.1.2",
    "@radix-ui/react-dropdown-menu": "^2.1.1",
    "@radix-ui/react-hover-card": "^1.1.1",
    "@radix-ui/react-label": "^2.1.0",
    "@radix-ui/react-menubar": "^1.1.1",
    "@radix-ui/react-navigation-menu": "^1.2.0",
    "@radix-ui/react-popover": "^1.1.1",
    "@radix-ui/react-progress": "^1.1.0",
    "@radix-ui/react-radio-group": "^1.2.0",
    "@radix-ui/react-scroll-area": "^1.1.0",
    "@radix-ui/react-select": "^2.1.1",
    "@radix-ui/react-separator": "^1.1.0",
    "@radix-ui/react-slider": "^1.2.0",
    "@radix-ui/react-slot": "^1.1.0",
    "@radix-ui/react-switch": "^1.1.0",
    "@radix-ui/react-tabs": "^1.1.0",
    "@radix-ui/react-toast": "^1.2.1",
    "@radix-ui/react-toggle": "^1.1.0",
    "@radix-ui/react-toggle-group": "^1.1.0",
    "@radix-ui/react-tooltip": "^1.1.4",
    "@supabase/supabase-js": "^2.49.4",
    "@tanstack/react-query": "^5.56.2",
    "class-variance-authority": "^0.7.1",
    "clsx": "^2.1.1",
    "cmdk": "^1.0.0",
    "date-fns": "^3.6.0",
    "embla-carousel-react": "^8.3.0",
    "framer-motion": "^12.9.2",
    "input-otp": "^1.2.4",
    "lucide-react": "^0.462.0",
    "next-themes": "^0.3.0",
    "react": "^18.3.1",
    "react-day-picker": "^8.10.1",
    "react-dom": "^18.3.1",
    "react-hook-form": "^7.53.0",
    "react-resizable-panels": "^2.1.3",
    "react-router-dom": "^6.26.2",
    "recharts": "^2.12.7",
    "sonner": "^1.5.0",
    "tailwind-merge": "^2.5.2",
    "tailwindcss-animate": "^1.0.7",
    "vaul": "^0.9.3",
    "zod": "^3.23.8"
  },
  "devDependencies": {
    "@eslint/js": "^9.9.0",
    "@tailwindcss/typography": "^0.5.15",
    "@types/node": "^22.5.5",
    "@types/react": "^18.3.21",
    "@types/react-dom": "^18.3.7",
    "@types/react-router-dom": "^5.3.3",
    "@vitejs/plugin-react-swc": "^3.5.0",
    "autoprefixer": "^10.4.20",
    "eslint": "^9.9.0",
    "eslint-plugin-react-hooks": "^5.1.0-rc.0",
    "eslint-plugin-react-refresh": "^0.4.9",
    "globals": "^15.9.0",
    "postcss": "^8.4.47",
    "sharp": "^0.34.1",
    "tailwindcss": "^3.4.11",
    "typescript": "^5.5.3",
    "typescript-eslint": "^8.0.1",
    "vite": "^5.4.1"
  }
}

phoenixauro

You can try these common ports 80, 3000, 5173, 8000, 4200, 1234. Maybe one of them might work.your custom app is built in which language for example php. Maybe from there I can figure out what port it might be.

React / Node and Vite.js


phoenixauro
HOBBY

8 months ago

The default port for this should be 3000. So try that.


richcopestake20

{ "name": "vite_react_shadcn_ts", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "build:dev": "vite build --mode development", "lint": "eslint .", "preview": "vite preview", "build:tailwind:extension": "npx tailwindcss -i ./chrome-extension/tailwind.css -o ./chrome-extension/tailwind.build.css --minify" }, "dependencies": { "@hookform/resolvers": "^3.9.0", "@radix-ui/react-accordion": "^1.2.0", "@radix-ui/react-alert-dialog": "^1.1.1", "@radix-ui/react-aspect-ratio": "^1.1.0", "@radix-ui/react-avatar": "^1.1.0", "@radix-ui/react-checkbox": "^1.1.1", "@radix-ui/react-collapsible": "^1.1.0", "@radix-ui/react-context-menu": "^2.2.1", "@radix-ui/react-dialog": "^1.1.2", "@radix-ui/react-dropdown-menu": "^2.1.1", "@radix-ui/react-hover-card": "^1.1.1", "@radix-ui/react-label": "^2.1.0", "@radix-ui/react-menubar": "^1.1.1", "@radix-ui/react-navigation-menu": "^1.2.0", "@radix-ui/react-popover": "^1.1.1", "@radix-ui/react-progress": "^1.1.0", "@radix-ui/react-radio-group": "^1.2.0", "@radix-ui/react-scroll-area": "^1.1.0", "@radix-ui/react-select": "^2.1.1", "@radix-ui/react-separator": "^1.1.0", "@radix-ui/react-slider": "^1.2.0", "@radix-ui/react-slot": "^1.1.0", "@radix-ui/react-switch": "^1.1.0", "@radix-ui/react-tabs": "^1.1.0", "@radix-ui/react-toast": "^1.2.1", "@radix-ui/react-toggle": "^1.1.0", "@radix-ui/react-toggle-group": "^1.1.0", "@radix-ui/react-tooltip": "^1.1.4", "@supabase/supabase-js": "^2.49.4", "@tanstack/react-query": "^5.56.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.0.0", "date-fns": "^3.6.0", "embla-carousel-react": "^8.3.0", "framer-motion": "^12.9.2", "input-otp": "^1.2.4", "lucide-react": "^0.462.0", "next-themes": "^0.3.0", "react": "^18.3.1", "react-day-picker": "^8.10.1", "react-dom": "^18.3.1", "react-hook-form": "^7.53.0", "react-resizable-panels": "^2.1.3", "react-router-dom": "^6.26.2", "recharts": "^2.12.7", "sonner": "^1.5.0", "tailwind-merge": "^2.5.2", "tailwindcss-animate": "^1.0.7", "vaul": "^0.9.3", "zod": "^3.23.8" }, "devDependencies": { "@eslint/js": "^9.9.0", "@tailwindcss/typography": "^0.5.15", "@types/node": "^22.5.5", "@types/react": "^18.3.21", "@types/react-dom": "^18.3.7", "@types/react-router-dom": "^5.3.3", "@vitejs/plugin-react-swc": "^3.5.0", "autoprefixer": "^10.4.20", "eslint": "^9.9.0", "eslint-plugin-react-hooks": "^5.1.0-rc.0", "eslint-plugin-react-refresh": "^0.4.9", "globals": "^15.9.0", "postcss": "^8.4.47", "sharp": "^0.34.1", "tailwindcss": "^3.4.11", "typescript": "^5.5.3", "typescript-eslint": "^8.0.1", "vite": "^5.4.1" } }

smolpaw
HOBBY

8 months ago

could you post your vite config file ?


sim
FREE

8 months ago

Could you compare your vite config and other starter files with the one generated from https://docs.railway.com/guides/react#create-a-react-app

As @smolpaw says if you post it, we can look


Loading...