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

[MWS] Delete an active role, crashes the server #8776

Open
pmario opened this issue Nov 21, 2024 · 1 comment
Open

[MWS] Delete an active role, crashes the server #8776

pmario opened this issue Nov 21, 2024 · 1 comment

Comments

@pmario
Copy link
Member

pmario commented Nov 21, 2024

To reproduce:

  • Create a test-user eg: aaa
  • Create a role eg: test-role
  • Assign test-role to aaa
  • Delete role test-role -> Server crashes

Error log

syncer-server-filesystem: Dispatching 'save' task: $:/StoryList
Serving on http://127.0.0.1:8080
(press ctrl-C to exit)

$:/plugins/tiddlywiki/multiwikiserver/store/sql-engine.js:87
        return statement.run(params);
                         ^
SqliteError: FOREIGN KEY constraint failed
    at SqlEngine.runStatement ($:/plugins/tiddlywiki/multiwikiserver/store/sql-engine.js:87:19)
    at SqlTiddlerDatabase.deleteRole ($:/plugins/tiddlywiki/multiwikiserver/store/sql-tiddler-database.js:1150:14)
    at exports.handler ($:/plugins/tiddlywiki/multiwikiserver/routes/handlers/delete-role.js:42:22)
    at IncomingMessage.<anonymous> ($:/plugins/tiddlywiki/multiwikiserver/mws-server.js:515:10)
    at IncomingMessage.emit (node:events:518:28)
    at endReadableNT (node:internal/streams/readable:1698:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
  code: 'SQLITE_CONSTRAINT_FOREIGNKEY'
}

Node.js v22.10.0
@pmario
Copy link
Member Author

pmario commented Nov 21, 2024

If the role is not assigned to any user -> Delete works

webplusai added a commit to webplusai/TiddlyWiki5 that referenced this issue Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant