function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Salesforce system error when executing test Auth.SessionManagement.generateVerificationUrl


I am trying to invoke the Auth.SessionManagement.generateVerificationUrl(Auth.VerificationPolicy.HIGH_ASSURANCE, 'Custom Register', ApexPages.currentPage().getUrl())
from the test class and it fails with the error:

System.UnexpectedException: Salesforce System Error: 1978609353-24635 (-1912857534) (-1912857534)
Class.Auth.SessionManagement.generateVerificationUrl: line 54,

Calling this method from the test class fails But, executing the same code through the DEV console anonymous execution works fine! 


 Don;t know if this helps but the only thing I can offer os this link to a KB article and note what the article says concenring Error codes. :