can1357/oh-my-pi · error · Error

This share no longer exists (gist deleted?).

Error message

This share no longer exists (gist deleted?).

What it means

This error comes from the browser-side share-loader embedded in exported HTML. After sharing, the page fetches the GitHub Gist that holds the sealed session payload; GitHub returning 404 means the gist is gone (deleted, or made inaccessible), so the shared page cannot unseal its data and throws this message to the viewer.

Solutions

  1. Re-share the session: regenerate the HTML and re-run /share to create a fresh gist, then distribute the new page.
  2. Check the gist id in the page/network tab against gist.github.com to confirm it's really gone.
  3. If you're the author, restore via GitHub's gist history/deleted-item recovery is not available — create a new gist.
  4. Keep the original session and export pipeline so shares can be regenerated on demand.

Example fix

// before: viewing a stale page — nothing to fix client-side
// after: regenerate and re-share
// omp: /share  → produces new HTML + fresh gist; distribute the new file
Defensive patterns

Strategy: try-catch

Validate before calling

// viewer-side check before relying on a share
const id = gistIdFromShareUrl;
const res = await fetch(`https://api.github.com/gists/${id}`, { method: "HEAD" });
if (res.status === 404) console.warn("This share's gist is gone; ask for a re-share");

Type guard

null

Try / catch

try {
  const blob = await fetchGistBlob(id);
} catch (err) {
  if (err instanceof Error && err.message.includes("no longer exists")) {
    showShareExpiredNotice(); // prompt author to re-run /share
  } else throw err;
}

Prevention

When it happens

Trigger: Opening a previously generated shared-session HTML page whose gist id no longer resolves: gist was deleted by the author, GitHub removed it, or the id embedded in the page is wrong.

Common situations: Author deleted the gist after sharing (or bulk-deleted gists); GitHub account deleted; DMCA/abuse takedown; sharing a page generated before the gist upload actually completed; tampered/mistyped share URL.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/08a58e8d47c001a7. Report an issue: GitHub.

Appendix: source

Thrown at packages/coding-agent/src/export/html/share-loader.js:35

      function decodeBase64(text) {
        var binary = atob(text);
        var bytes = new Uint8Array(binary.length);
        for (var i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
        return bytes;
      }

      function decodeBase64Url(text) {
        var b64 = text.replace(/-/g, '+').replace(/_/g, '/');
        while (b64.length % 4) b64 += '=';
        return decodeBase64(b64);
      }

      async function fetchGistBlob(id) {
        var res = await fetch('https://api.github.com/gists/' + id, {
          headers: { Accept: 'application/vnd.github+json' },
        });
        if (res.status === 404) throw new Error('This share no longer exists (gist deleted?).');
        if (!res.ok) throw new Error('Gist fetch failed: HTTP ' + res.status);
        var gist = await res.json();
        var files = Object.values(gist.files || {});
        var file = files.find(function(f) { return /\.ompshare\.txt$/.test(f.filename); }) || files[0];
        if (!file) throw new Error('Gist has no files.');
        var text = file.content;
        if (!text || file.truncated) {
          var raw = await fetch(file.raw_url);
          if (!raw.ok) throw new Error('Gist raw fetch failed: HTTP ' + raw.status);
          text = await raw.text();
        }
        return decodeBase64(text.replace(/\s+/g, ''));
      }

      async function fetchServerBlob(id) {
        var res = await fetch('/s/' + id + '/raw');
        if (res.status === 404 || res.status === 410) {
          throw new Error('This share no longer exists (expired or deleted).');

View on GitHub (pinned to 9690622007)