olcli icon indicating copy to clipboard operation
olcli copied to clipboard

Cannot convert argument to a ByteString because the character at index 18 has a value of 65533 which is greater than 255

Open critchlowr opened this issue 9 months ago • 3 comments

ryan@myMac ~ % olcli pull 'You&I' ✖ Failed: Cannot convert argument to a ByteString because the character at index 18 has a value of 65533 which is greater than 255. ryan@myMac ~ %

critchlowr avatar Mar 02 '26 01:03 critchlowr

Thank you @critchlowr! Fixed in v0.1.6.

The issue: Node.js fetch rejects response headers with non-Latin1 characters. Overleaf puts the project name in the Content-Disposition header, so project names with special characters cause a crash during download.

Binary downloads (pull, pdf, output) now use Node.js native http/https instead of fetch, which doesn't have this restriction.

Update with:

npm update -g @aloth/olcli

Let me know if it works for your project.

aloth avatar Mar 18 '26 12:03 aloth

npm update -g @aloth/olcli

the issue still persists, please reopen

Image

weeebdev avatar Apr 15 '26 19:04 weeebdev

Thanks for flagging this, @weeebdev.

You were right - the previous fix only covered some download endpoints, but not all Overleaf requests. The underlying issue was broader: Node fetch can fail on non-Latin1 response headers, and that could still affect commands like olcli list.

This is now fixed in v0.1.8 by replacing the remaining Overleaf fetch calls with a shared Node http/https transport layer.

I also tested the updated build against a live Overleaf project with a Unicode name and verified these commands work:

  • list
  • info
  • pull
  • pdf
  • output

You can update with:

npm update -g @aloth/olcli

aloth avatar Apr 17 '26 17:04 aloth