To help resolving your issue, enable debug logging (TbSync Account Manager -> Help) and send me the debug.log via e-mail (use the title of your issue as subject of the email).
Please note that CalDAV/CardDAV support will be sunset in TbSync. Thunderbird now has native support for CalDAV/CardDAV, and if it is not able to find your resources, you need to file a bug with Thunderbird.
Your environment
TbSync version:4.7 Thunderbird version: 102.15.1
Expected behavior
... sync carddav caldav
Actual behavior
...erreur javascript
Steps to reproduce
... manual syncing
To help resolving your issue, enable debug logging (TbSync Account Manager -> Help) and send me the debug.log via e-mail (use the title of your issue as subject of the email).