There are 3 updates, 3 comments.
 
 
OpenId Connect / cid:jira-generated-image-avatar-db0341af-df60-4231-8636-cb64e594978d OIDC-298 Closed

Impossible to upgrade the authenticator or the provider to 2.21.0+

 
View issue   ยท   Add comment
 

3 updates

 
cid:jira-generated-image-avatar-df8c2317-cb1b-4833-afb5-c6341ff2e0eb Changes by Thomas Mortagne on 17/Jun/26 15:02
 
Description: Tested with local demo Jetty/HSQLDB 17.10.9. And also observed same situation on old version 16.10.17.
h3. Observation

When upgrading, installing, uninstalling, or downgrading {{OpenID Connect Authenticator}} from an older version such as 2.20.3 (this is the version I originally used), the operation can fail because some {{OIDC/OAuth2}} classes cannot be resolved from the current classloader.

This prevents components such as {{{}OIDCConsentStore{}}}, {{{}DefaultOAuth2TokenStore{}}}, or {{OIDCUserManager}} from being initialized properly. As a result, the extension upgrade/downgrade may fail with dependency initialization errors, for example:
{noformat}
Failed to get fields for class \[org.xwiki.contrib.oidc.consent.internal.store.OIDCConsentStore\] because the class \[org/xwiki/contrib/oidc/OIDCException\] couldn't be found in the ClassLoader.
Failed to get fields for class \[org.xwiki.contrib.oidc.internal.DefaultOAuth2TokenStore\] because the class \[org/xwiki/contrib/oidc/OAuth2Exception\] couldn't be found in the ClassLoader.
Extension \[org.xwiki.contrib.oidc:oidc-authenticator/2.20.3\] cannot be initialized because its dependency (\[org.xwiki.contrib.oidc:oauth2-store-2.20.3\]) could not.{noformat}
A restart of XWiki usually resolves the issue, which suggests that the problem is related to stale extension classloaders or classes/components from the previous OIDC version still being cached during the extension operation.

However, in some cases, even restarting does not fully recover the installation state, making it impossible to install the target version. Adding note, this last situation with install I only observed randomly on 17.10.9. on version 16.10.17 install or uninstall operation doesn't have it.
h3. Steps
# Install OpenID Connect Authenticator 2.20.3.
# Verify that the installation completes successfully and that the extension is listed as installed.
# Select the latest available stable version 2.23.0.
# Click Upgrade and confirm the extension upgrade.
# Wait for the extension manager to complete the job.

h4. Expected Result
* The extension and all its dependencies are upgraded successfully.
* No class loading errors are reported.

h4. Actual Result
* The upgrade operation fails.
* The logs contain class loading errors (shared above)


h3. Workaround

The workaround is to uninstall OIDC API, and then install the authenticator.
Resolution: Solved By
Status: In Progress Closed
 
 

3 comments

 
cid:jira-generated-image-avatar-df8c2317-cb1b-4833-afb5-c6341ff2e0eb Thomas Mortagne on 17/Jun/26 15:02
 

Fixed in XWiki 17.10.10, 18.4.2 and 18.5.0-rc-1.

 
cid:jira-generated-image-avatar-df8c2317-cb1b-4833-afb5-c6341ff2e0eb Thomas Mortagne on 17/Jun/26 15:05
 
Fixed The limitation has been resolved in XWiki 17.10.10, 18.4.2 and 18.5.0-rc-1.
 
cid:jira-generated-image-avatar-df8c2317-cb1b-4833-afb5-c6341ff2e0eb Thomas Mortagne on 17/Jun/26 15:05
 
The limitation has been resolved in XWiki 17.10.10, 18.4.2 and 18.5.0-rc-1.

For anything older, follow the indicated workaround.