{"record":{"id":"08a58e8d47c001a7","repo":"can1357/oh-my-pi","slug":"this-share-no-longer-exists-gist-deleted","errorCode":null,"errorMessage":"This share no longer exists (gist deleted?).","messagePattern":"This share no longer exists \\(gist deleted\\?\\)\\.","errorType":"exception","errorClass":"Error","httpStatus":404,"severity":"error","filePath":"packages/coding-agent/src/export/html/share-loader.js","lineNumber":35,"sourceCode":"\n      function decodeBase64(text) {\n        var binary = atob(text);\n        var bytes = new Uint8Array(binary.length);\n        for (var i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);\n        return bytes;\n      }\n\n      function decodeBase64Url(text) {\n        var b64 = text.replace(/-/g, '+').replace(/_/g, '/');\n        while (b64.length % 4) b64 += '=';\n        return decodeBase64(b64);\n      }\n\n      async function fetchGistBlob(id) {\n        var res = await fetch('https://api.github.com/gists/' + id, {\n          headers: { Accept: 'application/vnd.github+json' },\n        });\n        if (res.status === 404) throw new Error('This share no longer exists (gist deleted?).');\n        if (!res.ok) throw new Error('Gist fetch failed: HTTP ' + res.status);\n        var gist = await res.json();\n        var files = Object.values(gist.files || {});\n        var file = files.find(function(f) { return /\\.ompshare\\.txt$/.test(f.filename); }) || files[0];\n        if (!file) throw new Error('Gist has no files.');\n        var text = file.content;\n        if (!text || file.truncated) {\n          var raw = await fetch(file.raw_url);\n          if (!raw.ok) throw new Error('Gist raw fetch failed: HTTP ' + raw.status);\n          text = await raw.text();\n        }\n        return decodeBase64(text.replace(/\\s+/g, ''));\n      }\n\n      async function fetchServerBlob(id) {\n        var res = await fetch('/s/' + id + '/raw');\n        if (res.status === 404 || res.status === 410) {\n          throw new Error('This share no longer exists (expired or deleted).');","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/export/html/share-loader.js#L17-L53","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Re-share the session: regenerate the HTML and re-run /share to create a fresh gist, then distribute the new page.","Check the gist id in the page/network tab against gist.github.com to confirm it's really gone.","If you're the author, restore via GitHub's gist history/deleted-item recovery is not available — create a new gist.","Keep the original session and export pipeline so shares can be regenerated on demand."],"exampleFix":"// before: viewing a stale page — nothing to fix client-side\n// after: regenerate and re-share\n// omp: /share  → produces new HTML + fresh gist; distribute the new file","handlingStrategy":"try-catch","validationCode":"// viewer-side check before relying on a share\nconst id = gistIdFromShareUrl;\nconst res = await fetch(`https://api.github.com/gists/${id}`, { method: \"HEAD\" });\nif (res.status === 404) console.warn(\"This share's gist is gone; ask for a re-share\");","typeGuard":"null","tryCatchPattern":"try {\n  const blob = await fetchGistBlob(id);\n} catch (err) {\n  if (err instanceof Error && err.message.includes(\"no longer exists\")) {\n    showShareExpiredNotice(); // prompt author to re-run /share\n  } else throw err;\n}","preventionTips":["Don't delete gists that back active shares; track them if you clean up your GitHub gists.","Verify the share page loads right after creating it.","Keep the original session export so you can re-share quickly.","For long-lived shares, use a custom share script with storage you control."],"tags":["network","github","gist","sharing","http-404"],"backgroundTag":"gist-404","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}