xwikisas / application-googleapps

Google Apps Integration
0 stars 5 forks source link

Uninstalling GoogleApps gives many missing programming rights errors in the console #17

Closed ane-gabriela closed 2 years ago

ane-gabriela commented 5 years ago

Steps to reproduce:

  1. On 8.4 and/or 10.8.3 have the app installed - in this case the licence was expired
  2. As Admin uninstall the app
  3. Observe the information from the Console
  4. Close the wiki
  5. Open and access the wiki again
  6. Observe the information from the Console

Expected results: The app in uninstalled.

Actual results: The app is uninstalled but many programming rights errors appear in the Console. Also, in Administration > Other, googleapps remain with "googleapps.config.heading". Each time the wiki is closed and open/acceded again the errors appear in the console.

Environment: Windows 10, XWiki 8.4 and 10.8.3 Standard with Chrome 73 and Edge 18

ConsoleAccesing8.4AfterUninstall.txt

ConsoleAccesing10.8.3AfterUninstall.txt

Accesing10 8 3AfterUninstallingGoogleIntPRO

8 4

UninstallingGoogleIntPRO

ilieandriuta commented 2 years ago

I got these errors also when installing the application (Google Apps Pro 2.5.1 on XWiki 13.10.2, PostgreSQL 14, Tomcat 9.0.56, Docker).

polx commented 2 years ago

Well, isn't it "simply" because the configurations in xwiki.cfg are still there? Uninstalling includes undoing the installation steps.

mflorea commented 2 years ago

@ilieandriuta can you please be more precise: at which step of the documented installation process are you getting the errors? And which errors are you referring to: the one in the server logs about xwiki:GoogleApps:AuthService missing programming rights or the one about the administration section or both?

As Admin uninstall the app

@ane-gabriela did you undo all the documented installation steps? Also, were all checkboxes checked when the Extension Manager asked you to confirm the deletion of the Google Apps pages?

Also, in Administration > Other, googleapps remain with "googleapps.config.heading".

In your screenshot you show the content of the section but the menu entry is not visible. Is the Google Apps menu entry still present after uninstalling the application with the Extension Manager, even after reloading the page? Even after restarting the wiki?

I just tested with a clean XWiki 13.10.2 by installing and uninstalling the Google Apps using just the Extension Manager (no license generated and no configuration change) and I didn't see any error in the logs and the administration menu disappeared after uninstall.

AndreeaChi commented 2 years ago

I did not reproduce any issues at install or uninstall.

I did the following steps:

  1. Followed the documentation here in terms of the required configuration on the Google Console side and the XWiki side (the lines to add in the xwiki.cfg file of the local Jetty 13.10.2)
  2. Started the local Jetty 13.10.2 on Chrome
  3. Installed the Google Apps Integration 2.5.1 and added a trial license.
  4. Added the client ID, secret on the Google Apps configuration page and the domain set in the project.
  5. Logged in successfully with a Google account on both Chrome incognito and FIrefox
  6. Then, I went back on the Google browser where I was still logged in with Admin, on the wiki administration, Extensions.
  7. Searched for Google Apps Integration and Uninstalled it. Made sure to select all pages shown image
  8. Uninstall was complete, no related logs in the Console.
polx commented 2 years ago

@AndreeaChi : you need to restart now.

AndreeaChi commented 2 years ago

I was about to write that now, that the next step done was to Install again the app and in the console I noticed: image I did not restart the server before installing the app again.

On the XWiki side, the app looks installed: image The app is functional, the login with a Google account is possible. I uninstalled the app again, checked the console and saw the message about programming rights: image

I restarted the server, did not login yet with the XWiki Admin account and in the console I see those programming rights mentions: image

I'm not even sure now that it's because of the install or uninstall of the application. Perhaps it's due to the lines added in the xwiki.cfg. Checking if the message still appears after removing those lines.

polx commented 2 years ago

This is because of the line in xwiki.cfg

On 17. Jan 2022, at 16:06, Andreea Chirica @.***> wrote:

 I was about to write that now, that the next step done was to Install again the app and in the console I noticed:

I did not restart the server before installing the app again.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.

AndreeaChi commented 2 years ago

I confirm as well that it's because of adding the Google Authentication lines in the xwiki.cfg file described at this step in the documentation:

Activate the Google Authentication In order to activate the Groovy Authentication, you need to update the following settings in the xwiki.cfg file (webapps > xwiki > WEB-INF) and restart the wiki:

xwiki.authentication.authclass=com.xpn.xwiki.user.impl.xwiki.GroovyAuthServiceImpl xwiki.authentication.groovy.pagename=xwiki:GoogleApps.AuthService

I did a quick test of adding the lines, restart, removing the lines, restart, and then adding the lines again to see if they reappear, and they did show up again in the console.

Installing or uninstalling the app, without adding the lines in the xwiki.cfg file would not bring those messages in the console.

mflorea commented 2 years ago

Closing as invalid because the issue doesn't reproduce if you undo all the installation steps.

ilieandriuta commented 2 years ago

I was referring to errors from the server logs about xwiki:GoogleApps:AuthService missing programming rights, but indeed, it seems they are related to the lines that need to be added in xwiki.cfg. I've re-tested on XWiki 13.10.2 and if these lines are added in xwiki.cfg after the application is installed and then (in reverse) if they are removed before the application is uninstalled, no errors are displayed in console.