I have an additional error after that one was resolved with a specific module loading in an article which worked fine with Joomla 3. Error and stack trace:
ARRAY_REPLACE(): ARGUMENT #1 ($ARRAY) MUST BE OF TYPE ARRAY, STRING GIVEN
I just got this error after upgrading to Joomla 4.1.
The problem seems to be the getTemplates function within the library ChromeStyleField which is calling $this->getDatabase(); which doesn't appear to exist.
I managed to temporarily fix it by adding the Factory namespace to the field and changing $this->getDatabase() to Factory::getContainer()->get('DatabaseDriver');
Maybe getDatabase() should be a function within the FormField class.