WikiTransformationProject / wikitraccs-releases

Releases, issues and discussions for WikiTraccs from the Wiki Transformation Project
https://www.wikitransformationproject.com
10 stars 1 forks source link

Cannot continue further because of error with connection to Confluence #111

Closed monikastevanovska closed 9 months ago

monikastevanovska commented 9 months ago

Can you please help in resolution on this connectivity error:

connection error
heinrich-ulbricht commented 9 months ago

@monikastevanovska WikiTraccs needs two things to show the browser for Confluence login:

  1. the Chrome browser
  2. the Chrome web driver (for automating Chrome)

The easiest way to get started is to install the latest Chrome version. This covers point 1. WikiTraccs looks up the installation path in the registry.

WikiTraccs normally takes care of point 2.

It looks like something failed here. Chrome being found in Program Files (x86) instead of Program Files also looks off in my eyes.

The log file has all the details about what is going on. Would you please have a look in the WikiTraccs.GUI/logs folder? There is one WikiTraccs.GUI log file per app start (e.g. 2024-02-22_09-22-25-WikiTraccs.GUI20240222.log).

For me the log file contains this, after having selected the Test Confluence Connection button: image :point_down:

[ 09:22:39 DBG] [https://localhost] Trying to log into Confluence, Config: {"TenantId":"https://localhost","AuthenticationType":"cookie","HumanReadableId":"https://localhost","AuthCookieNames":[""],"PageIdIncludeList":[],"PageIdForLiveUpdate":null,"ReprocessContentWithErrors":false,"SpaceTransfer":{"Enabled":true,"SpaceIncludeList":[],"ForceReprocess":null,"Operations":["retrievecontents"],"$type":"SpaceTransfer"},"PermissionTransfer":{"Enabled":false,"SpaceIncludeList":[],"ForceReprocess":null,"$type":"PermissionTransfer"},"BaseUrl":"https://localhost/","AuthUrl":"","$type":"SourceTenantConfiguration"} | WikiTraccs.Shared.Automation.ConfluenceSessionIdRetriever
[ 09:22:39 DBG] Trying to determine Chrome version to get the right driver for | WikiTraccs.Shared.Misc.ChromeDriverInstaller
[ 09:22:39 DBG] Reading Chrome binary path from registry path 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe' | WikiTraccs.Shared.Misc.ChromeDriverInstaller
[ 09:22:39 DBG] Chrome binary path 'C:\Program Files\Google\Chrome\Application\chrome.exe' found in registry and verified | WikiTraccs.Shared.Misc.ChromeDriverInstaller
[ 09:22:39 DBG] Chrome version: 122.0.6261.57 | WikiTraccs.Shared.Misc.ChromeDriverInstaller
[ 09:22:39 DBG] Got Chrome major version 122 from chrome version number 122.0.6261 | WikiTraccs.Shared.Misc.ChromeDriverInstaller
[ 09:22:39 DBG] Determining web driver version from 3-number Chrome version '122.0.6261' from URL https://googlechromelabs.github.io/chrome-for-testing/latest-patch-versions-per-build-with-downloads.json... | WikiTraccs.Shared.Misc.ChromeDriverInstaller
[ 09:22:39 DBG] Got web driver version: 122.0.6261.57 | WikiTraccs.Shared.Misc.ChromeDriverInstaller
[ 09:22:39 DBG] Target directory for web driver: C:\Users\heu\Documents\00_Portable | WikiTraccs.Shared.Misc.ChromeDriverInstaller

I'd like to check how this looks on your machine. Could you send this log file to support @ wikitransformationproject.com? But you can also look yourself.

What I'd like to know is how the Chrome binary path and Chrome version look, and if there are any errors relating to the Chrome driver download in there.

Thanks!

monikastevanovska commented 9 months ago

Hello Heinrich,

Thank you very much for the feedback, much appreciated! I want to inform you that this morning I managed to get successful connection following the procedure described here, but please see the message below:

image

After I close the window I get successful connection

image

but the issue is when I run "Update space inventory and WikiTraccs site, I get the below error and I am not able to continue further:

image
heinrich-ulbricht commented 9 months ago

@monikastevanovska Glad you found the workaround.

This time I need the log, because usually that contains all information to pinpoint the issue (support @ wikitransformationproject.com). Does Confluence use a single sign on solution or Kerberos to authenticate the user?

monikastevanovska commented 9 months ago

Please note that in my last attempt I used: https://wiki.unece.org in the confluence base URL, which is an open confluence space and does not require authentication. I have sent the log file to support@wikitransformationproject.com

heinrich-ulbricht commented 9 months ago

@monikastevanovska Thank you so much, also for figuring out the spaces in the email address have to go (I should make that explicit).

The issue here is an oversight on my part with regard to the documentation! When using the cookies.txt workaround for Chrome issues in combination with anonymous authentication - the AjsRemoteUserKey value has to be exactly 00000000000000000000000000000001. I'll add that to the docs.

I could reproduce the issue you have and setting the AjsRemoteUserKey in appsettings.json to above value solved it and spaces could be retrieved.

monikastevanovska commented 9 months ago

Hello Heinrich,

Thanks a lot for the support! I want to inform you that I successfully managed to connect and perform a migration.

heinrich-ulbricht commented 9 months ago

@monikastevanovska Thanks for the feedback, I'm glad to hear that!

Just as heads-up: authenticating with personal access tokens is coming soon, so for authenticated access with Confluence > 7.9 the whole Chrome/cookie thing won't be mandatory anymore.