Monday, December 9, 2019

JSF client exception Uncaught TypeError: Cannot read property 'currentStep' of undefined

I've encountered this pattern a few times so thought I'd document it here for posterity.  Sometimes my application encounters and uncaught exception on the client that looks like this in the browser console:

core.js.xhtml?ln=primefaces&v=7.0:1 Request return with error:parsererror.
error @ core.js.xhtml?ln=primefaces&v=7.0:1
components.js.xhtml?ln=primefaces&v=7.0:74 Uncaught TypeError: Cannot read property 'currentStep' of undefined
    at Object.oncomplete (components.js.xhtml?ln=primefaces&v=7.0:74)
    at Object.<anonymous> (core.js.xhtml?ln=primefaces&v=7.0:3)
    at u (jquery.js.xhtml?ln=primefaces&v=7.0:2)
    at Object.fireWith [as rejectWith] (jquery.js.xhtml?ln=primefaces&v=7.0:2)
    at k (jquery.js.xhtml?ln=primefaces&v=7.0:2)
    at XMLHttpRequest.<anonymous> (jquery.js.xhtml?ln=primefaces&v=7.0:2)

When this happens there is usually a Java exception in the server console, so that's where to look for more information.

2 comments:

kyabhft said...

We are also facing a similar issue. Any luck on the solution?

craigmcc said...

Sorry, I don't remember specifics beyond what is said in the post. I think the important point was that there was a clear exception on the payara console that told me what was wrong. It was just that the message in the browser was not very helpful.