The error you are experiencing is due to STM32CubeMX’s Java-based GUI not being fully supported in the WSL environment, particularly for authentication dialogs. To resolve this, it is recommended to run STM32CubeMX directly on Windows, where all GUI features and myST account integration are fully supported.
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
I found a way to enable the function. After running the following command on Ubuntu WSL environment, I can enter myST account information in STM32CubeMX.