Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

mojito crash when page is reloaded and a mojit invoke() is in progress #1374

@jithine

Description

@jithine

Sequence -

  1. User does a page action which does a mojit invoke()
  2. Before invoke() is processed user does browser refresh
  3. Mojito crashes

Log is captured from the moment user clicks page refresh. 1st part shows that express is detecting a request abort, but in last part of the log, the mojit's controller calls ac.done() and crashes. This is the controller action which was invoked before user did page refresh.

debug: (mojito-dispatcher): Dispatcher created
info: serving locales from cache
Error: Request aborted
    at IncomingMessage.onReqAborted (/home/jithine/g11n_self_serve/node_modules/express/node_modules/connect/node_modules/multiparty/index.js:131:17)
    at IncomingMessage.EventEmitter.emit (events.js:92:17)
    at abortIncoming (http.js:1912:11)
    at Socket.socket.onend (http.js:2004:7)
    at Socket.g (events.js:175:14)
    at Socket.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:419:13)
debug: (mojito-dispatcher): Dispatcher created
info: (outputhandler.server): done

Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (http.js:692:11)
    at ServerResponse.res.setHeader (/home/jithine/g11n_self_serve/node_modules/express/node_modules/connect/lib/patch.js:63:22)
    at ServerResponse.<anonymous> (/home/jithine/g11n_self_serve/node_modules/express/node_modules/connect/lib/patch.js:80:14)
    at Array.forEach (native)
    at ServerResponse.res.writeHead (/home/jithine/g11n_self_serve/node_modules/express/node_modules/connect/lib/patch.js:79:28)
    at Object.OutputHandler._writeHeaders (/home/jithine/g11n_self_serve/node_modules/mojito/lib/output-handler.server.js:133:26)
    at Object.OutputHandler.done (/home/jithine/g11n_self_serve/node_modules/mojito/lib/output-handler.server.js:59:14)
    at Object.ActionContext.done (/home/jithine/g11n_self_serve/node_modules/mojito/lib/app/autoload/action-context.common.js:532:38)
    at /home/jithine/g11n_self_serve/mojits/TaskList/controller.server.js:386:20
    at /home/jithine/g11n_self_serve/mojits/TaskList/models/model.server.js:80:21
ss [jithine@firedesire g11n_self_serve]$

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