{"record":{"id":"d66b363b95fa8532","repo":"appsmithorg/appsmith","slug":"widget-payload-widgetname-not-found","errorCode":null,"errorMessage":"Widget ${payload.widgetName} not found","messagePattern":"Widget (.+?) not found","errorType":"exception","errorClass":"TriggerFailureError","httpStatus":null,"severity":"error","filePath":"app/client/src/sagas/ActionExecution/ResetWidgetActionSaga.ts","lineNumber":38,"sourceCode":"  const { payload } = action;\n  const { metaUpdates, resetChildren, widgetName } = payload;\n\n  if (getType(widgetName) !== Types.STRING) {\n    throw new ActionValidationError(\n      \"RESET_WIDGET_META_RECURSIVE_BY_NAME\",\n      \"widgetName\",\n      Types.STRING,\n      getType(widgetName),\n    );\n  }\n\n  const widget: FlattenedWidgetProps | undefined = yield select(\n    getWidgetByName,\n    widgetName,\n  );\n\n  if (!widget) {\n    throw new TriggerFailureError(`Widget ${payload.widgetName} not found`);\n  }\n\n  yield put(resetWidgetMetaUpdates(metaUpdates));\n\n  yield take(ReduxActionTypes.RESET_WIDGET_META_EVALUATED);\n  AppsmithConsole.info({\n    source,\n    text: `resetWidget triggered`,\n    state: {\n      widgetName,\n      resetChildren,\n    },\n  });\n}\n","sourceCodeStart":20,"sourceCodeEnd":53,"githubUrl":"https://github.com/appsmithorg/appsmith/blob/8cd9021c24cdbea1c3c12c966073708e83db60c2/app/client/src/sagas/ActionExecution/ResetWidgetActionSaga.ts#L20-L53","documentation":"TriggerFailureError thrown after the saga confirms widgetName is a string but getWidgetByName returns undefined. The name passed type validation but no widget with that exact name exists in the current flattened widget tree, so resetWidgetMetaUpdates cannot run.","triggerScenarios":"widgetName is a valid string but does not match any widget on the current page; the widget was deleted or renamed after the binding was authored; the action runs on a page where the widget is not mounted.","commonSituations":"Renaming a widget without updating the resetWidget call; running the action during a page transition before the target widget mounts; typo (case sensitivity, trailing space).","solutions":["Open the canvas, select the widget, copy its exact name from the property pane, and paste it into resetWidget.","If the widget lives on a different page, move the resetWidget call there or restructure the flow.","Re-check after rename refactors: search the codebase for the old widget name."],"exampleFix":"// before: widget renamed from 'Input1' to 'userNameInput'\nresetWidget('Input1');\n// after\nresetWidget('userNameInput');","handlingStrategy":"validation","validationCode":"// Confirm widget exists before resetting\n// (no public helper; rely on canvas state)\nif (!widgetExistsOnPage(widgetName)) {\n  showAlert(`Widget '${widgetName}' not found`, 'error');\n  return;\n}\nresetWidget(widgetName);","typeGuard":null,"tryCatchPattern":"try {\n  resetWidget(widgetName);\n} catch (e) {\n  if (e instanceof TriggerFailureError) showAlert(e.message, 'error');\n}","preventionTips":["After renaming a widget, search the codebase and update every resetWidget call.","Keep resetWidget calls on the same page as the target widget.","Treat widget names as case-sensitive identifiers."],"tags":["reset-widget","widget-reference","stale-state"],"backgroundTag":null,"analyzedSha":"8cd9021c24cdbea1c3c12c966073708e83db60c2","analyzedAt":"2026-08-12T22:14:19.293Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}