Bug 491898 - kwallet-query silent failure on writing new entry
Summary: kwallet-query silent failure on writing new entry
Status: REPORTED
Alias: None
Product: frameworks-kwallet
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.115.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Valentin Rusu
URL:
Keywords:
: 501233 509397 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-08-19 11:20 UTC by Andrey
Modified: 2025-09-12 08:03 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey 2024-08-19 11:20:31 UTC
SUMMARY

When attempting to write a new entry using the kwallet-query CLI, the command silently ignores the write operation and returns with a 0 exit code, indicating success despite the operation not being performed as expected. The issue lies within the QueryDriver::writeValue() function in querydriver.cpp, where the kind variable is assigned KWallet::Wallet::Unknown, causing the function to prematurely call quit(). 

STEPS TO REPRODUCE
Attempt to write a new entry in KWallet using the kwallet-query CLI.
echo "test" | kwallet-query kdewallet -w mypassword

OBSERVED RESULT
The command returns with a 0 exit code without actually writing the entry.  Check that entry does not exist via KWalletManager or via cli:
kwallet-query kdewallet -l

EXPECTED RESULT
kwallet-query command should correctly write the new entry with the provided data, and the CLI should reflect success or failure based on the actual outcome.

SOFTWARE/OS VERSIONS
OS Debian 13 (trixie)
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13

ADDITIONAL INFORMATION
Workaround:
1. Create a new entry manually via the GUI in KWalletManager.
2. Use kwallet-query to write the password or data into the existing entry created via the GUI.
Comment 1 Tristan Miller 2025-09-06 19:54:21 UTC
*** Bug 501233 has been marked as a duplicate of this bug. ***
Comment 2 michaelk83 2025-09-12 08:03:46 UTC
*** Bug 509397 has been marked as a duplicate of this bug. ***