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;
}