stencil-router icon indicating copy to clipboard operation
stencil-router copied to clipboard

Error with componentWillLoad in SSR

Open mkv27 opened this issue 7 years ago • 3 comments

With Express server example from docs

stencil-router:

[ ERROR ]  Runtime error detected during componentWillLoad(): stencil-router
           Cannot read property '_history' of null TypeError: Cannot read property '_history' of null at Window.get
           history [as history]

stencil-route:

[ ERROR ]  Runtime error detected during componentWillLoad(): stencil-route
           Cannot read property 'listenerList' of undefined TypeError: Cannot read property 'listenerList' of undefined
           at evalmachine.<anonymous>:3:464 at Object.subscribe (evalmachine.<anonymous>:3:550) at t.componentWillLoad
           (evalmachine.<anonymous>:2:2947) at update

mkv27 avatar Mar 11 '18 18:03 mkv27

Confirming with up to date packages

John0x avatar Mar 28 '18 10:03 John0x

I see this as well; but only on a refresh (and not on the initial load of the page), which I suppose makes sense if refreshing clears history

jedihacks avatar May 18 '18 16:05 jedihacks

Still an issue; Just FYI.

@Edit: It appears not only when user refreshes a webpage but also whenever you change route (testing on ssr starter after updating it to the newest ver.) thus it is clearly a bug and not something that makes sense, @jedihacks

ChBernat avatar Feb 01 '19 14:02 ChBernat