I have attempted to upgrade a production environment fusion auth instance from version 1.6.x to 1.9.1 unfortunately after the database migration we are presented with error 500 page when browsing to the app.
I have taken a look at the logs which shows the following error:
Sep 24, 2019 4:16:03.726 PM ERROR com.inversoft.scheduler.LogAndRetainFailureHandler - The scheduled service [class io.fusionauth.api.service.cache.ThemeCacheLoader] failed but will be re-run.
java.lang.IllegalStateException: Invalid message value for theme at io.fusionauth.api.domain.CachedTheme.loadProperties(CachedTheme.java:40) at io.fusionauth.api.domain.CachedTheme.(CachedTheme.java:24) at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1321) at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) at io.fusionauth.api.service.cache.ThemeCacheLoader.load(ThemeCacheLoader.java:34) at io.fusionauth.api.service.cache.ThemeCacheLoader.run(ThemeCacheLoader.java:40) at com.inversoft.scheduler.InjectableRunnable.run(InjectableRunnable.java:37) at com.inversoft.scheduler.DefaultScheduler.(DefaultScheduler.java:74)
(I have truncated the log output on purpose, if needed I can edit question with full log)
I have also looked in the themes table which contains two entries. The first has a very large JSON object string literal in the data column the second just has any empty JSON object i.e. "{}".
I am reaching out as hopefully this is a simple data issue? Does anyone have any ideas? Thanks in advance
This is a known issue that can occur when you have a custom theme defined prior to upgrade.
A fix will be available shortly in version 1.9.2, a work around is described in the above linked GitHub issue and provided below as well. https://github.com/FusionAuth/fusionauth-issues/issues/306
Workaround:
defaultMessages
such as empty string