SUMMARY digiKam currently hardwires the local port for the O2 WebService layer, for most plugins port 8000. This prevents the services from working when that port is already in use, for instance for the proxy. It is all the more problematic since 8000 is a quite common port. STEPS TO REPRODUCE 1. start digiKam with a local service that already uses port 8000 2. try to import Google Photos OBSERVED RESULT O2::link: Reply server failed to start listening on port 8000 EXPECTED RESULT A functioning import from Google Photos ADDITIONAL INFORMATION I'm reporting this for the Google plugin but I see that most other plugins also use port 8000. A less common port would be a better choice (e.g. 27648, the low 2 bytes of the fourcc 'dkam'). But ideally there should be a configure option (or at least an override via an env.var.) for this port number, at least for those services which don't impose a specific port. Google Photos doesn't seem to care.
A configuration by the user is not possible. We have to deposit the callback address including port number on Google. It is only changeable in our app account to the service. Most services check whether the sent callback address is identical to the deposited in the app account. We can agree on a different address, but that would mean that all previous digiKam version would not work anymore. The future will be that we use a built-in browser for login, so we can get the login token. But on many systems there are still problems with QWebEngine. And QWebKit seems to be evolving, but I would not like to use it for login right now. Maik
Note : remember that Qt5 include now a framework component dedicated to replace the O2 library included in DK core: https://doc.qt.io/qt-5/qtnetworkauth-index.html Gilles Caulier
A proxy normally runs on 8080. The port 8000 should actually be free for most users. Also Qt5 needs a callback address with port number, which we would have to specify. Maik
I replaced the setLocalPort call to use port 8888 before I filed this issue (and after I discovered I could no longer connect). I had to go through the login procedure (handed off to the web browser), but access still works fine after restarting digiKam.
The port is needed only once at the first login. Later, the stored access token from the "digikam_oauthrc" is used. This is valid for some time depending on the service. Maik
Maik, I propose to close this file as intentional. Nothing can be changed due to Google requirement. Gilles
We can and must use the internal browser in the future to receive the token. I have already prepared the code, a complete changeover is not very complex. But for a clean solution, I would have to change the return address in the Google account. At this point, all older digiKam versions could not login again. At the latest when Google no longer allows unencrypted return addresses like Flickr, we have to do it. Otherwise yes, a user cannot change the specified port address, we should close the bug. Maik
(In reply to Maik Qualmann from comment #1) > And QWebKit seems to be evolving, but I > would not like to use it for login right now. It is, and it is much more suitable as an embedded web engine. Login works fine. I wouldn't log in to my bank or utilities accounts with it, but the version used in 5.212.alpha4 isn't so old that I'd fear logging into my google account with it.
Git commit 979c3f318fea3d4b14d525c2d45d10f801beccd9 by Maik Qualmann. Committed on 20/06/2022 at 17:09. Pushed by mqualmann into branch 'master'. port Google Export Tool to QOAuth2AuthorizationCodeFlow Related: bug 440156, bug 435384, bug 415365, bug 396671, bug 419956 FIXED-IN: 8.0.0 M +3 -1 NEWS M +2 -1 core/cmake/macros/MacroDPlugins.cmake M +1 -0 core/cmake/rules/RulesQtFramework.cmake M +2 -1 core/dplugins/generic/webservices/google/CMakeLists.txt M +11 -31 core/dplugins/generic/webservices/google/gdrive/gdtalker.cpp M +35 -63 core/dplugins/generic/webservices/google/gphoto/gptalker.cpp M +77 -83 core/dplugins/generic/webservices/google/gstalkerbase.cpp M +8 -9 core/dplugins/generic/webservices/google/gstalkerbase.h M +44 -1 core/libs/dplugins/webservices/wstoolutils.cpp M +10 -0 core/libs/dplugins/webservices/wstoolutils.h https://invent.kde.org/graphics/digikam/commit/979c3f318fea3d4b14d525c2d45d10f801beccd9