Cloudflared forge tunnel not working

ä¼äøšå¾®äæ”ęˆŖå›¾_17364844525838 seems works but forge tunnel does not work also

Interesting… can you try run cloudflared at the location where it’s complaining the file is not there?

Also wasn’t able to reproduce the issue with the public registry, it seems like https://r.cnpmjs.org/ is a registry in China that syncs with the main registry. I have a feeling something has gone wrong with it. Another suggestion I have would be to VPN into a different geo and see if another registry works…


It’s working as expected now after I reinstalled cli again & again… finally @BoZhang @IssacSun

2 Likes

did you run this in docker?

I still failed also

BaseError: Failed to start cloudflared. Rerunning the command with --verbose may give more details.
at ChildProcess. (/root/.nvm/versions/node/v20.18.1/lib/node_modules/@forge/cli/node_modules/@forge/tunnel/out/services/create-tunnel-service.js:33:19)
at ChildProcess.emit (node:events:518:28)

No file under /root/.nvm/versions/node/v20.18.1/lib/node_modules/@forge/cli/node_modules/cloudflared/bin/

root cause:

When installing the cloudflared with npm install -g @forge/cli
the bin file under XXXXX/node/v20.18.1/lib/node_modules/@forge/cli/node_modules/cloudflared/bin/cloudflared did not install well due to the firewall with github

solution

Manully download the bin file from Github with VPN, and

chmod +x /root/.nvm/versions/node/v20.18.1/lib/node_modules/@forge/cli/node_modules/cloudflared/bin/cloudflared

Finally works

async function install_linux(to, version = import_constants.CLOUDFLARED_VERSION) {
  const file = LINUX_URL[process.arch];
  if (file === void 0) {
    throw new import_error.UnsupportedError("Unsupported architecture: " + process.arch);
  }
  await download(resolve_base(version) + file, to);
  import_node_fs.default.chmodSync(to, "755");
  return to;
}

Hi @YY1 @IssacSun
We have released Forge CLI version 10.13.6, which addresses the above issue with cloudflared . If you encounter any issues installing cloudflared with Forge CLI, you can install it locally (Could be from a mirror, there’s no need to obtain it from NPM), and Forge will automatically detect it.

3 Likes