The same problem with a recently installed launcher (both Microsoft and Mojang account). The old installation works.
The log:
[Info: 2021-06-29 23:11:12.9856243: ControllerInterface.cpp(106)] Running method loginWithCredentials
[Error: 2021-06-29 23:11:12.9857648: AccountData.cpp(180)] Data inconsistency - Active account is not present in the account map.
[Info: 2021-06-29 23:11:12.9858894: NetQueue.cpp(585)] NetQueue: Starting net action https://authserver.mojang.com/authenticate
[Info: 2021-06-29 23:11:13.2618054: NetQueue.cpp(428)] NetQueue: Primary ip: 13.32.57.69, Host: authserver.mojang.com
[Info: 2021-06-29 23:11:13.2618892: NetQueue.cpp(504)] NetQueue: Action finished: https://authserver.mojang.com/authenticate
[Info: 2021-06-29 23:11:13.2619132: NetQueue.cpp(532)] NetQueue: Action finalized: https://authserver.mojang.com/authenticate
[Info: 2021-06-29 23:11:13.2621600: NetQueue.cpp(585)] NetQueue: Starting net action https://api.minecraftservices.com/rollout/v1/msamigration
[Info: 2021-06-29 23:11:13.7345054: NetQueue.cpp(428)] NetQueue: Primary ip: 3.223.199.81, Host: api.minecraftservices.com
[Info: 2021-06-29 23:11:13.7345731: NetQueue.cpp(504)] NetQueue: Action finished: https://api.minecraftservices.com/rollout/v1/msamigration
[Info: 2021-06-29 23:11:13.7345956: NetQueue.cpp(532)] NetQueue: Action finalized: https://api.minecraftservices.com/rollout/v1/msamigration
[Error: 2021-06-29 23:11:13.7692701: app.7de005f7.bundle.js(2)] OnConsoleMessage: TypeError: Cannot read property 'versionId' of undefined
[Info: 2021-06-29 23:11:13.7983143: client_handler.cpp(220)] Handling PostTelemetryEvent message
[Error: 2021-06-29 23:11:15.9991698: app.7de005f7.bundle.js(2)] OnConsoleMessage: TypeError: Cannot read property 'versionId' of undefined
[Error: 2021-06-29 23:11:26.2572510: app.7de005f7.bundle.js(2)] OnConsoleMessage: TypeError: Cannot read property 'versionId' of undefined
Btw. It starts to work after a few minutes. Looks like it was just required to wait for a regular check for Minecraft updates made by the launcher.