Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console warning on startup: Could not encrypt access token Error: No token: not attempting encryption #26589

Closed
richvdh opened this issue Nov 15, 2023 · 2 comments · Fixed by matrix-org/matrix-react-sdk#11899
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect

Comments

@richvdh
Copy link
Member

richvdh commented Nov 15, 2023

Steps to reproduce

  1. Open console
  2. Reload element
  3. Observe warning:
 Could not encrypt access token Error: No token: not attempting encryption
    persistTokenInStorage tokens.ts:131
    persistRefreshTokenInStorage tokens.ts:195
    persistCredentials Lifecycle.ts:899
    doSetLoggedIn Lifecycle.ts:863
    restoreFromLocalStorage Lifecycle.ts:623
    loadSession Lifecycle.ts:204
    loadSession MatrixChat.tsx:544

Outcome

What did you expect?

Less warnings

What happened instead?

warnings

Operating system

No response

Browser information

No response

URL for webapp

No response

Application version

No response

Homeserver

No response

Will you send logs?

Yes

@richvdh
Copy link
Member Author

richvdh commented Nov 15, 2023

This is logged on every application load. It sounds very bad (my access token is being stored in the clear?) but actually I think it's harmless, and possibly because my homeserver is stock Synapse and hence not issuing refresh tokens.

It would be good to clarify the warning and maybe downgrade it (or remove it altogether).

@richvdh
Copy link
Member Author

richvdh commented Nov 15, 2023

I think this was introduced by matrix-org/matrix-react-sdk#11249

richvdh added a commit to matrix-org/matrix-react-sdk that referenced this issue Nov 17, 2023
@florianduros florianduros added S-Minor Impairs non-critical functionality or suitable workarounds exist O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Nov 20, 2023
github-merge-queue bot pushed a commit to matrix-org/matrix-react-sdk that referenced this issue Nov 21, 2023
* Fix "not attempting encryption" warning

Fixes element-hq/element-web#26589

* Update src/utils/tokens/tokens.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants