The instructions assume (possibly erroneously) that you have only one row in the keyring table.
What is the result of:
nrow(key_list("test"))
?
If you have multiple rows in the keyring table, then you may have to extract the correct value using something like:
keyring::key_list("test") %>%
dplyr::filter(service == "db_read") %>%
.$username
I will also say that I'm using Windows, and that I don't get this error message. Can you please provide your session info?
sessioninfo::session_info()
(It might be that some of your packages are out of date.)