Skip to content

[Bug] Firebot will not launch if the notification database is invalid #2405

@dennisrijsdijk

Description

@dennisrijsdijk

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If the notifications DB is invalid, the app will not start.

Expected Behavior

The app should start as normal, and (re)generate the DB as needed

Steps To Reproduce

  1. Close Firebot if open
  2. Corrupt your notifications.json (eg. fully empty the file)
  3. Open Firebot

Version

5.61

What operating system are you using Firebot on?

Windows 11

Relevant log output

[2024-02-16 20:11:09.0218] - debug: No notification dbVersion detected.
[2024-02-16 20:11:09.0218] - debug: Error on when ready step 
{
  message: "Can't Load Database",
  stack: "DatabaseError: Can't Load Database\n" +
    '    at JsonDB.load (/home/dennisr/Programming/Firebot/node_modules/node-json-db/dist/JsonDB.js:325:27)\n' +
    '    at JsonDB.retrieveData (/home/dennisr/Programming/Firebot/node_modules/node-json-db/dist/JsonDB.js:55:14)\n' +
    '    at JsonDB.getParentData (/home/dennisr/Programming/Firebot/node_modules/node-json-db/dist/JsonDB.js:121:53)\n' +
    '    at JsonDB.push (/home/dennisr/Programming/Firebot/node_modules/node-json-db/dist/JsonDB.js:254:29)\n' +
    '    at NotificationManager.loadNotificationCache (/home/dennisr/Programming/Firebot/build/backend/notifications/notification-manager.js:63:38)\n' +
    '    at NotificationManager.loadAllNotifications (/home/dennisr/Programming/Firebot/build/backend/notifications/notification-manager.js:133:14)\n' +
    '    at exports.whenReady (/home/dennisr/Programming/Firebot/build/backend/app-management/electron/events/when-ready.js:186:31)',
  inner: {},
  id: 1,
  name: 'DatabaseError'
}

Contact Details (Optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions