Immutable solution version
Unable to Authenticate Wrangler in any Remote Development Environment
Complete solution
Shows how to fix unable to Authenticate Wrangler in any Remote Development Environment. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
[tkalejaiye (commenter)]: If wrangler login fails on a remote dev environment (Gitpod, Codespaces, Stackblitz) with "Received query string parameter doesn't match the one sent!", forward port 8976 to your local machine when you ssh in, e.g. ssh -L 8976:YOUR_HOST:8976 user@remote.
Steps
- [tkalejaiye (commenter)]: If wrangler login fails on a remote dev environment (Gitpod, Codespaces, Stackblitz) with "Received query string parameter doesn't match the one sent!", forward port 8976 to your local machine when you ssh in, e.g. ssh -L 8976:YOUR_HOST:8976 user@remote. The OAuth callback needs that port reachable locally.
- https://github.com/cloudflare/workers-sdk/issues/2874: Issue cloudflare/workers-sdk#2874 (closed, 28 comments): https://developers.cloudflare.com/workers/wrangler/commands/#using-wrangler-login-on-a-remote-machine outlines how to authenticate the Wrangler CLI when using a remote development environment (e.g. Codespaces).
- However it doesn't seem to work. The original shell always puts out this error message at the end
Received query string parameter doesn't match the one sent! Possible malicious activity somewhere.- I've seen this on Gitpod, Codespaces, Stackblitz, and...
When to use
You are seeing this: https://github.com/cloudflare/workers-sdk/issues/2874: Issue cloudflare/workers-sdk#2874 (closed, 28 comments): https://developers.cloudflare.com/workers/wrangler/commands/#using-wrangler-login-on-a-remote-machine outlines how to authenticate the Wrangler... Use this skill when you run into "Unable to Authenticate Wrangler in any Remote Development Environment".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/cloudflare/workers-sdk/issues/2874:
- https://developers.cloudflare.com/workers/wrangler/commands/#using-wrangler-login-on-a-remote-machine
Evidence
Issue gh:cloudflare/workers-sdk#2874: the reporter asked: Issue cloudflare/workers-sdk#2874 (closed, 28 comments): https://developers.cloudflare.com/workers/wrangler/commands/#using-wrangler-login-on-a-remote-machine outlines how to authenticate the Wrangler CLI when using a remote development environment (e.g. Codespaces).
However it doesn't seem to work. The original shell always puts out this error message at the end
Received query string parameter doesn't match the one sent! Possible malicious activity somewhere.I've seen this on Gitpod, Codespaces, Stackblitz, and... The verified answer was: [tkalejaiye (commenter)]: If wrangler login fails on a remote dev environment (Gitpod, Codespaces, Stackblitz) with "Received query string parameter doesn't match the one sent!", forward port 8976 to your local machine when you ssh in, e.g. ssh -L 8976:YOUR_HOST:8976 user@remote. The OAuth callback needs that port reachable locally. Evidence thread: https://github.com/cloudflare/workers-sdk/issues/2874
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_7YuyHoHFla5-lHiL5QMixQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Unable to Authenticate Wrangler in any Remote Development Environment <span>— Vectle</span></a>