{"record":{"id":"a897a09e91682d60","repo":"jely2002/youtube-dl-gui","slug":"no-options-found-for-group-groupid-cannot-resume","errorCode":null,"errorMessage":"No options found for group: ${groupId}, cannot resume.","messagePattern":"No options found for group: (.+?), cannot resume\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/stores/media/media.ts","lineNumber":437,"sourceCode":"    await notify(NotificationKind.QueueDownloading, { n: group_ids.length.toString() }, fromShortcut);\n  }\n\n  function pauseAllGroups() {\n    for (const groupId of groupStore.groupOrder) {\n      const state = stateStore.getGroupState(groupId);\n      if (state === MediaState.downloading || state === MediaState.downloadingList) {\n        void pauseGroup(groupId);\n      }\n    }\n  }\n\n  function resumeAllGroups() {\n    for (const groupId of groupStore.groupOrder) {\n      const state = stateStore.getGroupState(groupId);\n      if (state !== MediaState.paused && state !== MediaState.pausedList) continue;\n      const options = optionsStore.getOptions(groupId);\n      if (!options) {\n        console.warn(`No options found for group: ${groupId}, cannot resume.`);\n        continue;\n      }\n      void downloadGroup(groupId, options);\n    }\n  }\n\n  function deleteGroup(id: string) {\n    const group = groupStore.findGroupById(id);\n    for (const itemId of Object.keys(group.items)) {\n      stateStore.removeState(itemId);\n      progressStore.deleteProgress(itemId);\n      sizeStore.removeSizes(itemId);\n      diagnosticsStore.removeDiagnostics(itemId);\n    }\n    diagnosticsStore.removeDiagnostics(group.id);\n    destinationStore.deleteDestinations(group.id);\n    optionsStore.removeOptions(group.id);\n    groupStore.cancelGroup(group.id);","sourceCodeStart":419,"sourceCodeEnd":455,"githubUrl":"https://github.com/jely2002/youtube-dl-gui/blob/c402ee39c0eabab68934c48f8b787ff37a1577b0/src/stores/media/media.ts#L419-L455","documentation":"resumeAllGroups iterates all groups in paused state and restarts their downloads using stored options. If a paused group has no persisted options, it logs a warning 'No options found for group: ${groupId}, cannot resume.' via console.warn and continues — it does not throw and does not abort other groups.","triggerScenarios":"A group is in MediaState.paused/pausedList but optionsStore.getOptions(groupId) returns undefined — options were cleared on app restart (not persisted), the group was created without options, or options were pruned while state remained paused.","commonSituations":"Resuming after an app relaunch where download options are session-only; clearing option overrides elsewhere in the UI while leaving the group paused; a partially initialized group that reached paused state without ever starting.","solutions":["Persist download options alongside group state so paused groups survive restarts with their options.","When clearing/pruning options, also move the group out of paused state (e.g. back to idle) so resumeAllGroups skips it.","Check the console warning's groupId and re-create the download for that group manually with fresh options.","In the UI, hide the resume-all button or exclude groups lacking options."],"exampleFix":"// before\nconst options = optionsStore.getOptions(groupId);\nif (!options) { console.warn(...); continue; }\n// after\nconst options = optionsStore.getOptions(groupId);\nif (!options) {\n  stateStore.setGroupState(groupId, MediaState.idle); // resync state\n  continue;\n}","handlingStrategy":"validation","validationCode":"const state = stateStore.getGroupState(groupId);\nconst options = optionsStore.getOptions(groupId);\nif (state === MediaState.paused && !options) {\n  stateStore.setGroupState(groupId, MediaState.idle); // cannot resume\n}","typeGuard":"const isResumable = (groupId: string): boolean => {\n  const s = stateStore.getGroupState(groupId);\n  return (s === MediaState.paused || s === MediaState.pausedList) && !!optionsStore.getOptions(groupId);\n};","tryCatchPattern":"// Non-throwing by design: filter to resumable groups before acting.\nfor (const groupId of groupStore.groupOrder.filter(isResumable)) {\n  void downloadGroup(groupId, optionsStore.getOptions(groupId)!);\n}","preventionTips":["Persist download options with group state so resume works after restart.","Clear paused state whenever options are pruned or cleared.","Surface non-resumable paused groups in the UI instead of silently skipping them."],"tags":["state-management","resume","missing-options","console-warning"],"backgroundTag":"missing-required-config","analyzedSha":"c402ee39c0eabab68934c48f8b787ff37a1577b0","analyzedAt":"2026-09-12T02:01:12.452Z","contentChangedAt":"2026-09-12T02:01:12.452Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}