Closing desktop app

I was trying to close the desktop app and this is what happened:

An error occurred. Please use Tools > Check Database to see if that fixes the problem.
If problems persist, please report the problem on our support site. Please copy and paste the information below into your report.
Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.15.7
Flags: frz=True ao=False sv=?
Add-ons, last update check: 2020-11-12 15:30:56

Caught exception:
Traceback (most recent call last):
File “aqt/”, line 1016, in closeEvent
File “aqt/”, line 462, in unloadProfileAndExit
File “aqt/”, line 439, in unloadProfile
File “aqt/”, line 548, in unloadCollection
File “aqt/”, line 812, in closeAllWindows
File “aqt/”, line 118, in closeAll
File “aqt/”, line 546, in before_sync
File “aqt/”, line 924, in maybe_auto_sync_on_open_close
File “aqt/”, line 542, in after_sync
File “aqt/”, line 129, in show_diag_until_finished
File “aqt/”, line 539, in after_media_sync
File “aqt/”, line 435, in callback
File “aqt/”, line 444, in _unloadProfile
File “aqt/”, line 270, in save
File “anki/”, line 47, in execute
sqlite3.OperationalError: attempt to write a readonly database

Please follow the steps on