SyntaxError while publishing: "Unexpected token r in JSON at position 0"
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- docker, github-actions, typescript
Rechercherichtung
Reproduziere den Publish-Pfad aus .github/workflows/validate.yml unter Verwendung der gezeigten devcontainers/action-Konfiguration und des protokollierten devContainersSpecCLI.js-Stacks als Einstiegspunkte. Vergleiche die Validierung mit dem Veröffentlichen in der Registry und verfolge, welche Antwort an JSON.parse übergeben wird; fertig bedeutet, dass der Fehler mit einer eindeutigen Diagnose reproduzierbar ist oder das Veröffentlichen für das gemeldete Feature erfolgreich ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I'm trying to publish a feature but am failing to do so.
Although to me the contents of the repo seem correct it fails with an error that doesn't really tell me anything:
[2025-05-19T20:20:21.191Z] Packaging feature collection...
[2025-05-19T20:20:21.194Z] Processing feature: starship...
[2025-05-19T20:20:21.216Z] Packaged 1 features!
[2025-05-19T20:20:21.216Z] Processing feature: starship...
[2025-05-19T20:20:21.217Z] Fetching published versions...
[2025-05-19T20:20:21.314Z] Publishing tags: 1,1.0,1.0.0,latest...
[2025-05-19T20:20:21.316Z] Data layer digest: sha256:506a0c07c447a52f751d546fd465145f534790be0456c088a59f7b2af161284e (archive size: 6144)
[2025-05-19T20:20:21.316Z] Computed content digest from manifest: sha256:da7f47bc8d89feb98a7c3cdd108558b377e182e0accb6d0c58cd7039b5ac42ad
SyntaxError: Unexpected token r in JSON at position 0
at JSON.parse (<anonymous>)
at kJ (/opt/acttoolcache/node/18.20.8/x64/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:608:1596)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async mJ (/opt/acttoolcache/node/18.20.8/x64/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:605:579)
at async cC (/opt/acttoolcache/node/18.20.8/x64/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:609:1298)
at async Vz (/opt/acttoolcache/node/18.20.8/x64/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:609:2795)
at async /opt/acttoolcache/node/18.20.8/x64/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:484:1188
::error::The process '/opt/acttoolcache/node/18.20.8/x64/bin/devcontainer' failed with exit code 1
::error::(!) Failed to publish Features.
I don't know what JSON this would be that it's failing to parse.
Using the action as follows (with env.REGISTRY_URL being a valid registry url which https://github.com/docker/login-action@v3 managed to successfully login to):
- name: "Publish Features"
uses: "https://github.com/devcontainers/action@v1"
with:
publish-features: "true"
oci-registry: "${{ env.REGISTRY_URL }}"
base-path-to-features: "./src"
generate-docs: "false"
Also if I only validate the repo contents, using the contents of https://github.com/devcontainers/feature-starter/blob/main/.github/workflows/validate.yml, the validation passes successfully.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 90
- Forks
- 33
- Ø Merge
- 3 Std. 8 Min.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus devcontainers/action
-
AddOffen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
devcontainers/action#225 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
devcontainers/action#223 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 38/100
devcontainers/action#222 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
devcontainers/action#220 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
devcontainers/action#213 · 2 Kommentare ·
Alle Issues in devcontainers/action
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
awesome-dsh-plugin/awesome-dsh-plugin#9184 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
farion1231/cc-switch#8829 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[core-client] Remove unused hand-maintained transport helpers after the definition-table cutoverOffendoc-audit enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100