Skip to content

Conversation

@camillerev
Copy link
Contributor

I met the issue when the user has no LoginHistory in AuthSession (when we use the feature "login as portal user" for exemple).
We have the following error:

17:09:37.111 (8860793657)|FATAL_ERROR|System.NullPointerException: Attempt to de-reference a null object

Class.LogEntryEventBuilder.setQueriedAuthSessionDetails: line 983, column 1
Class.LogEntryEventBuilder.getLogEntryEvent: line 831, column 1
Class.Logger.saveLog: line 3722, column 1
Class.Logger.saveLog: line 3681, column 1

This issue occurs since the changes done in getAuthSessionProxies on this PR #813

To solve the issue I added safe navigation operators on LoginHistory from authSession records.

@camillerev camillerev requested a review from jongpie as a code owner January 20, 2025 17:37
@jongpie jongpie added Type: Bug Something isn't working Layer: Log Management Items related to the custom objects & Logger Console app Layer: Logger Engine Items related to the core logging engine Salesforce Feature: Experience Cloud Items related to using Logger within Experience Cloud labels Feb 3, 2025
…rsonatedBy__c was not set when AuthSession data is queried async
@jongpie
Copy link
Owner

jongpie commented Feb 3, 2025

Hi @camillerev thanks so much for submitting this PR, and apologies for my delay in reviewing it! Your changes look great - I'm going to push a few more commits to add some related tests, and to fix another issue I noticed when reviewing this. I'm hoping to merge this today or tomorrow.

@jongpie jongpie merged commit c8e2502 into jongpie:main Feb 5, 2025
1 check passed
@jongpie
Copy link
Owner

jongpie commented Feb 5, 2025

@camillerev I've published this as release v4.15.5 🎉 Thanks again for your work on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Layer: Log Management Items related to the custom objects & Logger Console app 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 this pull request may close these issues.

Getting a NullPointerException when running flow from Experience Cloud

2 participants