Intermittent “Parallel shader compilation” hang and postProcessManager null error in Babylon.js with React

I’m working on a React project using Babylon.js v8.2.0, and sometimes (but not always), the app gets stuck on parallel shader compilation. The scene doesn’t load correctly, and I see this warning repeatedly in the console:

Babylon.js v8.2.0 - WebGL2 - Parallel shader compilation

Eventually, the app throws the following error:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'postProcessManager')
    at chunk-BOWJQCSN.js:76:33
    at _Effect.executeWhenCompiled ...

I’ve noticed that refreshing the page once or twice usually fixes it, and the app runs fine afterward.

I also tried it in production, but I got the same error.

Unfortunately without a repro, we cannot help

1 Like