Hi everyone,
I am encountering a blocking issue with the Analytics Adoption Metadata managed package (Salesforce Labs) and wanted to report this bug to see if a workaround exists or if a patch is planned.
The Error:
The asynchronous process fails with an exception indicating that ApexPages.addMessage() is being invoked from a non-Visualforce context.
(Optional: Paste the exact stack trace line here if you have it, e.g., System.HandledException: ApexPages.addMessage can only be called from a Visualforce page context).Technical Breakdown:
- Root Cause: The exception is thrown by the WaveMetaDataQueueable job, which executes asynchronously.
- The Conflict: The code is attempting to use ApexPages.addMessage() to handle an error or status. While this works perfectly during a synchronous Visualforce page request, it is completely detached from a page context when running in a Queueable Apex process.
- The Result: Salesforce throws a runtime exception because there is no UI page to attach the message to.
The Roadblock:
Because this is part of the managed
Analytics Adoption Metadata package, the underlying source code of WaveMetaDataQueueable is hidden. I cannot manually wrap this in a conditional context check (like checking if ApexPages.currentPage() is null) or remove the line myself.Has anyone else run into this with the latest release, or does anyone know if the Salesforce Labs team is actively tracking a patch for this queueable class? Any advice or temporary workarounds would be greatly appreciated!
#Salesforce Labs #Adoption App #CRM Analytics #Apexexceptionemails