"Invalid Key" also happens for on Libreelec official 10.0.4 on a Raspberry Pi 4.
For me moving the Pi closer to the access point (TP link EAP-615) removes the problem.
I note that the signal is not actually that weak when the problem occurs - in the problem location my TV can stream via wifi in full UHD, and also my PS5 has no issues.
Indeed - if I allow libeelec to create a connection by having the Pi closer to the access point (only 1 metre closer - albeit maybe interference comes from the TV), and then return my Pi to the problem location, the connection remains fine, and it works.
However, if I then leave the Pi in the problem position and do either a hard or soft reboot, then usually (but not always) the "invalid key" problem has returned.
Happy to supply more info to enable resolution if someone can point me in the right direction. This is very reproducible for me.
These are some of the logs that frakkin64 mentioned.
Pi nearer access point and working for initial connection (mac removed):
~ # iw wlan0 station dump
Station xx:xx:xx:xx:xx:xx (on wlan0)
inactive time: 0 ms
rx bytes: 139418
rx packets: 201
tx bytes: 40943
tx packets: 262
tx failed: 0
signal: -73 dBm
tx bitrate: 195.0 MBit/s
rx bitrate: 234.0 MBit/s
authorized: yes
authenticated: yes
associated: yes
WMM/WME: yes
TDLS peer: yes
DTIM period: 1
beacon interval:100
short preamble: yes
connected time: 28 seconds
current time: 1416746254 ms
Moving away to problem location, leaves libreelec still working, with reduced rx bitrate.
Note - in multiple tests here I saw rx bitrate drop to ~14MBit/s, but also it would recover as high as 130Mbit/s )
~ # iw wlan0 station dump
Station xx:xx:xx:xx:xx:xx (on wlan0)
inactive time: 0 ms
rx bytes: 159469
rx packets: 366
tx bytes: 68123
tx packets: 413
tx failed: 8
signal: -72 dBm
tx bitrate: 117.0 MBit/s
rx bitrate: 65.0 MBit/s
authorized: yes
authenticated: yes
associated: yes
WMM/WME: yes
TDLS peer: yes
DTIM period: 1
beacon interval:100
short preamble: yes
connected time: 115 seconds
current time: 1416833347 ms