Closing desktop app

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

Error
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/main.py”, line 1016, in closeEvent
File “aqt/main.py”, line 462, in unloadProfileAndExit
File “aqt/main.py”, line 439, in unloadProfile
File “aqt/main.py”, line 548, in unloadCollection
File “aqt/main.py”, line 812, in closeAllWindows
File “aqt/init.py”, line 118, in closeAll
File “aqt/main.py”, line 546, in before_sync
File “aqt/main.py”, line 924, in maybe_auto_sync_on_open_close
File “aqt/main.py”, line 542, in after_sync
File “aqt/mediasync.py”, line 129, in show_diag_until_finished
File “aqt/main.py”, line 539, in after_media_sync
File “aqt/main.py”, line 435, in callback
File “aqt/main.py”, line 444, in _unloadProfile
File “aqt/profiles.py”, line 270, in save
File “anki/db.py”, line 47, in execute
sqlite3.OperationalError: attempt to write a readonly database

Please follow the steps on https://faqs.ankiweb.net/when-problems-occur.html