Skip to content

TypeError: onSubmitHook is not a function #122

@sunlee-newyork

Description

@sunlee-newyork

Getting a type error originating from LoginForm component whenever a user is logged in with password:

meteor.js?hash=27829e9…:930 Exception in delivering result of invoking 'login': TypeError: onSubmitHook is not a function
    at https://localhost:3100/packages/std_accounts-ui.js?hash=18f1530d5d91a1746c405a2f0d81642f360bd4d2:2239:11
    at userCallback (https://localhost:3100/packages/accounts-password.js?hash=789606fc243ef7a21700cde709da427760db5073:105:21)
    at https://localhost:3100/packages/accounts-base.js?hash=cb3fcc0aec610d0c3194e574b77a7ce74e33b5a1:384:26
    at https://localhost:3100/packages/underscore.js?hash=cde485f60699ff9aced3305f70189e39c665183c:794:19
    at loggedInAndDataReadyCallback (https://localhost:3100/packages/accounts-base.js?hash=cb3fcc0aec610d0c3194e574b77a7ce74e33b5a1:499:5)
    at MethodInvoker._callback (https://localhost:3100/packages/meteor.js?hash=27829e936d09beae3149ecfbf3332c42ccb1596f:1105:22)
    at MethodInvoker._maybeInvokeCallback (https://localhost:3100/packages/ddp-client.js?hash=c9ca22092a3137a7096e8ab722ba5ab8eedb9aec:3678:12)
    at MethodInvoker.receiveResult (https://localhost:3100/packages/ddp-client.js?hash=c9ca22092a3137a7096e8ab722ba5ab8eedb9aec:3698:10)
    at Connection._livedata_result (https://localhost:3100/packages/ddp-client.js?hash=c9ca22092a3137a7096e8ab722ba5ab8eedb9aec:4816:9)
    at onMessage (https://localhost:3100/packages/ddp-client.js?hash=c9ca22092a3137a7096e8ab722ba5ab8eedb9aec:3525:206)

I noticed that the other onSubmitHook calls are called via this.state.onSubmitHook except this one.

Update

Error also occurs when you submit Forgot Password.

Update No.2

Also getting the same error for onPreSignUpHook during password sign up:

Uncaught TypeError: this.state.onPreSignUpHook is not a function
    at LoginFormExtended.signUp (std_accounts-ui.js?hash=d220771…:2446)
    at LoginFormExtended.signUp (app.js?hash=3802fc1…:6347)
    at EnhancedButton._this.handleTouchTap (modules.js?hash=f1e3258…:44868)
    at Object.ReactErrorUtils.js.ReactErrorUtils.invokeGuardedCallback (modules.js?hash=f1e3258…:13022)
    at executeDispatch (modules.js?hash=f1e3258…:12803)
    at Object.executeDispatchesInOrder (modules.js?hash=f1e3258…:12826)
    at executeDispatchesAndRelease (modules.js?hash=f1e3258…:12162)
    at executeDispatchesAndReleaseTopLevel (modules.js?hash=f1e3258…:12173)
    at Array.forEach (<anonymous>)
    at forEachAccumulated (modules.js?hash=f1e3258…:13129)

signUp | @ | std_accounts-ui.js?hash=d220771…:2446
-- | -- | --
  | signUp | @ | app.js?hash=3802fc1…:6347
  | EnhancedButton._this.handleTouchTap | @ | modules.js?hash=f1e3258…:44868
  | ReactErrorUtils.js.ReactErrorUtils.invokeGuardedCallback | @ | modules.js?hash=f1e3258…:13022
  | executeDispatch | @ | modules.js?hash=f1e3258…:12803
  | executeDispatchesInOrder | @ | modules.js?hash=f1e3258…:12826
  | executeDispatchesAndRelease | @ | modules.js?hash=f1e3258…:12162
  | executeDispatchesAndReleaseTopLevel | @ | modules.js?hash=f1e3258…:12173
  | forEachAccumulated | @ | modules.js?hash=f1e3258…:13129
  | processEventQueue | @ | modules.js?hash=f1e3258…:12376
  | runEventQueueInBatch | @ | modules.js?hash=f1e3258…:20852
  | handleTopLevel | @ | modules.js?hash=f1e3258…:20863
  | handleTopLevelImpl | @ | modules.js?hash=f1e3258…:25924
  | perform | @ | modules.js?hash=f1e3258…:17096
  | batchedUpdates | @ | modules.js?hash=f1e3258…:25837
  | batchedUpdates | @ | modules.js?hash=f1e3258…:15766
  | dispatchEvent | @ | modules.js?hash=f1e3258…:25999

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions