{"record":{"id":"58c10170417b6721","repo":"jackwener/OpenCLI","slug":"could-not-restore-midjourney-video-defaults-mes","errorCode":null,"errorMessage":"Could not restore Midjourney video defaults: ${message}","messagePattern":"Could not restore Midjourney video defaults: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"clis/midjourney/action.js","lineNumber":378,"sourceCode":"          Math.min(timeout, 90),\n          submittedAt,\n        );\n      }\n    } catch (error) {\n      primaryError = error;\n      throw error;\n    } finally {\n      // Video actions temporarily mutate account-wide defaults. Always put\n      // them back, including when preparation, submission, or correlation fails.\n      try {\n        await restoreVideoSettings(page, originalSettings, changedResolution, changedBatch);\n      } catch (error) {\n        const message = error instanceof Error ? error.message : String(error);\n        // Once a paid child id is known, surfacing restoration as command\n        // failure would encourage an accidental duplicate. Preserve the job\n        // result and make the account-wide setting risk explicit instead.\n        if (childId || primaryError) {\n          log.warn(`Could not restore Midjourney video defaults: ${message}`);\n        } else {\n          throw error;\n        }\n      }\n    }\n    if (!normalizeBoolean(kwargs.wait, true)) {\n      const afterSubmit = await getMidjourneyAccount(page);\n      await recordQuotaSnapshot(afterSubmit, 'action-after-submit');\n      return [actionResult(source, operation, estimated, {\n        jobId: childId,\n        status: 'submitted',\n        observedMinutes: observedMinutes(account, afterSubmit),\n        index: index[0] + 1,\n        url: jobUrl(childId),\n      })];\n    }\n\n    const elapsedSeconds = (Date.now() - submittedAt) / 1000;","sourceCodeStart":360,"sourceCodeEnd":396,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/midjourney/action.js#L360-L396","documentation":"After a Midjourney video job, the CLI tries to restore the account-wide video settings to their defaults. If restoration fails but the job itself already succeeded (a childId or primary error exists), it warns instead of failing the command, since throwing would push users into accidentally submitting a duplicate paid job.","triggerScenarios":"The video generation completed and a child job id exists, but the subsequent call to reset Midjourney video defaults (via the web session) threw an error.","commonSituations":"Midjourney session expired or got logged out between job submission and restoration, transient network failure on the settings request, Midjourney UI/API change breaking the settings-reset flow, rate limiting on the account.","solutions":["Treat the warning as informational: the paid job result was preserved, so do NOT resubmit the job","Verify the account's video settings on the Midjourney website and reset them manually if needed","Re-authenticate the Midjourney session if the message indicates auth problems","Rerun only the settings restoration (e.g., a settings/defaults command) rather than the whole video job"],"exampleFix":"// before\n// $ opencli midjourney video ...  # job succeeded but settings left customized\n// after: manually verify/reset\n// Midjourney settings -> video defaults restored; no duplicate job submitted","handlingStrategy":"try-catch","validationCode":"// confirm job succeeded before ever resubmitting\nconst job = await getMidjourneyJob(childId);\nif (job?.status !== 'succeeded') throw new Error('Job not confirmed; investigate before rerun');","typeGuard":null,"tryCatchPattern":"try { await restoreVideoDefaults(); }\ncatch (e) { log.warn(`restore failed: ${e.message}`); /* keep job result */ }","preventionTips":["Never resubmit paid video jobs after this warning","Refresh Midjourney session before long jobs","Verify settings manually after restore warnings"],"tags":["midjourney","settings-restore","side-effect-safety","warning"],"backgroundTag":"settings-restore-failed","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}