Hi, this used to work but my ory tunnel setup is s...
# ory-network
b
Hi, this used to work but my ory tunnel setup is somehow broken now. Running
ory tunnel --port 4001 <http://localhost:3002/>
results in
Application error: a client-side exception has occurred while loading localhost (see the browser console for more information).
in the browser. The error logs in the console (chrome, macos) are:
Copy code
:4001/login?flow=a1fcfa83-bf68-4632-a3e3-f4579dd3d9b9:1 The Content Security Policy directive 'upgrade-insecure-requests' is ignored when delivered in a report-only policy.Understand this error
Navigated to <http://localhost:4001/login?flow=a1fcfa83-bf68-4632-a3e3-f4579dd3d9b9>
login?flow=a1fcfa83-bf68-4632-a3e3-f4579dd3d9b9:1 [DOM] Input elements should have autocomplete attributes (suggested: "username"): (More info: <https://goo.gl/9p2vKq>) <input required type=​"text" placeholder=​"Enter your E-Mail" data-testid=​"ory/​form/​node/​input/​identifier" class=​"antialiased rounded-forms border leading-tight transition-colors placeholder:​h-[20px]​ placeholder:​text-input-foreground-tertiary focus-visible:​outline-none focus:​ring-0 w-full bg-input-background-default border-input-border-default text-input-foreground-primary disabled:​bg-input-background-disabled disabled:​border-input-border-disabled disabled:​text-input-foreground-disabled focus:​border-input-border-focus focus-visible:​border-input-border-focus hover:​bg-input-background-hover hover:​border-input-border-hover px-4 py-[13px]​" name=​"identifier">
684-fda8428b61cb292b.js:1 Uncaught Error: Connection closed.
    at t (684-fda8428b61cb292b.js:1:166003)
Any ideas what causes this?
image.png
Loading it in incognito does not fix it, I do not have any adblocking things configured
When changing localhost to 127.0.0.1 is does do the login but then fails because the initial cookie was configured on localhost
s
what does the network tab say? seems like the app is getting a network error also, what does the ory cli print?
b
There's no network errors which i find strange:
Tunnel debug logs with redactions (
ory tunnel --debug --port 4001 <http://localhost:3002/>
):
Copy code
[cors] 2025/08/26 20:49:26 Handler: Actual request
[cors] 2025/08/26 20:49:26   Actual response added headers: map[Access-Control-Allow-Credentials:[true] Access-Control-Allow-Origin:[<http://localhost:3002>] Access-Control-Expose-Headers:[Set-Cookie, Cache-Control, Expires, Last-Modified, Pragma, Content-Length, Content-Language, Content-Type] Vary:[Origin]]
GET [/.well-known/openid-configuration]
=> 200 GET [/.well-known/openid-configuration] took 168.100209ms
[cors] 2025/08/26 20:49:26 Handler: Actual request
[cors] 2025/08/26 20:49:26   Actual request no headers added: missing origin
GET [/oauth2/auth?client_id=REDACTED&redirect_uri=http%3A%2F%2Flocalhost%3A3002%2Fauth%2Fcallback&response_type=code&scope=openid+profile+email+offline_access+REDACTED%3Adev&state=2e1966a950f74e8fa6bb015c6298b78e&code_challenge=REDACTED&code_challenge_method=S256&audience=http%3A%2F%2Flocalhost%3A3002%2F]
=> 302 GET [/oauth2/auth?client_id=REDACTED&redirect_uri=http%3A%2F%2Flocalhost%3A3002%2Fauth%2Fcallback&response_type=code&scope=openid+profile+email+offline_access+REDACTED%3Adev&state=2e1966a950f74e8fa6bb015c6298b78e&code_challenge=REDACTED&code_challenge_method=S256&audience=http%3A%2F%2Flocalhost%3A3002%2F] took 77.111ms
[cors] 2025/08/26 20:49:26 Handler: Actual request
[cors] 2025/08/26 20:49:26   Actual request no headers added: missing origin
GET [/login?login_challenge=REDACTED]
=> 307 GET [/login?login_challenge=REDACTED] took 95.064583ms
[cors] 2025/08/26 20:49:26 Handler: Actual request
[cors] 2025/08/26 20:49:26   Actual request no headers added: missing origin
GET [/self-service/login/browser?login_challenge=REDACTED]
=> 303 GET [/self-service/login/browser?login_challenge=REDACTED] took 483.506083ms
[cors] 2025/08/26 20:49:27 Handler: Actual request
[cors] 2025/08/26 20:49:27   Actual request no headers added: missing origin
GET [/login?flow=REDACTED]
=> 200 GET [/login?flow=REDACTED] took 187.788584ms
[cors] 2025/08/26 20:49:27 Handler: Actual request
[cors] 2025/08/26 20:49:27   Actual request no headers added: missing origin
GET [/.well-known/appspecific/com.chrome.devtools.json]
[cors] 2025/08/26 20:49:27 Handler: Actual request
[cors] 2025/08/26 20:49:27   Actual response added headers: map[Access-Control-Allow-Credentials:[true] Access-Control-Allow-Origin:[<http://localhost:4001>] Access-Control-Expose-Headers:[Set-Cookie, Cache-Control, Expires, Last-Modified, Pragma, Content-Length, Content-Language, Content-Type] Vary:[Origin]]
GET [/_next/static/media/e4af272ccee01ff0-s.p.woff2]
[cors] 2025/08/26 20:49:27 Handler: Actual request
[cors] 2025/08/26 20:49:27   Actual request no headers added: missing origin
GET [/_next/static/css/42a153bd36e786fa.css]
[cors] 2025/08/26 20:49:27 Handler: Actual request
[cors] 2025/08/26 20:49:27   Actual request no headers added: missing origin
GET [/_next/static/css/1aa93456ca58435e.css]
=> 404 GET [/.well-known/appspecific/com.chrome.devtools.json] took 34.20025ms
=> 200 GET [/_next/static/css/1aa93456ca58435e.css] took 57.330334ms
=> 200 GET [/_next/static/media/e4af272ccee01ff0-s.p.woff2] took 68.345708ms
[cors] 2025/08/26 20:49:27 Handler: Actual request
[cors] 2025/08/26 20:49:27   Actual request no headers added: missing origin
GET [/_next/static/chunks/webpack-bf8fac79a5eda0f3.js]
=> 200 GET [/_next/static/chunks/webpack-bf8fac79a5eda0f3.js] took 36.854875ms
[cors] 2025/08/26 20:49:27 Handler: Actual request
[cors] 2025/08/26 20:49:27   Actual request no headers added: missing origin
GET [/_next/static/chunks/4bd1b696-7ff77fd7c4d3f373.js]
=> 200 GET [/_next/static/chunks/4bd1b696-7ff77fd7c4d3f373.js] took 41.590583ms
[cors] 2025/08/26 20:49:27 Handler: Actual request
[cors] 2025/08/26 20:49:27   Actual request no headers added: missing origin
GET [/_next/static/chunks/684-fda8428b61cb292b.js]
=> 200 GET [/_next/static/chunks/684-fda8428b61cb292b.js] took 46.682292ms
[cors] 2025/08/26 20:49:27 Handler: Actual request
[cors] 2025/08/26 20:49:27   Actual request no headers added: missing origin
GET [/_next/static/chunks/main-app-fbd1bda7cc867e96.js]
=> 200 GET [/_next/static/chunks/main-app-fbd1bda7cc867e96.js] took 34.869958ms
[cors] 2025/08/26 20:49:27 Handler: Actual request
[cors] 2025/08/26 20:49:27   Actual request no headers added: missing origin
GET [/_next/static/chunks/671-285597512da87518.js]
=> 200 GET [/_next/static/chunks/671-285597512da87518.js] took 42.20425ms
[cors] 2025/08/26 20:49:27 Handler: Actual request
[cors] 2025/08/26 20:49:27   Actual request no headers added: missing origin
GET [/_next/static/chunks/app/layout-f47dbcc42ec84e9c.js]
=> 200 GET [/_next/static/chunks/app/layout-f47dbcc42ec84e9c.js] took 40.510167ms
[cors] 2025/08/26 20:49:28 Handler: Actual request
[cors] 2025/08/26 20:49:28   Actual request no headers added: missing origin
GET [/_next/static/chunks/153-e175931f8f939a58.js]
=> 200 GET [/_next/static/chunks/153-e175931f8f939a58.js] took 65.41475ms
[cors] 2025/08/26 20:49:28 Handler: Actual request
[cors] 2025/08/26 20:49:28   Actual request no headers added: missing origin
GET [/_next/static/chunks/758-34e69b7c7ff4cc5a.js]
=> 200 GET [/_next/static/css/42a153bd36e786fa.css] took 618.292875ms
[cors] 2025/08/26 20:49:28 Handler: Actual request
[cors] 2025/08/26 20:49:28   Actual request no headers added: missing origin
GET [/_next/static/chunks/app/(auth)/login/page-f0f026abb79f8d2f.js]
=> 200 GET [/_next/static/chunks/app/(auth)/login/page-f0f026abb79f8d2f.js] took 30.000333ms
=> 200 GET [/_next/static/chunks/758-34e69b7c7ff4cc5a.js] took 790.46425ms
I am using API key for ory cli instead of usual auth. Oauth2 client uses PKCE and is implemented in our webapp using react-oidc-context which is based on oidc-client-ts. We're using vite + react.
s
So is it then a network error from the UI backend?
b
The errors all occur on the ory tunnel page. It used to work fine. Could it be due to a misconfiguration on oidc-client-ts which causes the tunnel to break?
s
it could be anything really without knowing which request failed