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

TypeError when showing very old activity log entries containing a deleted group #229

Open
jmion2s opened this issue Feb 12, 2025 · 2 comments

Comments

@jmion2s
Copy link

jmion2s commented Feb 12, 2025

What you did

Opened "Activity" on the details of an old password

What happened

Got a blank page and a TypeError in console.

Firefox

Uncaught (in promise) TypeError: e.group is null
    getPermissionAroName moz-extension://2d262a5c-5b5b-4240-a71d-9ac93df34637/webAccessibleResources/js/dist/app.js:2
    renderSharedActivityPermissionChangeItem moz-extension://2d262a5c-5b5b-4240-a71d-9ac93df34637/webAccessibleResources/js/dist/app.js:2
    renderPermissionsUpdatedActivity moz-extension://2d262a5c-5b5b-4240-a71d-9ac93df34637/webAccessibleResources/js/dist/app.js:2
    renderActivity moz-extension://2d262a5c-5b5b-4240-a71d-9ac93df34637/webAccessibleResources/js/dist/app.js:2
    ...

Chrome

app.js:2 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'name')
    at vb.getPermissionAroName (app.js:2:1674076)
    at vb.renderSharedActivityPermissionChangeItem (app.js:2:1677278)
    at vb.renderPermissionsUpdatedActivity (app.js:2:1678648)
    at vb.renderActivity (app.js:2:1679271)
    ...

No server side error is logged.

Affected Version

Server Version: 4.11.0
Client Version: 4.11.0

Additional Information

Some entries with more recent changes show the activity log and only crash if "more" is clicked (multiple times).

I can NOT reproduce this by creating a group, sharing an entry with the group and deleting the group in 4.11. That works as intended.

Our passbold database is 6 years old, we started using Passbolt Pro in late 2018, i believe with 2.5 Thunderstruck.

Wild Guess

Maybe a group deleted a long time ago is present in old activity log entries but lacks a database entry for its name. (note: i did not look in the database, just guessing). The way groups are deleted and what data the activity log rendering assumes is present might have changed over time and the code may not be backwards compatible. It could be specific to our data and its history, maybe a botched migration.

If i can help with additional details, please let me know.

@stripthis
Copy link
Member

Hello @jmion2s typically for this kind of errors that could be an issue with database integrity. You can run a health check and a data check. https://www.passbolt.com/docs/hosting/troubleshooting/logs/ and see if anything comes up. You can try to run a the cleanup command as well see if it can clean your data issue.

@jmion2s
Copy link
Author

jmion2s commented Feb 13, 2025

Thank you for the good advice, however the issue persists

  • Datacheck is all green PASS

  • Healthcheck has only unrelated warnings

    [WARN] The SMTP Settings plugin endpoints are enabled.
    [WARN] Host availability checking is disabled.
    [WARN] Some email notifications are disabled by the administrator.
    [WARN] The endpoints for updating the users directory configurations are enabled.

  • Cleanup fixed some soft-deleted ressources and shows "squeaky clean" on second run

    1 issues fixed in table Comments (soft deleted users)
    6 issues fixed in table Avatars (soft deleted users)
    9 issues fixed in table Passbolt/Folders.FoldersRelations (soft deleted resources)
    16 issues fixed!

Note that neither Groups nor Activities were listed by cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants