Trying to deploy my app using Railpack
tarkbyte
FREEOP

2 months ago

I was using Nixpack and it was working perfectly, I saw that is was deprecated and decided to change it to Railpack but now I am having the following errors after deploying:

Error: Provided address was not an absolute URL.
    at new ev (.next/server/chunks/919.js:62:43650)
    at 87220 (.next/server/app/_not-found/page.js:1:6040)
    at Function.t (.next/server/webpack-runtime.js:1:127)
 ⨯ unhandledRejection:  Error: Provided address was not an absolute URL.
    at new ev (.next/server/chunks/919.js:62:43650)
    at 87220 (.next/server/app/_not-found/page.js:1:6040)
    at Function.t (.next/server/webpack-runtime.js:1:127)
Error: @clerk/nextjs: Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.
    at Object.throwMissingPublishableKeyError (.next/server/middleware.js:27:1496)
    at  (.next/server/middleware.js:56:8794)
    at  (.next/server/middleware.js:56:8728)
    at  (.next/server/middleware.js:56:8734)
 ⨯ Error: @clerk/clerk-react: Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.
    at Object.throwMissingPublishableKeyError (.next/server/chunks/919.js:35:1487)
    at  (.next/server/chunks/919.js:24:74236) {
  digest: '3478705486'
}

My env vars inside the Variables tab are the same that I was using with Nixpack. Any ideas what could be the problem?

$10 Bounty

1 Replies

fra
HOBBY

2 months ago

Did you had a look to this docs?
https://railpack.com/architecture/secrets/#environment-variables

I never used Railpack, so I might be completely wrong, but it might be necessary to add the config file with the variabels/secrets


tarkbyte
FREEOP

2 months ago

I've seen this, I tried adding them to my railway.json file but it didn't work.

Perhaps I am doing something wrong


tarkbyte
FREEOP

2 months ago

{ "$schema": "https://railway.com/railway.schema.json", "secrets": [ "NEXT_PUBLIC_CONVEX_URL", "CLERK_SECRET_KEY", "NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY", "NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL", "NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL" ], "build": { "builder": "RAILPACK", "buildEnvironment": "V3", "secrets": ["*"] }, "deploy": { "runtime": "V2", "numReplicas": 1, "sleepApplication": false, "useLegacyStacker": false, "multiRegionConfig": { "us-east4-eqdc4a": { "numReplicas": 1 } }, "restartPolicyType": "ON_FAILURE", "restartPolicyMaxRetries": 10 } }

I am not sure if this is the correct way of doing this


irazvan2745
PRO

2 months ago

Why are you setting them through railpack.json?


irazvan2745
PRO

2 months ago

Set them through the web ui


tarkbyte
FREEOP

2 months ago

I did, but it seems that it is not getting them

1430572517646405600


irazvan2745
PRO

2 months ago

Remove them from railpack.json


tarkbyte
FREEOP

2 months ago

Already did and nothing


tarkbyte
FREEOP

a month ago

FYI:

Had to remove the service and re-create it in order to Railpack get the correct variables


Loading...