OH4.0.0-SNAPSHOT and M1 Google TTS Exception

Hi All

I have upgraded to OH 4.0.0-SNAPSHOT (Build #3355).

I realsised by Googel TTS was no longer working so have been going through all the threads I would find with no success.

I have now recreated everything following the two articles:

When I click on save I get the following in the openhab.log:

2023-03-08 11:00:58.606 [ERROR] [.googletts.internal.GoogleTTSService] - bundle org.openhab.voice.googletts:4.0.0.202303070416 (257)[org.openhab.voice.googletts.internal.GoogleTTSService(335)] : The updateConfig method has thrown an exception
com.google.gson.JsonIOException: Failed making field 'java.time.LocalDateTime#date' accessible; either change its visibility or write a custom TypeAdapter for its declaring type
	at com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:23) ~[?:?]
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:203) ~[?:?]
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:112) ~[?:?]
	at com.google.gson.Gson.getAdapter(Gson.java:531) ~[?:?]
	at com.google.gson.Gson.toJson(Gson.java:778) ~[?:?]
	at com.google.gson.Gson.toJson(Gson.java:756) ~[?:?]
	at com.google.gson.Gson.toJson(Gson.java:711) ~[?:?]
	at com.google.gson.Gson.toJson(Gson.java:691) ~[?:?]
	at org.openhab.core.auth.oauth2client.internal.OAuthStoreHandlerImpl$StorageFacade.put(OAuthStoreHandlerImpl.java:366) ~[?:?]
	at org.openhab.core.auth.oauth2client.internal.OAuthStoreHandlerImpl.savePersistedParams(OAuthStoreHandlerImpl.java:164) ~[?:?]
	at org.openhab.core.auth.oauth2client.internal.OAuthClientServiceImpl.createInstance(OAuthClientServiceImpl.java:131) ~[?:?]
	at org.openhab.core.auth.oauth2client.internal.OAuthFactoryImpl.createOAuthClientService(OAuthFactoryImpl.java:83) ~[?:?]
	at org.openhab.voice.googletts.internal.GoogleCloudAPI.setConfig(GoogleCloudAPI.java:150) ~[?:?]
	at org.openhab.voice.googletts.internal.GoogleTTSService.updateConfig(GoogleTTSService.java:240) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:245) ~[?:?]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[?:?]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:687) ~[?:?]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:531) ~[?:?]
	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317) ~[?:?]
	at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307) ~[?:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod(SingleComponentManager.java:856) ~[?:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.modify(SingleComponentManager.java:810) ~[?:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:725) ~[?:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:686) ~[?:?]
	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:440) ~[?:?]
	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:347) ~[?:?]
	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$2.configurationEvent(RegionConfigurationSupport.java:115) ~[?:?]
	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1723) ~[?:?]
	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1664) ~[?:?]
	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122) ~[?:?]
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:84) ~[?:?]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.time.LocalDate java.time.LocalDateTime.date accessible: module java.base does not "opens java.time" to unnamed module @11b27d13
	at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[?:?]
	at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[?:?]
	at java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) ~[?:?]
	at java.lang.reflect.Field.setAccessible(Field.java:172) ~[?:?]
	at com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:20) ~[?:?]
	... 35 more

2023-03-08 11:01:52.915 [WARN ] [ce.googletts.internal.GoogleCloudAPI] - Error initializing Google Cloud TTS service: An unexpected IOException occurred: Exception in oauth communication, grant type authorization_code

I am not sure if this is an OH4 issue or something else as I had it working previously on OH3.4.2

Any advise would be appreciated.

Mark

EDIT: I have just installed a backup copy of my 3.4.2 install and have managed to activate googletts.

13:47:12.389 [WARN ] [e.googletts.internal.GoogleTTSService] - Audio format OGG_OPUS is not yet supported.
13:47:12.759 [WARN ] [e.googletts.internal.GoogleTTSService] - Audio format OGG_OPUS is not yet supported.

Tested on a CLEAN SNAPSHOT 3357 and worked on that. Will try an upgrade on my install and see what happens.

Aftre upgrading to SNAPSHOT 3357 I now get:

09:05:46.228 [WARN ] [ice.googletts.internal.GoogleCloudAPI] - Error initializing Google Cloud TTS service: Error fetching access token. Invalid authcode? Please generate a new one.

From testing appears to be specific to my install after upgrading to 4.0.0-SNAPSHOT as both a clean 4.0.0 and 3.42 work.

No idea how to fix though?

Try to remove the file containing the tokens, you have probably an outdated one.
I have not exactly the filename but it is one file in folder userdata/jsondb.

Hi

I renamed StorageHandler.For.OAuthClientService.json

Did not help and the file is not recreated - I assume because teh save fails as the token is not recognized as valid?

I tried enabling TRACE as follows after moving to OH 4.0.0.M1:

log:set TRACE org.openhab.voice.googletts
log:set TRACE org.openhab.core.auth.oauth2client

I get the following:

11:22:33.943 [DEBUG] [e.googletts.internal.GoogleTTSService] - bundle org.openhab.voice.googletts:4.0.0.M1 (257)[org.openhab.voice.googletts.internal.GoogleTTSService(336)] : ConfigurableComponentHolder configuration updated for pid org.openhab.voice.googletts with change count 61
11:22:33.944 [DEBUG] [e.googletts.internal.GoogleTTSService] - bundle org.openhab.voice.googletts:4.0.0.M1 (257)[org.openhab.voice.googletts.internal.GoogleTTSService(336)] : Querying state active
11:22:33.945 [DEBUG] [e.googletts.internal.GoogleTTSService] - bundle org.openhab.voice.googletts:4.0.0.M1 (257)[org.openhab.voice.googletts.internal.GoogleTTSService(336)] : Querying state active
11:22:33.945 [DEBUG] [e.googletts.internal.GoogleTTSService] - bundle org.openhab.voice.googletts:4.0.0.M1 (257)[org.openhab.voice.googletts.internal.GoogleTTSService(336)] : invoking modified: updateConfig: parameters [org.apache.felix.scr.impl.helper.ReadOnlyDictionary]
11:22:33.946 [DEBUG] [e.googletts.internal.GoogleTTSService] - Updating configuration
11:22:33.946 [TRACE] [e.googletts.internal.GoogleTTSService] - New configuration: GoogleTTSConfig{pitch=0.0, speakingRate=1.0, volumeGainDb=0.0, purgeCache=true}
11:22:33.947 [DEBUG] [ice.googletts.internal.GoogleCloudAPI] - Trying to get access and refresh tokens.
11:22:34.122 [DEBUG] [.oauth2client.internal.OAuthConnector] - Oauth request parameter grant_type, value authorization_code
11:22:34.123 [DEBUG] [.oauth2client.internal.OAuthConnector] - Oauth request parameter code, value <REDACT>
11:22:34.124 [DEBUG] [.oauth2client.internal.OAuthConnector] - Oauth request parameter redirect_uri, value https://www.google.com
11:22:34.124 [DEBUG] [.oauth2client.internal.OAuthConnector] - Setting authentication for clientId <REDACT> Using basic auth false
11:22:35.564 [DEBUG] [ice.googletts.internal.GoogleCloudAPI] - Error fetching access token: Exception in oauth communication, grant type authorization_code
org.openhab.core.auth.client.oauth2.OAuthException: Exception in oauth communication, grant type authorization_code
        at org.openhab.core.auth.oauth2client.internal.OAuthConnector.doRequest(OAuthConnector.java:331) ~[?:?]
        at org.openhab.core.auth.oauth2client.internal.OAuthConnector.grantTypeAuthorizationCode(OAuthConnector.java:220) ~[?:?]
        at org.openhab.core.auth.oauth2client.internal.OAuthClientServiceImpl.getAccessTokenResponseByAuthorizationCode(OAuthClientServiceImpl.java:211) ~[?:?]
        at org.openhab.voice.googletts.internal.GoogleCloudAPI.getAccessToken(GoogleCloudAPI.java:192) ~[?:?]
        at org.openhab.voice.googletts.internal.GoogleCloudAPI.setConfig(GoogleCloudAPI.java:154) ~[?:?]
        at org.openhab.voice.googletts.internal.GoogleTTSService.updateConfig(GoogleTTSService.java:240) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:245) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:687) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:531) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307) ~[?:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod(SingleComponentManager.java:856) ~[?:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.modify(SingleComponentManager.java:810) ~[?:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:725) ~[?:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:686) ~[?:?]
        at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:440) ~[?:?]
        at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:347) ~[?:?]
        at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$2.configurationEvent(RegionConfigurationSupport.java:115) ~[?:?]
        at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1723) ~[?:?]
        at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1664) ~[?:?]
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122) ~[?:?]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:84) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: com.google.gson.JsonIOException: Failed making field 'java.time.Instant#seconds' accessible; either change its visibility or write a custom TypeAdapter for its declaring type
        at com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:23) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:203) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:112) ~[?:?]
        at com.google.gson.Gson.getAdapter(Gson.java:531) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:137) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:211) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:112) ~[?:?]
        at com.google.gson.Gson.getAdapter(Gson.java:531) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:1057) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:1016) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:959) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:927) ~[?:?]
        at org.openhab.core.auth.oauth2client.internal.OAuthConnector.doRequest(OAuthConnector.java:308) ~[?:?]
        ... 27 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final long java.time.Instant.seconds accessible: module java.base does not "opens java.time" to unnamed module @72d10ef7
        at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[?:?]
        at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[?:?]
        at java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) ~[?:?]
        at java.lang.reflect.Field.setAccessible(Field.java:172) ~[?:?]
        at com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:20) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:203) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:112) ~[?:?]
        at com.google.gson.Gson.getAdapter(Gson.java:531) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:137) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:211) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:112) ~[?:?]
        at com.google.gson.Gson.getAdapter(Gson.java:531) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:1057) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:1016) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:959) ~[?:?]
        at com.google.gson.Gson.fromJson(Gson.java:927) ~[?:?]
        at org.openhab.core.auth.oauth2client.internal.OAuthConnector.doRequest(OAuthConnector.java:308) ~[?:?]
        ... 27 more
11:22:35.574 [WARN ] [ice.googletts.internal.GoogleCloudAPI] - Error initializing Google Cloud TTS service: Error fetching access token. Invalid authcode? Please generate a new one.
11:22:35.575 [DEBUG] [ice.googletts.internal.GoogleCloudAPI] - Cache purged.
11:22:35.576 [DEBUG] [e.googletts.internal.GoogleTTSService] - bundle org.openhab.voice.googletts:4.0.0.M1 (257)[org.openhab.voice.googletts.internal.GoogleTTSService(336)] : invoked modified: updateConfig
11:22:35.577 [DEBUG] [e.googletts.internal.GoogleTTSService] - bundle org.openhab.voice.googletts:4.0.0.M1 (257)[org.openhab.voice.googletts.internal.GoogleTTSService(336)] : No change in target property for dependency $000: currently registered: true
11:22:35.577 [DEBUG] [e.googletts.internal.GoogleTTSService] - bundle org.openhab.voice.googletts:4.0.0.M1 (257)[org.openhab.voice.googletts.internal.GoogleTTSService(336)] : No change in target property for dependency $001: currently registered: true
11:22:35.578 [DEBUG] [e.googletts.internal.GoogleTTSService] - bundle org.openhab.voice.googletts:4.0.0.M1 (257)[org.openhab.voice.googletts.internal.GoogleTTSService(336)] : No change in target property for dependency osgi.ds.satisfying.condition: currently registered: true
11:22:35.578 [DEBUG] [e.googletts.internal.GoogleTTSService] - bundle org.openhab.voice.googletts:4.0.0.M1 (257)[org.openhab.voice.googletts.internal.GoogleTTSService(336)] : Querying state active
11:22:35.580 [DEBUG] [e.googletts.internal.GoogleTTSService] - bundle org.openhab.voice.googletts:4.0.0.M1 (257)[org.openhab.voice.googletts.internal.GoogleTTSService(336)] : ImmediateComponentHolder Finished configuring the dependency managers for component for pid org.openhab.voice.googletts
11:22:35.581 [DEBUG] [e.googletts.internal.GoogleTTSService] - bundle org.openhab.voice.googletts:4.0.0.M1 (257)[org.openhab.voice.googletts.internal.GoogleTTSService(336)] : ImmediateComponentHolder Will not enable component for pid org.openhab.voice.googletts: holder enabled state: true, metadata enabled: true

Would appreciate any advise/help

Please open an issue in Git with all these very useful information.

Maybe Google Cloud changes something in its oAuth2 responses ?

@laursen : could it be in link with one your changes ?

Can you tell us if it is working better in 3.4.x ? In other words, is it an issue specific to OH4 ?
PS: the 2 PRs I am pointing are present in 3.4.x,

Hi

I have tested and it was working fine in and up to 3.4.2
I have also tested on a clean 4.0.0-SNAPSHOT with only the Googler TTS binding/addon and it also worked.

It appears this is something in my setup after upgrading to 4.0.0-SNAPSHOT and now 4.0.0.M1

Should I open in openhab-core as [oauth]?

So the 2 PRs I am pointing are not the source of your issue.
And it looks like it is working well in standard conditions.

So, in this case, as you mentioned, this might be more something specific to your setup.
I am not sure a Git issue will help as it will be probably not reproducible.

Maybe @laursen has a btter idea ?

1 Like

Thank You.
Also tried to re-install and now get:

12:07:48.166 [ERROR] [e.googlestt.internal.GoogleSTTService] - bundle org.openhab.voice.googlestt:4.0.0.M1 (258)[org.openhab.voice.googlestt.internal.GoogleSTTService(338)] : The modified method has thrown an exception
com.google.gson.JsonIOException: Failed making field 'java.time.LocalDateTime#date' accessible; either change its visibility or write a custom TypeAdapter for its declaring type
        at com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:23) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:203) ~[?:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:112) ~[?:?]
        at com.google.gson.Gson.getAdapter(Gson.java:531) ~[?:?]
        at com.google.gson.Gson.toJson(Gson.java:778) ~[?:?]
        at com.google.gson.Gson.toJson(Gson.java:756) ~[?:?]
        at com.google.gson.Gson.toJson(Gson.java:711) ~[?:?]
        at com.google.gson.Gson.toJson(Gson.java:691) ~[?:?]
        at org.openhab.core.auth.oauth2client.internal.OAuthStoreHandlerImpl$StorageFacade.put(OAuthStoreHandlerImpl.java:366) ~[?:?]
        at org.openhab.core.auth.oauth2client.internal.OAuthStoreHandlerImpl.savePersistedParams(OAuthStoreHandlerImpl.java:164) ~[?:?]
        at org.openhab.core.auth.oauth2client.internal.OAuthClientServiceImpl.createInstance(OAuthClientServiceImpl.java:131) ~[?:?]
        at org.openhab.core.auth.oauth2client.internal.OAuthFactoryImpl.createOAuthClientService(OAuthFactoryImpl.java:83) ~[?:?]
        at org.openhab.voice.googlestt.internal.GoogleSTTService.updateConfig(GoogleSTTService.java:163) ~[?:?]
        at org.openhab.voice.googlestt.internal.GoogleSTTService.modified(GoogleSTTService.java:117) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:245) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:687) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:531) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307) ~[?:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod(SingleComponentManager.java:856) ~[?:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.modify(SingleComponentManager.java:810) ~[?:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:725) ~[?:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:686) ~[?:?]
        at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:440) ~[?:?]
        at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:347) ~[?:?]
        at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$2.configurationEvent(RegionConfigurationSupport.java:115) ~[?:?]
        at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1723) ~[?:?]
        at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1664) ~[?:?]
        at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122) ~[?:?]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:84) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.time.LocalDate java.time.LocalDateTime.date accessible: module java.base does not "opens java.time" to unnamed module @72d10ef7
        at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[?:?]
        at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[?:?]
        at java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) ~[?:?]
        at java.lang.reflect.Field.setAccessible(Field.java:172) ~[?:?]
        at com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:20) ~[?:?]
        ... 35 more

It looks to me as a problem with date parsing in class OAuthStoreHandlerImpl.

I think we need @laursen comment as I have the feeling it is in the region he changed.
I would say that Google is returning a JSON that we are not able to parse ?

So please open your issue in Git openHAB core as it is probably a problem with the openHAB oAuth2 client implementation.

1 Like

Yes, please create an issue, and I’ll have a look. I can already see some parts that should also be refactored to Instant.

1 Like

Thank you both. Logged as:

Thanks. I have it reproduced in a unit test now, so I should be able to provide a fix today.

2 Likes

I was going to prepare instructions how to replace the bundle with a new JAR, but then ran into this (with 4.0M1):

openhab> bundle:list
START LEVEL 100 , List Threshold: 50
Error executing command: java.lang.NoSuchMethodError: 'java.lang.Object org.osgi.framework.ServiceReference.adapt(java.lang.Class)'

If you know how to replace a core JAR, you can try this version:

Unfortunately I cannot verify at the moment.

1 Like

Thanks for the quick fix. I do not know how to test a core jar. But will see what i can find. Otherwise wait for merge i guess.
Thanks

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.