Unable to list keys in the keystore

Hello. I have a problem when selecting my keystore in the Android project. When I select a keystore from the list and enter a password, when I try to select Project Key Alias I get an error, as if the password is not correct, but the password is correct.
The curious thing is that this problem occurs exclusively on my macbook pro M1 2020 macOs Ventura 13.2.1. If I open the project on windows, everything works correctly there. And another thing that confuses me is that if you create an empty project on macOs, and select my keystore from the list, it will work and there is no error.
I don’t understand what the problem could be, since the project on windows and macOs are identical.
I tried uninstalling unity and re-downloading Unity 2021.3.22f1 LTS from Unity Hub with Android Build Support installed. But the error is still there.
Can you tell me what could be the problem?

Unable to list keys in the keystore. Please make sure the location and password of the keystore is correct.
/Applications/Unity/Hub/Editor/2021.3.22f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -Xmx4096M -Dcom.android.sdkmanager.toolsdir=“/Applications/Unity/Hub/Editor/2021.3.22f1/PlaybackEngines/AndroidPlayer/SDK/tools” -Dfile.encoding=UTF8 -jar “/Applications/Unity/Hub/Editor/2021.3.22f1/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar” -
Environment Variables:
XPC_SERVICE_NAME = application.com.unity3d.unityhub.16737392.16737398
XPC_FLAGS = 0x0
JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
MallocNanoZone = 0
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
SHELL = /bin/zsh
SSH_AUTH_SOCK = /private/tmp/com.apple.launchd.xX2DAAKVhK/Listeners
HOME = /Users/staforkin
PATH = /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
__CFBundleIdentifier = com.unity3d.unityhub
USER = staforkin
__CF_USER_TEXT_ENCODING = 0x1F5:0x7:0x31
TMPDIR = /var/folders/h6/dwdw46413g31xtp84l1d8fxw0000gn/T/
LOGNAME = staforkin
JAVA_HOME = /Applications/Unity/Hub/Editor/2021.3.22f1/PlaybackEngines/AndroidPlayer/OpenJDK
COMMAND_MODE = unix2003
stderr[
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
Error:Invalid command keytool-list
]
stdout[
]
exit code: 64
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)

This problem has been eliminated.
It turned out that the problem was caused by the Firebase SDK 10.2.0.
This problem was also spreading to the iOS build with the bug:
“STDERR: tundra: error: Unexpected stdin”.

I found the solution to the problem in this article: STDERR: tundra: error: Unexpected stdin