knowns icon indicating copy to clipboard operation
knowns copied to clipboard

[Bug]: knowns update read install metadata: invalid character 'ï' looking for beginning of value in window

Open hoanghiep1x0 opened this issue 1 month ago • 3 comments

Bug Description

PS C:\Users\hoang> knowns update Checking for updates... UPDATE → v0.34.1 available (current v0.33.0)

Error: read install metadata: invalid character 'ï' looking for beginning of value

Steps to Reproduce

PS C:\Users\hoang> knowns update Checking for updates... UPDATE → v0.34.1 available (current v0.33.0)

Error: read install metadata: invalid character 'ï' looking for beginning of value

Expected Behavior

PS C:\Users\hoang> knowns update Checking for updates... UPDATE → v0.34.1 available (current v0.33.0)

Error: read install metadata: invalid character 'ï' looking for beginning of value

Actual Behavior

PS C:\Users\hoang> knowns update Checking for updates... UPDATE → v0.34.1 available (current v0.33.0)

Error: read install metadata: invalid character 'ï' looking for beginning of value

Knowns CLI Version

knowns version 0.33.0

Operating System

Windows

Node.js Version

v24.19.0

Error Logs

PS C:\Users\hoang> knowns update
Checking for updates...
  UPDATE → v0.34.1 available (current v0.33.0)

Error: read install metadata: invalid character 'ï' looking for beginning of value

Additional Context

No response

hoanghiep1x0 avatar Oct 22 '26 01:10 hoanghiep1x0

Thanks for opening your first issue here! Welcome to the Knowns CLI community! :wave:

Please make sure you've read our Contributing Guidelines and provided all the necessary information to help us understand and reproduce the issue.

A maintainer will review your issue soon. In the meantime, feel free to explore the codebase or check out other open issues.

welcome[bot] avatar Oct 22 '26 01:10 welcome[bot]

Fixed in v0.35.0. The Windows installer now writes install.json without a BOM, and knowns update ignores a BOM left by older installs. Because v0.33/v0.34 fail while reading that file, run the installer once to move to v0.35.0: irm https://knowns.sh/script/install.ps1 | iex. After that, knowns update works as usual. Thanks for the report!

howznguyen avatar Nov 13 '26 12:11 howznguyen

Follow-up for anyone landing here from 0.34.1: the fix ships in 0.35.0, but knowns update on 0.34.1 still has to read the old install.json first, so it fails with the same invalid character 'ï' error. Run the installer once from a new PowerShell window instead:

irm https://knowns.sh/script/install.ps1 | iex

It installs 0.35.0 and rewrites install.json without the byte order mark, so knowns update works from then on. This is also noted in the v0.35.0 release notes.

howznguyen avatar Nov 13 '26 20:11 howznguyen