{"record":{"id":"4e3191e4ed931920","repo":"gildas-lormeau/SingleFile","slug":"singlefile-is-disabled-for-this-url","errorCode":null,"errorMessage":"SingleFile is disabled for this URL","messagePattern":"SingleFile is disabled for this URL","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"info","filePath":"src/core/bg/business.js","lineNumber":181,"sourceCode":"\t\t\t\t\t\toptions: tabOptions,\n\t\t\t\t\t\tmethod: \"content.save\"\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tui.onForbiddenDomain(tab);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tui.onForbiddenDomain(tab);\n\t\t}\n\t}));\n\trunTasks();\n}\n\nasync function captureTab(tab, options = {}) {\n\tconst tabId = tab.id;\n\tconst tabOptions = await config.getOptions(tab.url);\n\tif (tabOptions.profileName == config.DISABLED_PROFILE_NAME) {\n\t\tthrow new Error(\"SingleFile is disabled for this URL\");\n\t}\n\tObject.assign(tabOptions, options, {\n\t\tsilent: true,\n\t\tlogsEnabled: false,\n\t\tprogressBarEnabled: false,\n\t\tconfirmFilename: false,\n\t\tconfirmInfobarContent: false,\n\t\topenEditor: false,\n\t\tautoOpenEditor: false,\n\t\topenSavedPage: false,\n\t\tbackgroundSave: false,\n\t\tsaveToClipboard: false,\n\t\tsaveToGDrive: false,\n\t\tsaveToDropbox: false,\n\t\tsaveWithWebDAV: false,\n\t\tsaveWithMCP: false,\n\t\tsaveToGitHub: false,\n\t\tsaveWithCompanion: false,","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/gildas-lormeau/SingleFile/blob/517fb7c5cf2096d89933b747e862d8ecf616a9f9/src/core/bg/business.js#L163-L199","documentation":"SingleFile throws this when the tab's URL resolves to a profile named DISABLED_PROFILE_NAME. It is an intentional guard in captureTab: per-URL options are loaded and if the user (or a rule) marked the URL as disabled, no capture is attempted. It signals the extension is configured to skip this URL, not a runtime failure.","triggerScenarios":"Calling captureTab (directly or via the capture action/UI) on a tab whose URL maps, through config.getOptions and URL rules, to the disabled profile.","commonSituations":"Developers invoking the SingleFile API programmatically on pages the user disabled (e.g. browser internal pages, localhost, work URLs covered by a disable rule); capturing after rules changed so a previously-capturable URL is now disabled.","solutions":["Check the target tab's URL against your SingleFile rules and remove the disable rule if the capture is intended","Pick a different profile for that URL pattern in the extension options","In automation code, catch this error and skip the URL rather than retrying","Verify tab.url is what you expect (redirects may land on a disabled URL)"],"exampleFix":"// before\nawait singlefile.captureTab(tab);\n// after\ntry {\n  await singlefile.captureTab(tab);\n} catch (e) {\n  if (e.message === 'SingleFile is disabled for this URL') return; // skip disabled URL\n  throw e;\n}","handlingStrategy":"try-catch","validationCode":"const opts = await config.getOptions(tab.url);\nif (opts.profileName === config.DISABLED_PROFILE_NAME) throw new SkipCapture();","typeGuard":"const isDisabled = (opts) => opts && opts.profileName === config.DISABLED_PROFILE_NAME;","tryCatchPattern":"try { await captureTab(tab, options); } catch (e) { if (e.message === 'SingleFile is disabled for this URL') return null; throw e; }","preventionTips":["Review URL rules in options before automated captures","Check getOptions(tab.url).profileName before capturing","Treat disabled URLs as expected skips, not failures"],"tags":["configuration","url-rules","profile"],"backgroundTag":"capture-disabled-for-url","analyzedSha":"517fb7c5cf2096d89933b747e862d8ecf616a9f9","analyzedAt":"2026-09-01T10:05:25.770Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}