Share viewer fails on gateways that ignore range requests

Aperta
#1,081 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@BravoNatalie ci sta già lavorando.

Dal 5/11/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Share links by filecoin-pin add --encrypt … --get-share-link cannot be opened in the browser: the v1 viewer (bafkreiarmlzfby6zdf2g6lppopnn2d35mpc2m73thored5w2yy2lfj42ce, the DEFAULT_VIEWER_URL pinned in [[email protected]] requests the envelope from https://.ipfs.inbrowser.link/ with range header, the origin responds 200 with the full body (no content-range), and the viewer gives up with: This share can't be opened in the browser. The server sent the whole encrypted file instead of the parts the Viewer asked for. You can download the encrypted file and decrypt it on your machine.

Image

The share itself is valid: the same link opens fine with filecoin-pin get --share '', and the wrapped key decrypts the stored envelope byte-exact offline. Only the viewer path fails — which makes the default share experience ("send this link to someone without a wallet") broken end to end, since the recipient by definition doesn't have the CLI.

Reproduction (CLI only)

  1. Mint a share link for any small file (calibration or mainnet)
    PRIVATE_KEY= filecoin-pin add --encrypt ./hello.txt --get-share-link
    → prints https://bafkreiarml….ipfs.inbrowser.link/#v1/&d=…&k=fak1_…

  2. Wait for IPNI:
    curl https://cid.contact/cid/ # non-empty ProviderResults

  3. Sanity-check the share is valid:
    filecoin-pin get --share '' ./out # succeeds, restores the file

  4. Open the same link in a browser → the error above.
    The viewer makes exactly one content request:

GET https://.ipfs.inbrowser.link/
Range: bytes=1-327679
← HTTP 200
content-length: 2793983 (entire envelope)
content-range: (absent)
accept-ranges: bytes (advertised, not honored)

No service worker is registered for the content subdomain inside the viewer's browsing context, so the request hits inbrowser.link's server path, which advertises accept-ranges: bytes but ignores range. (Side observation: the same URL returns 403 Forbidden for non-browser user agents, so curl can't reproduce step 4 — it must be a browser.)

Independently verified while diagnosing: IPNI listed the providers, both provider gateways served the envelope (/ipfs/?format=raw → 200), and unwrapWith(T, decodeGrant(d)) + FEE decrypt of the fetched envelope reproduced the plaintext byte-exact. Nothing is wrong with the link, the key, or availability.

Lingua principale
TypeScript
Stelle
27
Fork
35
Merge medio
1g 13h
PR unite (30g)
38

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di FilOzone/synapse-sdk

Tutte le issue di FilOzone/synapse-sdk

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.