jamessimone / apex-rollup

Fast, configurable, elastically scaling custom rollup solution. Apex Invocable action, one-liner Apex trigger/CMDT-driven logic, and scheduled Apex-ready.
MIT License
210 stars 30 forks source link

Full recalculate rollup job on a grandparent rollup fails with dereference a null object error #517

Closed baobao917 closed 10 months ago

baobao917 commented 11 months ago

Hi @jamessimone - I feel bad finding all of these bug issues. Pls let me know if there's anything I can do that will make this easier.

Bug issue - When performing a full recalculation from the Recalculate Rollup tab on a grandparent rollup, I get an "Attempt to de-reference a null object" error. image

Video - https://www.loom.com/share/87568a92690d41058250b363b175a4ca?sid=0287b89a-ab62-4b9c-a579-8def36cde32a

I did install nebula logger plugin and have log/log entries available. However unsure exactly what to send you and in what form. Please let me know what you would like for me to send/do.

jamessimone commented 11 months ago

Don't feel bad. Grandparent rollups are an advanced part of the application and while I continue to add code coverage there, it's not always easy to know there's a problem until somebody reports a bug. If you have the log where that error occurred - or the combined messages from the log entries for that log from Nebula Logger - I should be able to get what I need. I'll also review the video to see if there's anything I spot there

jamessimone commented 11 months ago

As far as where to look in Nebula Logger - you can try using the "Open Viewer" button at the top of each log. That displays all of the log entry text. Many people use the application dropdown menu in Nebula Logger to navigate to the Log Entries tab; you can use the standard List View functionality of searching there to search log messages.

It's probably also helpful to note that if you keep a Developer Console window open while running the full recalc, you'll also see the standard log files being generated in the Logs pane; I really should just need one log with the error message you're seeing to diagnose this issue further.

baobao917 commented 11 months ago

Hi @jamessimone - I downloaded the Log File from both of the logs created. Pls let me know if you need anything else.

Log-000000_00D7e00000JhepIEAR.log Log-000001_00D7e00000JhepIEAR.log

jamessimone commented 11 months ago

@baobao917 I'm afraid these logs - which I'm guessing are the result of the Nebula viewer panel?- don't contain the actual exception info. Are you able to regenerate with your Developer Console open? You should be able to see the "Attempt to dereference a null object" message on all of the log files that get generated with that error; I should only need to see one to get insight into what's causing this.

baobao917 commented 11 months ago

Hi @jamessimone A lot of logs got generated so I'm just sending a sample of the ones with the dereference error. Pls let me know if you need anything else. image

apex-07L7e00001RGHIXEA5.log apex-07L7e00001RGHKSEA5.log apex-07L7e00001RGHIYEA5.log apex-07L7e00001RGHKaEAP.log

jamessimone commented 11 months ago

OK thank you! Pretty sure I see where the problem is now - I am going to try to generate a beta package for you to test out in the sandbox that should help with this.

jamessimone commented 11 months ago

Here's a beta package that can be installed in the sandbox which should fix this issue.

baobao917 commented 11 months ago

@jamessimone That appears to have fixed the issue! Should I wait for a final package version?

jamessimone commented 11 months ago

It could be that this package version will be the "final" one for 1.5.89, but it's still a beta at the moment (which means that it can only be installed in sandboxes). I'm going to take a look through some of the other issues you've raised and, time permitting, will be creating additional package version(s) for this release. Once 1.5.89 has been released, the stable version to be installed in prod will be available via the links in the README!