Cannot read properties of null (reading '__ngt_renderer__')
RyannGalea opened this issue · 10 comments
Hi Chau,
I'm on:
"angular-three": "^2.0.0-beta.289",
"angular-three-postprocessing": "^2.0.0-beta.289",
"angular-three-soba": "^2.0.0-beta.289",
Having an issue where it seems once *args data is updated the template tries to load the new information I get:

This all worked on earlier versions I believe but my cache may have been messed up for a few updates. Any idea to what would cause this?
Edit:
I actually have no idea when this happens but I cant even get the scene to load now. very confusing.]
What is your Angular version?
I have been able to re-create the issue in a small repo, it adds a geometry then after a 5 second delay tries to change the geometry and sends an error to the console.
This is due to a recent change in Angular core (angular/angular#57203). beta.302 has been released. Can you give that a try?
Working again as normal it seems!
Thanks Chau this one had me very confused!
@RyannGalea Glad that it works again for you now. The problem is Angular core does not provide the parent anymore when calling removeChild (this gets invoked when a piece of the template goes into unmount phase, aka when a structural directive changes). Angular Three Renderer previously relied on having both parent and oldChild there to function. Recent fix removes this reliant.
Angular 18.2.0 brings back this issue slightly different.
Also can someone explain why once I update my packages and found this issue, no matter how I try and revert back to the working version I still have the issue? It's baffling to me, I cleared cache, removed ng cli and reverted it back but still have the issue now where I had it working before.
Stackblitz updated:
https://stackblitz.com/~/github.com/RyannGalea/a3-repo
I'll take a quick look. I haven't tested against 18.2 yet.
@RyannGalea beta.308 is released. This was actually my fault, I forgot to call a signal 🫠
Working again :)

