Skip to content

NPE in OAuthClientServiceImpl #5055

@cweitkamp

Description

@cweitkamp

I faced an NPE while installing a new automation addon.

2025-10-03 18:52:48.349 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: java.lang.NullPointerException: Cannot invoke "org.openhab.core.auth.oauth2client.internal.OAuthStoreHandler.saveAccessTokenResponse(String, org.openhab.core.auth.client.oauth2.AccessTokenResponse)" because "this.storeHandler" is null
	at org.openhab.core.auth.oauth2client.internal.OAuthClientServiceImpl.getAccessTokenByResourceOwnerPasswordCredentials(OAuthClientServiceImpl.java:264) ~[?:?]
	at org.openhab.binding.worxlandroid.internal.handler.WorxLandroidBridgeHandler.initiateConnection(WorxLandroidBridgeHandler.java:99) ~[?:?]
	at org.openhab.binding.worxlandroid.internal.handler.WorxLandroidBridgeHandler.lambda$0(WorxLandroidBridgeHandler.java:93) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:?]
	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
	at java.lang.Thread.run(Unknown Source) [?:?]

The annotation seems to be a problem:

because the variable storeHandler is set to null during close process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn unexpected problem or unintended behavior of the Core

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions