Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging from auth provider class in Experience Cloud throws an error #224

Closed
jongpie opened this issue Oct 11, 2021 Discussed in #209 · 0 comments · Fixed by #218
Closed

Logging from auth provider class in Experience Cloud throws an error #224

jongpie opened this issue Oct 11, 2021 Discussed in #209 · 0 comments · Fixed by #218
Assignees
Labels
Layer: Logger Engine Items related to the core logging engine Salesforce Feature: Experience Cloud Items related to using Logger within Experience Cloud Type: Bug Something isn't working

Comments

@jongpie
Copy link
Owner

jongpie commented Oct 11, 2021

Discussed in #209

Originally posted by taits September 20, 2021
Wondering if logging from Apex executed with an Experience Cloud guest user should work? Any specific permissions need to be added to the Sites Guest user Profile?

Seeing a Salesforce System Error on line 2656 of Logger.apxc
String transactionId = System.Request.getCurrent().getRequestId();

The issue seems to be caused by trying to access System.Request.getCurrent() - it throws a gack error, and it doesn't seem like the exception can get caught/easily handled.

System.UnexpectedException: Salesforce System Error: 1673516240-331008 (-334555042) (-334555042)

image

@jongpie jongpie added Type: Bug Something isn't working Salesforce Feature: Experience Cloud Items related to using Logger within Experience Cloud labels Oct 11, 2021
@jongpie jongpie self-assigned this Oct 11, 2021
@jongpie jongpie added the Layer: Logger Engine Items related to the core logging engine label Oct 11, 2021
jongpie added a commit that referenced this issue Oct 11, 2021
…ack that can occur when calling System.Request.getCurrent()
jongpie added a commit that referenced this issue Oct 14, 2021
* Added new field Log__c.Scenario__c, set via Logger.setScenario(String), Flow, and logger lwc

* Added new field Log__c.LoggerVersionNumber__c set by Logger.CURRENT_VERSION_NUMBER, added new script to auto-sync version number between files that reference it

* Standardized the internal calls to System.debug() to include a 'Logger - ' prefix in the messages

* Added 2 new LoggerSettings__c fields - one to disable calls to System.debug() on the backend, and one to disable calls to console.log() on the frontend (for lightning components only - not Flow)

* Fixed #223 by adding an extra filter to LogBatchPurger's Log__c query to include/delete any logs with 0 log entries (regardless of the retention date)

* Fixed #224 by adding a check for UserInfo.getSessionId() to avoid a gack that can occur when calling System.Request.getCurrent()

* Added missing 'default save method' field to settings list view, shortened some settings field labels

* Enabled more ESLint rules + fixed some JS issues

* Enabled more PMD rules + fixed some Apex issues

* Automated creating package version and updating sfdx-project.json + README.md

* Added pwsh script to verify that Apex docs have been generated & committed

* Cleaned up scripts directory

* Added check in pipeline to ensure that the current package version number hasn't already been released

* Added missing step to install package version into demo sandbox

* New buttons for package install links & 'view milestone' in README

* Created new package version

* Updated CONTRIBUTING.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layer: Logger Engine Items related to the core logging engine Salesforce Feature: Experience Cloud Items related to using Logger within Experience Cloud Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant