postProcessManager is undefined

Hi,
i just updated to babylon v8.20 (from 7.10, because we had some breaking issues that i am going through).

Currently on chrome I am getting an error on the following line:

chunk-2NBTPGO4.js?v=e80c8ec5:76 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'postProcessManager')
    at chunk-2NBTPGO4.js?v=e80c8ec5:76:33
    at _Effect.executeWhenCompiled (chunk-MI3SPN44.js?v=e80c8ec5:2194:11)
    at Observer.callback (chunk-2NBTPGO4.js?v=e80c8ec5:71:15)
    at _Observable.notifyObserver (chunk-MDQOIMCJ.js?v=e80c8ec5:282:18)
    at _Observable.add (chunk-MDQOIMCJ.js?v=e80c8ec5:120:18)
    at _Observable.addOnce (chunk-MDQOIMCJ.js?v=e80c8ec5:133:21)
    at Observer.expandRGBDTexture [as callback] (chunk-2NBTPGO4.js?v=e80c8ec5:70:53)
(anonymous)	@	chunk-2NBTPGO4.js?v=e80c8ec5:76
executeWhenCompiled	@	chunk-MI3SPN44.js?v=e80c8ec5:2194
(anonymous)	@	chunk-2NBTPGO4.js?v=e80c8ec5:71
notifyObserver	@	chunk-MDQOIMCJ.js?v=e80c8ec5:282
add	@	chunk-MDQOIMCJ.js?v=e80c8ec5:120
addOnce	@	chunk-MDQOIMCJ.js?v=e80c8ec5:133
expandRGBDTexture	@	chunk-2NBTPGO4.js?v=e80c8ec5:70
await in expandRGBDTexture		
notifyObservers	@	chunk-MDQOIMCJ.js?v=e80c8ec5:253
load	@	chunk-OBYKMPMN.js?v=e80c8ec5:340
notifyObservers	@	chunk-MDQOIMCJ.js?v=e80c8ec5:253
_prepareWebGLTextureContinuation	@	chunk-WYYIVNBF.js?v=e80c8ec5:2860
_prepareWebGLTexture	@	chunk-WYYIVNBF.js?v=e80c8ec5:2891
_createTextureBase.gl	@	chunk-WYYIVNBF.js?v=e80c8ec5:2581
onload	@	chunk-MI3SPN44.js?v=e80c8ec5:4629
loadHandler	@	chunk-GB7Y57HO.js?v=e80c8ec5:350

It is hard to follow the error. The Texture is called “data:EnvironmentBRDFTexture0” same as url.
I am also using react-babylonjs.
Somewhere I also read about tree-shaking. But not sure if this is the issue.

Hope someone can help. I dont know why the texture is even created.

ahhh … bug on our side with a regression. the webgl context was lost on unmounting of a react component.

3 Likes