mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-24 00:53:23 -05:00
[GH-ISSUE #6912] bw cli 2026.2.0 login Error - TypeError: Cannot read properties of null #15354
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Jehoshwa on GitHub (Mar 8, 2026).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/6912
Originally assigned to: @BlackDex on GitHub.
Prerequisites
Vaultwarden Support String
Your environment (Generated via diagnostics page)
Config & Details (Generated via diagnostics page)
Show Config & Details
Environment settings which are overridden: ADMIN_TOKEN, IP_HEADER
Config:
Vaultwarden Build Version
1.35.3
Deployment method
Official Container Image
Custom deployment method
services:
vwarden01:
image: vaultwarden/server:latest
container_name: vw01
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /srv/vw01/data:/data
ports:
- 127.0.0.1:7011:80
restart: unless-stopped
environment:
- IP_HEADER=CF-Connecting-IP
- LOG_FILE=data/vw.log
- LOG_LEVEL=info
- EXTENDED_LOGGING=false
Reverse Proxy
caddy2
Host/Server Operating System
Linux
Operating System Version
Debian 13
Clients
CLI
Client Version
2026.2.0
Steps To Reproduce
root@myserver# export BW_SERVER=https://xxxxxxxxxxx
root@myserver# export BW_CLIENTID=user.xxxxxxxx-xxxx-xxxx-xxxx.xxxxxxxxxxxx
root@myserver# export BW_CLIENTSECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
root@myserver# bw --version
2026.2.0
root@myserver# bw login --apikey
TypeError: Cannot read properties of null (reading 'toWrappedAccountCryptographicState')
root@myserver# bw status
{"serverUrl":"https://xxxxxxxxxxx","lastSync":null,"userEmail":"xxx@xxx","userId":"xxxxxxxxxxxxxx","status":"locked"}
root@myserver# bw unlock
? Master password: [input is hidden]
root@myserver# bw status
{"serverUrl":"https://xxxxxxxxxxx","lastSync":null,"userEmail":"xxx@xxx","userId":"xxxxxxxxxxxxxx","status":"locked"}
Expected Result
Expect after login can unlock succesfully.
Actual Result
Shows logged in, but unlock not work.
I found from my other server there is a old version cli, copy it to the current server, then everything is ok.
On another server which run bw cli 2026.1
tar -czf bwcli.2026.1.tar.gz -C /usr/local/lib/node_modules @bitwarden
recover the 2026.2
tar -xzf bwcli.2026.1.tar.gz" -C /usr/local/lib/node_modules/
Logs
Screenshots or Videos
No response
Additional Context
No response
@Guru-25 commented on GitHub (Mar 8, 2026):
I too got this error
TypeError: Cannot read properties of null (reading 'toWrappedAccountCryptographicState')@xuanyepan commented on GitHub (Mar 8, 2026):
I encountered the same error when using Edge browser, but there is no such problem when using Firefox.
@SenpaiSimon commented on GitHub (Mar 8, 2026):
Having the same issue, this only happens when logging in through bw login --apikey and having set both needed env vars beforehand. When logging in using bw login and no additional arguments it all works after entering the prompts manually. Sadly this killed my backup export routines atm.
@trinvh commented on GitHub (Mar 9, 2026):
Same issue. I got to setup my new mac and install new Edge which encountering the same issue on Edge
@trinvh commented on GitHub (Mar 9, 2026):
For who is encountering the same issue like me with Chrome/Edge extension. Use previous version
2026.1.1works for me.Attached zip file is the unpacked extension I downloaded from crx4chrome, you can delete the store-version of the extension and enable developer mode to load this unpacked extension. Hope it helps
nngceckbapebfimnlniiiahkandclblb-2026.1.1-Crx4Chrome.com.zip
@BlackDex commented on GitHub (Mar 9, 2026):
I have confirmed the issue, and also able to fix it for the CLI.
I'm not able to reproduce this with the Browser Extensions, for those people i would suggest to be sure to have the latest Vaultwarden Server installed.
@vitich commented on GitHub (Mar 9, 2026):
Firefox.
SSO login enabled - no problems with SSO.
But bw login --apikey returns:
TypeError: Cannot read properties of null (reading 'toWrappedAccountCryptographicState')
It says I'm logged in but after entering the master password it asks for - it doesn't return anything - bw unlock --raw is also empty
Should I try older versions of the console client or browser plugin?
UPDATE:
bw-linux-2024.12.0.zip works!
Everything works through the API