Fix NPM_TOKEN so CI can publish @stellar/varial-sdk

Open
#3,058 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, node.js, typescript
Domain
ci-cd, release

Research direction

Start with .github/workflows/deployFreighterApiProduction.yml and the linked failed run to understand how NPM_TOKEN is used. Check the token’s package access, expiry, and 2FA-bypass setting, then verify by running the beta workflow with a throwaway prerelease version. Done means CI publishes successfully without a manual publish; also deprecate 0.0.0-stage as specified.

Written by the indexing model from the issue text.

Description

TL;DR: The Deploy @stellar/varial-sdk workflow in stellar/freighter can't publish the new package. Its NPM_TOKEN was rejected on launch day, so 7.0.0 was published by hand from a maintainer's laptop. Until the token is fixed, every SDK release needs a person with npm publish rights to do it manually.

What happened

  • Oct 28: the workflow built and packed @stellar/[email protected], then the upload failed with E404 Not Found - PUT https://registry.npmjs.org/@stellar%2fvarial-sdk. npm returns 404, not 403, when a token isn't allowed to publish a package.
  • 7.0.0 was then published manually, and is latest on npm.
  • The stellar-npm-ci account has since been added as a maintainer of @stellar/varial-sdk. The CI path has not been re-run since, so it is unknown whether that alone fixes it.

Likely cause: NPM_TOKEN is a granular access token scoped to selected packages (e.g. only @stellar/freighter-api). Being a maintainer doesn't help if the token itself doesn't list the package.

To do

  • Ops: check the token's package access, and either add @stellar/varial-sdk or scope it to the @stellar org. Confirm its expiry date and that "bypass 2FA" is on.
  • Verify by running the beta workflow (Deploy @stellar/varial-sdk (Beta)) with a throwaway prerelease version.
  • Deprecate the stray 0.0.0-stage version left over from the manual publish: npm deprecate @stellar/[email protected] "Placeholder, do not use".

Accept: a CI run publishes @stellar/varial-sdk without anyone publishing by hand.


Details (for agents)
  • Failed run: https://github.com/stellar/freighter/actions/runs/40788570456 (Oct 28 23:36 UTC).
  • Workflow: .github/workflows/deployFreighterApiProduction.yml uses actions/setup-node with registry-url: https://registry.npmjs.org and NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}, then npm publish --access public from @stellar/freighter-api/ (the directory keeps its old name; the package name comes from its package.json).
  • Current npm maintainers of both @stellar/varial-sdk and @stellar/freighter-api: stellar-npm-ci, stellar-npm, quietbits, jacekn, fnando_sdf, cassiomg, piyalbasu.
  • npm versions: 0.0.0-stage (23:51 UTC) and 7.0.0 (23:52 UTC), both Oct 28. The SDK version must never drop below 4.2.0 (the extension picks the signMessage/signAuthEntry response format from it).
Dominant language
TypeScript
Stars
122
Forks
62
Avg merge
4d 19h
Merged PRs (30d)
41

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stellar/freighter

All issues in stellar/freighter

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.