ERR Unable to determine extra arguments for windows service error=“Provided tunnel token is not valid (invalid character ‘\x19’ in string literal).” windowsServiceName=Cloudflared Unable to determine extra arguments for windows service: Provided tunnel token is not valid (invalid character ‘\x19’ in string literal).
What is the issue you’re encountering
I’ve been getting an error for several days when attempting to create a Cloudflare tunnel to expose my localhost to the internet using a purchased domain. Every time I reach the copy-paste command step ($ cloudflared.exe service install eyJhIjoiNT…), I get the following error: ERR Unable to determine extra arguments for windows service error=“Provided tunnel token is not valid (invalid character ‘\x19’ in string literal).” windowsServiceName=Cloudflared Unable to determine extra arguments for windows service: Provided tunnel token is not valid (invalid character ‘\x19’ in string literal). I always copy the command directly from Cloudflare without typing it manually, so I expected it to work without issues.
What steps have you taken to resolve the issue?
Cloudflare support mentioned that a hidden character could be causing the error. After viewing the command in HEX format, I found no hidden characters, yet the error persisted even when I manually typed the command.
To troubleshoot, I uploaded the cloudflared file to Triage and ran the command there, expecting it to work, but the same error occurred. Notably, I’ve connected my tunnel using this exact method before without issues. I need help understanding what’s going wrong this time, as I rely on these tunnels to keep my sites accessible.
Just make sure before using the token you paste it in a plain editor like notepad and ensure that it contains only valid characters. You can use scripts like Python or Javascript to check for unwanted characters.
I hope this helps. Please let us know if you have further questions.
Thank you for your prompt response. Unfortunately, I am still encountering the same error.
I would like to share that I created a new tunnel yesterday to determine whether the issue was related to the token or something else. Initially, it seemed to work. However, when I attempted to uninstall and then reinstall my original tunnel, the same error occurred. I also faced the same issue when trying to install the test tunnel again.
In my troubleshooting efforts, I refreshed the token, retrieved it via the API instead of copying it, and even procured a temporary VPS to test the command, but to no avail. Additionally, I examined the token in HEX format and found nothing hidden or unusual.
What is particularly frustrating is that I have meticulously copy-pasted the token without alterations. At this point, I am out of troubleshooting methods and am eager to resolve this issue as soon as possible.
I have also created a new test tunnel; please feel free to use it and see if it works on your end.
Thank you for your assistance.
Best regards,
VTX
Pic of the error:
Command with tunnel token i am running (Test):
cloudflared.exe service install eyJhIjoiNTKZb9w6VkHTZyX68SiFGSXTD4mJnGe2pfclZTFmNGMiLCJ0IjoiZjMzZmVhNzUtZDNiZS00ZjQzLTKZb9w6VkHTZyX68SiFGSXTD4mJnGe2pfcUUmlabVJqTldRdFpqSmxaaTAwTnpVd0xXRTVOell0T1dSaU16ZGlZMkV6WWprMiJ9
Well, after much digging, I finally found my problem. Apparently there is something weird happening within Windows’ copy and paste functionality where it corrupts any base64 I copy. Although I still need to find a more direct method of resolving this copy-paste issue, I wrote a Python script that drives this automation: It simply prompts the user to input the token, processes the response, and then automatically runs it-so no manual copying is required. This finally got me past the issue and connected into my tunnel.
I started noticing something strange. Links I copied didn’t look quite right when I pasted them. Even base64 strings, which should’ve been exact, appeared corrupted and off. I initially brushed it off as a glitch or a one-time error, but the problem persisted, and it only got worse.
Curiosity turned into concern as I began to suspect something deeper was going on. Why was this happening so consistently? It wasn’t just one or two instances; it was everything I copied. That’s when I decided to dig deeper, and after some investigation, the answer hit me like a ton of bricks—I had malware on my system.
Not just any malware, though—it was something called a “clipper.” These malicious programs are designed to intercept what you copy, like cryptocurrency wallets, and replace them with the hacker’s wallet. But in my case, it wasn’t just limited to wallets. It was corrupting everything I copied, especially anything with base64 data.
The realization was chilling. Every link, every piece of data I trusted to my clipboard was being hijacked. I wasted no time in taking action, running scans, and removing the malware completely. And finally, after a tense and stressful ordeal, everything went back to normal. Now, I can copy and paste perfectly again—but I’ll never take my clipboard for granted.