Page MenuHomePhabricator

Improve error logging for olm session creation failure
ClosedPublic

Authored by marcin on Jul 25 2023, 3:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 25, 8:27 PM
Unknown Object (File)
Wed, Dec 25, 8:27 PM
Unknown Object (File)
Wed, Dec 25, 8:27 PM
Unknown Object (File)
Wed, Dec 25, 8:27 PM
Unknown Object (File)
Wed, Dec 25, 8:27 PM
Unknown Object (File)
Wed, Dec 25, 8:26 PM
Unknown Object (File)
Wed, Dec 25, 8:19 PM
Unknown Object (File)
Sat, Dec 7, 11:58 AM
Subscribers
None

Details

Summary

This differential is created in response to the following linear issue: https://linear.app/comm/issue/ENG-4451/improve-logging-for-olm-session-creation-failure. Olm session creation failure is a seriious concern and current error handling does
not provide meaningful information for debugging purposes.

Test Plan

Delete olm sessions table from the database. Try to log in from mobile app. Ensure that meaningful logs are printed to the console.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jul 25 2023, 4:33 AM
Harbormaster failed remote builds in B21177: Diff 29010!
tomek added inline comments.
keyserver/src/creators/olm-session-creator.js
27 ↗(On Diff #29010)

We probably shouldn't log cookieID

This revision is now accepted and ready to land.Jul 25 2023, 6:17 AM
keyserver/src/creators/olm-session-creator.js
27 ↗(On Diff #29010)

Knowing the cookieID for which the failure occurred might be helpful for debugging purposes. Does it create security issues?

keyserver/src/creators/olm-session-creator.js
27 ↗(On Diff #29010)
  1. Can you please keep all lines to a max of 80 chars?
  2. I think it's okay to log the cookie ID on the keyserver. Presumably the keyserver owner has access to this information anyways via MariaDB
  3. I wonder if relying on Node to render the exception might be better than getMessageForException, eg. console.warn('message', e)
ashoat added inline comments.
keyserver/src/creators/olm-session-creator.js
27 ↗(On Diff #29057)

Missing a space at the end

Add missing space. Rebase before landing