Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed to execute the [groovy] macro" error which prevents users to login with the application #19

Closed
ilieandriuta opened this issue Mar 18, 2022 · 2 comments · Fixed by #21

Comments

@ilieandriuta
Copy link

Environment: Windows 11 Pro 64bit, Firefox 98, using an instance of XWiki 14.1 on Tomcat 9.0.59/ PostgreSQL 14 (tested also on XWiki 13.10.3 Jetty/HSQLDB) on Java 11 and Java 17 from Oracle with Office365 Integration (Pro) 1.9.1

STEPS TO REPRODUCE

  1. Go to Administer Wiki > Other > Office365 and fill the Tenant name, Client ID and Secret Key corresponding to the application from Azure Portal
  2. Edit a page in wiki/source mode
  3. Insert {{office365 /}} macro
  4. Click Save & View

EXPECTED RESULTS

The user is asked to login to Microsoft365.

ACTUAL RESULTS

An error is displayed only in the browser and the user cannot login:

Failed to execute the [groovy] macro. Cause: [class java.lang.String cannot be cast to class java.util.List (java.lang.String and java.util.List are in module java.base of loader 'bootstrap')]. Click on this message for details.

Full stacktrace is available here: https://up1.xwikisas.com/#78RiUGVIB0NujZBTyPy8Cg

The issue reproduced also on XWiki 13.10.3. However, I've tested with Office365 Integration (Pro) 1.8 and the issue could not be reproduced.

OfficeOAuth_Error

@AndreeaChi
Copy link

AndreeaChi commented May 4, 2022

I have reproduced the issue on XWiki Cloud 12.10.6 as well with Office365 Integration 1.9.1 with slightly different steps:

  1. Install the Office365 Integration 1.9.1 version
  2. Register the app according to the installation documentation on the Azure portal
  3. Add the credentials on the XWiki Adminstration > Other > Office365
  4. Go to the page https://testandreealicenses.cloud.xwiki.com/xwiki/bin/view/Office365/OAuth and you should see a permissions message and agree with it:
    image

Result right after:
image

@AndreeaChi
Copy link

AndreeaChi commented May 4, 2022

The issue also reproduces when on a new browser session, I log into the wiki, then I access the https://testandreealicenses.cloud.xwiki.com/xwiki/bin/view/Office365/OAuth .

It asks to sign in with the Microsoft account, I add the credentials of my Microsoft account and right after the result is the same error.

@trrenty trrenty mentioned this issue Jun 7, 2022
@trrenty trrenty linked a pull request Jun 7, 2022 that will close this issue
@trrenty trrenty self-assigned this Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants