Skip to content

System.UserInfo.getSessionId() throws System.UnexpectedException #761

@krishnandusarkarprax

Description

@krishnandusarkarprax

Package Edition of Nebula Logger

Unlocked Package

Package Version of Nebula Logger

4.13.17

New Bug Summary

Package Edition of Nebula Logger
Unlocked Package

Package Version of Nebula Logger
4.13.17

New Bug Summary
When a user logs in through a server-to-server connected app with the setting "Issue JSON Web Token (JWT)-based access tokens for named users" enabled tries to use a Logger.xxx method, a Salesforce System Error is thrown.

Debugging reveals that the issue occurs when System.UserInfo.getSessionId() is called. Even with a try/catch block around this call, the code doesn't reach the catch block; instead, the error is thrown directly.

The only workaround is to disable the "Issue JSON Web Token (JWT)-based access tokens for named users" setting.

Defect #598 was reported a few months ago, leading to the resolution of adding a try/catch block around this code. However, despite the latest Salesforce Release (Winter '25) and Nebula Logger (version 4.13.17), the issue persists.

Screenshot 2024-09-04 at 10 30 33 PM Screenshot 2024-09-04 at 10 31 05 PM

Metadata

Metadata

Assignees

Labels

Layer: Logger EngineItems related to the core logging engineType: BugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions