Created attachment 165050 [details] bad-request SUMMARY Using Neon Unstable with Plasma 6.1 dev After set google account and tried to browse gdrive with dolphin, I got 'Bad Request' error and nothing shows up. STEPS TO REPRODUCE 1. Install kio-gdrive kaccounts6-integration kaccounts-providers 2. Set up the google account 3. Tried to browse the gdrive into dolphin give me bad request errors OBSERVED RESULT bad request error EXPECTED RESULT access to gdrive folders and file via dolphin SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 6.0.80 KDE Frameworks Version: 5.249.0 Qt Version: 6.6.1 Kernel Version: 6.7.0-x64v4-xanmod1 (64-bit) Graphics Platform: Wayland Processors: 4 × AMD A12-9720P RADEON R7, 12 COMPUTE CORES 4C+8G Memory: 15.1 GiB of RAM Graphics Processor: AMD Radeon R7 Graphics Manufacturer: Acer Product Name: Aspire A515-41G System Version: V1.09
I can confirm this. Operating System: KDE neon 6.0 KDE Plasma Version: 6.0.2 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 Kernel Version: 6.5.0-26-generic (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i5-10210U CPU @ 1.60GHz Memory: 15,4 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics Manufacturer: LENOVO System Version: ThinkPad E15
I can confirm this. I run Dolphin from console and got this error: ``` org.kde.kgapi: Bad request, Google replied { "error": { "code": 400, "message": "Invalid field selection etag,kind,nextLink,nextPageToken,selfLink,items(,,,,,,,,labels,exportLinks,lastViewedByMeDate,alternateLink,kind)", "errors": [ { "message": "Invalid field selection etag,kind,nextLink,nextPageToken,selfLink,items(,,,,,,,,labels,exportLinks,lastViewedByMeDate,alternateLink,kind)", "domain": "global", "reason": "invalidParameter", "location": "fields", "locationType": "parameter" } ] } } ```
I can confirm the bug Operating System: KDE neon 6.0 KDE Plasma Version: 6.0.4 KDE Frameworks Version: 6.1.0 Qt Version: 6.7.0 Kernel Version: 6.5.0-28-lowlatency (64-bit) Graphics Platform: Wayland Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz Memory: 15.4 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics 620 Manufacturer: Dell Inc. Product Name: Inspiron 5579
I can confirm the bug. Operating System: KDE neon 6.0 KDE Plasma Version: 6.1.0 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.0 Kernel Version: 6.5.0-41-generic (64-bit) Graphics Platform: Wayland
Error is also present in the User Edition: KDE Plasma Version 6.1.3 KDE Frameworks Version 6.4.0 QT Version 6.7
If anyone can still reproduce this, please provide the output of: QT_LOGGING_RULES="kf.kio.workers.gdrive=true" dolphin
Created attachment 174015 [details] dolphin kf.kio.workers.gdrive log (In reply to Elvis Angelaccio from comment #6) > If anyone can still reproduce this, please provide the output of: > > QT_LOGGING_RULES="kf.kio.workers.gdrive=true" dolphin Here is the log from last KDE Neon dev ISO - neon-developer-20240729-1603.iso
(In reply to alex from comment #7) > Created attachment 174015 [details] > dolphin kf.kio.workers.gdrive log > > (In reply to Elvis Angelaccio from comment #6) > > If anyone can still reproduce this, please provide the output of: > > > > QT_LOGGING_RULES="kf.kio.workers.gdrive=true" dolphin > > Here is the log from last KDE Neon dev ISO - neon-developer-20240729-1603.iso Thanks! It'd help if you can also share the output of: QT_LOGGING_RULES="kf.kio.workers.gdrive=true;org.kde.kgapi=true" dolphin
(In reply to Elvis Angelaccio from comment #8) > (In reply to alex from comment #7) > > Created attachment 174015 [details] > > dolphin kf.kio.workers.gdrive log > > > > (In reply to Elvis Angelaccio from comment #6) > > > If anyone can still reproduce this, please provide the output of: > > > > > > QT_LOGGING_RULES="kf.kio.workers.gdrive=true" dolphin > > > > Here is the log from last KDE Neon dev ISO - neon-developer-20240729-1603.iso > > Thanks! It'd help if you can also share the output of: > > QT_LOGGING_RULES="kf.kio.workers.gdrive=true;org.kde.kgapi=true" dolphin I have the same problem, so this is the output. kf.kio.core.connection: Socket not connected QLocalSocket::PeerClosedError kf.kio.core: An error occurred during write. The worker terminates now. kf.kio.core: Connection::send() called with connection not inited kf.kio.core: An error occurred during write. The worker terminates now. kf.kio.workers.gdrive: Found google-provided account: "jactor@gmail.com" kf.kio.workers.gdrive: "jactor@gmail.com" supports gdrive! kf.kio.workers.gdrive: Got account credentials for: "jactor@gmail.com" , accessToken: "ya29.a0AcM612z5e4vKdAhQUo-KpE-..." , refreshToken: "1//09OI12aRWzl37CgYIARAAGAkSNw..." kf.kio.workers.gdrive: KIO GDrive ready: version 24.08.1 kf.kio.core.connection: Socket not connected QLocalSocket::PeerClosedError kf.kio.core: An error occurred during write. The worker terminates now. kf.kio.workers.gdrive: Going to list QUrl("gdrive:/") kf.kio.workers.gdrive: fileSystemFreeSpace is not supported for gdrive root url kf.kio.workers.gdrive: stat()ing account root kf.kio.workers.gdrive: stat()ing new-account path kf.kio.core: Connection::send() called with connection not inited kf.kio.core: An error occurred during write. The worker terminates now. kf.kio.workers.gdrive: stat()ing new-account path kf.kio.workers.gdrive: stat()ing new-account path kf.kio.workers.gdrive: stat()ing new-account path kf.kio.workers.gdrive: stat()ing new-account path kf.kio.workers.gdrive: stat()ing account root kf.kio.workers.gdrive: stat()ing account root kf.kio.workers.gdrive: stat()ing account root kf.kio.workers.gdrive: stat()ing account root kf.kio.workers.gdrive: stat()ing new-account path kf.kio.workers.gdrive: stat()ing account root kf.kio.workers.gdrive: stat()ing account root kf.kio.workers.gdrive: Going to list QUrl("gdrive:/jactor@gmail.com") org.kde.kgapi: Queued QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true") org.kde.kgapi: KGAPI2::Drive::AboutFetchJob(0x7ffd431e16a0) Dispatching request to QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true") org.kde.kgapi: Received reply from QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true&fields=kind,canCreateDrives&prettyPrint=false") org.kde.kgapi: Status code: 200 kf.kio.workers.gdrive: Account "jactor@gmail.com" can't create Shared Drives kf.kio.workers.gdrive: Getting root ID for "jactor@gmail.com" kf.kio.workers.gdrive: Running job KGAPI2::Drive::AboutFetchJob(0x7ffd431e16a0) with accessToken "ya29.a0AcM612z5e4vKdAhQUo-KpE-..." org.kde.kgapi: Queued QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true") org.kde.kgapi: KGAPI2::Drive::AboutFetchJob(0x7ffd431e16a0) Dispatching request to QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true") org.kde.kgapi: Received reply from QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true&fields=kind,rootFolderId&prettyPrint=false") org.kde.kgapi: Status code: 200 kf.kio.workers.gdrive: Completed job KGAPI2::Drive::AboutFetchJob(0x7ffd431e16a0) error code: 0 - message: "" kf.kio.workers.gdrive: Running job KGAPI2::Drive::FileFetchJob(0x7ffd431e1940) with accessToken "ya29.a0AcM612z5e4vKdAhQUo-KpE-..." org.kde.kgapi: Queued QUrl("https://www.googleapis.com/drive/v2/files?q=((trashed %3D false) and ('0AIIlefvjVpyjUk9PVA' in parents))&includeItemsFromAllDrives=true&supportsAllDrives=true") org.kde.kgapi: KGAPI2::Drive::FileFetchJob(0x7ffd431e1940) Dispatching request to QUrl("https://www.googleapis.com/drive/v2/files?q=((trashed %3D false) and ('0AIIlefvjVpyjUk9PVA' in parents))&includeItemsFromAllDrives=true&supportsAllDrives=true") org.kde.kgapi: Received reply from QUrl("https://www.googleapis.com/drive/v2/files?q=((trashed %3D false) and ('0AIIlefvjVpyjUk9PVA' in parents))&includeItemsFromAllDrives=true&supportsAllDrives=true&fields=etag,kind,nextLink,nextPageToken,selfLink,items(,,,,,,,,labels,exportLinks,lastViewedByMeDate,alternateLink,kind)&prettyPrint=false") org.kde.kgapi: Status code: 400 org.kde.kgapi: Bad request, Google replied ' "{\n \"error\": {\n \"code\": 400,\n \"message\": \"Invalid field selection etag,kind,nextLink,nextPageToken,selfLink,items(,,,,,,,,labels,exportLinks,lastViewedByMeDate,alternateLink,kind)\",\n \"errors\": [\n {\n \"message\": \"Invalid field selection etag,kind,nextLink,nextPageToken,selfLink,items(,,,,,,,,labels,exportLinks,lastViewedByMeDate,alternateLink,kind)\",\n \"domain\": \"global\",\n \"reason\": \"invalidParameter\",\n \"location\": \"fields\",\n \"locationType\": \"parameter\"\n }\n ]\n }\n}\n" ' kf.kio.workers.gdrive: Completed job KGAPI2::Drive::FileFetchJob(0x7ffd431e1940) error code: 400 - message: "Richiesta errata." kf.kio.core: UDSEntry for '.' not found, creating a default one. Please fix the "kioworker" KIO worker. kf.kio.workers.gdrive: stat()ing account root kf.kio.workers.gdrive: Getting fileSystemFreeSpace for QUrl("gdrive:/jactor@gmail.com") kf.kio.workers.gdrive: Running job KGAPI2::Drive::AboutFetchJob(0x7ffd431e1970) with accessToken "ya29.a0AcM612z5e4vKdAhQUo-KpE-..." org.kde.kgapi: Queued QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true") org.kde.kgapi: KGAPI2::Drive::AboutFetchJob(0x7ffd431e1970) Dispatching request to QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true") org.kde.kgapi: Received reply from QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true&fields=kind,quotaBytesTotal,quotaBytesUsedAggregate&prettyPrint=false") org.kde.kgapi: Status code: 200 kf.kio.workers.gdrive: Completed job KGAPI2::Drive::AboutFetchJob(0x7ffd431e1970) error code: 0 - message: "" kf.kio.workers.gdrive: stat()ing account root kf.kio.workers.gdrive: stat()ing account root kf.kio.workers.gdrive: stat()ing account root kf.kio.workers.gdrive: Getting fileSystemFreeSpace for QUrl("gdrive:/jactor@gmail.com") kf.kio.workers.gdrive: Running job KGAPI2::Drive::AboutFetchJob(0x7ffd431e1970) with accessToken "ya29.a0AcM612z5e4vKdAhQUo-KpE-..." org.kde.kgapi: Queued QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true") org.kde.kgapi: KGAPI2::Drive::AboutFetchJob(0x7ffd431e1970) Dispatching request to QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true") org.kde.kgapi: Received reply from QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true&fields=kind,quotaBytesTotal,quotaBytesUsedAggregate&prettyPrint=false") org.kde.kgapi: Status code: 200 kf.kio.workers.gdrive: Completed job KGAPI2::Drive::AboutFetchJob(0x7ffd431e1970) error code: 0 - message: "" kf.kio.workers.gdrive: Getting fileSystemFreeSpace for QUrl("gdrive:/jactor@gmail.com") kf.kio.workers.gdrive: Running job KGAPI2::Drive::AboutFetchJob(0x7ffd431e1970) with accessToken "ya29.a0AcM612z5e4vKdAhQUo-KpE-..." org.kde.kgapi: Queued QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true") org.kde.kgapi: KGAPI2::Drive::AboutFetchJob(0x7ffd431e1970) Dispatching request to QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true") org.kde.kgapi: Received reply from QUrl("https://www.googleapis.com/drive/v2/about?includeSubscribed=true&fields=kind,quotaBytesTotal,quotaBytesUsedAggregate&prettyPrint=false") org.kde.kgapi: Status code: 200 kf.kio.workers.gdrive: Completed job KGAPI2::Drive::AboutFetchJob(0x7ffd431e1970) error code: 0 - message: ""
A possibly relevant merge request was started @ https://invent.kde.org/pim/libkgapi/-/merge_requests/49
(In reply to Bug Janitor Service from comment #10) > A possibly relevant merge request was started @ > https://invent.kde.org/pim/libkgapi/-/merge_requests/49 Ok, I *think* I know what's going on and I have pushed a tentative fix in this MR. Unfortunately I'm not able not reproduce the bug, so I'd appreciate if someone in this report can test this patch in libkgapi.
> Unfortunately I'm not able not reproduce the bug, so I'd appreciate if > someone in this report can test this patch in libkgapi. I just compile package kpim6-libkgapi-24.08.1-0zneon+22.04+jammy+release+build2 with your patch and now my google drive works without errors! Thanks for the work!
(In reply to alex from comment #12) > > Unfortunately I'm not able not reproduce the bug, so I'd appreciate if > > someone in this report can test this patch in libkgapi. > > I just compile package > kpim6-libkgapi-24.08.1-0zneon+22.04+jammy+release+build2 with your patch and > now my google drive works without errors! > Thanks for the work! That's great, thanks for testing!
*** Bug 493887 has been marked as a duplicate of this bug. ***
Git commit b57168b19e9ea0573a721e30c4abea2d390239d2 by Elvis Angelaccio. Committed on 26/09/2024 at 20:47. Pushed by elvisangelaccio into branch 'release/24.08'. FileFetchJob: fix static initialization order problem BasicFields/AccessFields/SharingFields are declared as static members, but in their definitions they require other static members. This is a classic static initialization order problem. In particular it may happen that when BasicFields is defined, the Id/Title/.../Permissions members have _not_ been defined yet: BasicFields then becomes a QStringList containing 8 empty QStrings. This is likely what causes bug #480063 where the following broken query string is sent to google (by a FileFetchJob triggered by kio-gdrive): fields=etag,kind,nextLink,nextPageToken,selfLink,items(,,,,,,,,labels,exportLinks,lastViewedByMeDate,alternateLink,kind) This commit fixes the problem by duplicating the string literals in the definitions of BasicFields/AccessFields/SharingFields. This commit is only meant for the relase/24.08 branch, so that we don't need to do breaking changes in the API. On master we should do the right thing, which is to break the API and change BasicFields/AccessFields/SharingFields from static class members to static class methods. FIXED-IN: 24.08.2 M +22 -22 src/drive/filefetchjob.cpp https://invent.kde.org/pim/libkgapi/-/commit/b57168b19e9ea0573a721e30c4abea2d390239d2
A possibly relevant merge request was started @ https://invent.kde.org/pim/libkgapi/-/merge_requests/50
*** Bug 494339 has been marked as a duplicate of this bug. ***
Git commit 6305de6caf85e1ed33448820b0a3dc14b61a60b0 by Elvis Angelaccio. Committed on 03/10/2024 at 17:06. Pushed by elvisangelaccio into branch 'master'. FileFetchJob: fix static initialization order problem BasicFields/AccessFields/SharingFields are declared as static members, but in their definitions they require other static members. This is a classic static initialization order problem. In particular it may happen that when BasicFields is defined, the Id/Title/.../Permissions members have _not_ been defined yet: BasicFields then becomes a QStringList containing 8 empty QStrings. This is what caused bug #480063 where the following broken query string was sent to google (by a FileFetchJob triggered by kio-gdrive): fields=etag,kind,nextLink,nextPageToken,selfLink,items(,,,,,,,,labels,exportLinks,lastViewedByMeDate,alternateLink,kind) The bug has been fixed with commit b57168b19e in the 24.08 release branch. This commit adapts the fix for the master branch, where we can drop the duplicated strings and just break the public API: this should be a problem because kio-gdrive should be the only-user and has the same release schedule as libkgapi. M +34 -22 src/drive/filefetchjob.cpp M +12 -3 src/drive/filefetchjob.h https://invent.kde.org/pim/libkgapi/-/commit/6305de6caf85e1ed33448820b0a3dc14b61a60b0
A possibly relevant merge request was started @ https://invent.kde.org/network/kio-gdrive/-/merge_requests/39
Git commit b3efca3d7484b374bb718cc75326956e62ab1ade by Elvis Angelaccio. Committed on 09/10/2024 at 21:32. Pushed by elvisangelaccio into branch 'master'. Adapt to libkgapi breaking change See commit 6305de6caf85e1ed33448820b0a3dc14b61a60b0 in libkgapi. M +2 -1 CMakeLists.txt M +1 -1 src/kio_gdrive.cpp https://invent.kde.org/network/kio-gdrive/-/commit/b3efca3d7484b374bb718cc75326956e62ab1ade
*** Bug 490089 has been marked as a duplicate of this bug. ***
*** Bug 486238 has been marked as a duplicate of this bug. ***
*** Bug 411425 has been marked as a duplicate of this bug. ***
*** Bug 481637 has been marked as a duplicate of this bug. ***
*** Bug 487478 has been marked as a duplicate of this bug. ***
*** Bug 486384 has been marked as a duplicate of this bug. ***
*** Bug 481887 has been marked as a duplicate of this bug. ***
*** Bug 479470 has been marked as a duplicate of this bug. ***