I've run into issues when updating to latest React where that error is thrown, primarily in test environments. It appears like we're checking for the initialFocus before it has rendered though when I run debug() in react-testing-library.
Working on getting a minimal reproduction case.