Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

[Bug] Creating an app manifest

Open octaviordz opened this issue 2 years ago • 2 comments

Bug Report

I tried to follow the instructions from a-basic-example yet it's not working for me.

Current Behavior

When trying to do scoop install hello I get a couple of warnings:

WARN  Error parsing JSON at C:\Users\REDACTED\source\repos\scoop-hello\hello.json.
WARN  Bucket 'C:\Users\REDACTED\source\repos\scoop-hello\hello.json' not installed. Add it with 'scoop bucket add C:\Users\REDACTED\source\repos\scoop-hello\hello.json' or 'scoop bucket add C:\Users\REDACTED\source\repos\scoop-hello\hello.json <repo>'.
Couldn't find manifest for 'hello' from 'C:\Users\REDACTED\source\repos\scoop-hello\hello.json' bucket.

Expected Behavior

The 'hello' app is installed.

Additional context/output

As I was writing this issue I found out what is/was causing the problem it was the encoding of hello.json file, when doing '{ "version": "1.0", "url": "https://gist.github.com/lukesampson/6446238/raw/hello.ps1", "bin": "hello.ps1" }' > hello.json the result hello.json files has encoding UTF-16 LE, as reported by VSCode. After saving the same file with UTF-8 then it works as expected. My question is now it UTF-8 the only supported encoding?

Possible Solution

System details

Windows version: [e.g. 7, 8, 10, 11] Windows 10

OS architecture: [e.g. 32bit, 64bit, arm64] 64bit

PowerShell version: [output of "$($PSVersionTable.PSVersion)"]

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      19041  3570

Additional software: [(optional) e.g. ConEmu, Git] Windows Terminal 1.18.2822.0 git version 2.42.0.windows.2

Scoop Configuration

{
    "last_update":  "2023-11-07T13:13:41.1231860-07:00",
    "scoop_branch":  "master",
    "scoop_repo":  "https://github.com/ScoopInstaller/Scoop"
}

octaviordz avatar Nov 07 '23 22:11 octaviordz

I'm having the same issue, the message also shows when " scoop search xxxx".

Similar system, same architecture, win10

PatoMarin avatar Nov 12 '23 18:11 PatoMarin

WARN Error parsing JSON at C:\Users\REDACTED\source\repos\scoop-hello\hello.json. WARN Bucket 'C:\Users\REDACTED\source\repos\scoop-hello\hello.json' not installed. Add it with 'scoop bucket add C:\Users\REDACTED\source\repos\scoop-hello\hello.json' or 'scoop bucket add C:\Users\REDACTED\source\repos\scoop-hello\hello.json '. Couldn't find manifest for 'hello' from 'C:\Users\REDACTED\source\repos\scoop-hello\hello.json' bucket.

  • You added a wrong path as bucket
  • A manifest named 'hello' was created with wrong JSON syntax

See also:

  • https://github.com/ScoopInstaller/BucketTemplate
  • https://github.com/ScoopInstaller/Scoop/issues/5370

My question is now it UTF-8 the only supported encoding?

No, but Scoop expects input to be UTF-8 encoded. https://github.com/ScoopInstaller/Scoop/blob/master/.editorconfig

I'm having the same issue, the message also shows when " scoop search xxxx".

Added buckets contain incorrect manifests.

HUMORCE avatar Jan 14 '24 14:01 HUMORCE

Scoop expects input to be UTF8 encoded without BOM. Powershell before version 7 create by default UTF-16 LE with BOM, so the tutorial breaks for these with this error message:

WARN  Error parsing JSON at 'C:\work\scoop-hello\hello.json'.
WARN  Bucket 'C:\work\scoop-hello\hello.json' not added. Add it with 'scoop bucket add C:\work\scoop-hello\hello.json <repo>'.
Couldn't find manifest for 'hello' from 'C:\work\scoop-hello\hello.json' bucket.

The command

scoop install hello

as instructed on the wiki page does not work, it requires the absolute or relative path of the json manifest, e.g.:

scoop install .\hello.json

would be nice to have a smooth experience in the hello world example to attract more contributors to this magnificent ecosystem!

z3non avatar Jul 09 '24 08:07 z3non