I have OnePlus 7 Pro that got updated to Android 10. Since then, the phone randomly reboots. It seems it's related to WiFi since the random reboots almost never happen when WiFi is turned off (regardless if it's actually connected to a network or not)
Logcat:
Error: AndroidRuntime
*** FATAL EXCEPTION IN SYSTEM PROCESS: ClientModeImpl
java.lang.IllegalArgumentException: ssid bytes size out of range: 64
at com.android.server.wifi.util.NativeUtil.decodeSsid(NativeUtil.java:278)
at com.android.server.wifi.WifiScoreCard.computeHashLong(WifiScoreCard.java:588)
at com.android.server.wifi.WifiScoreCard.access$100(WifiScoreCard.java:63)
at com.android.server.wifi.WifiScoreCard$PerBssid.<init>(WifiScoreCard.java:380)
at com.android.server.wifi.WifiScoreCard.lookupBssid(WifiScoreCard.java:530)
at com.android.server.wifi.WifiCandidates.add(WifiCandidates.java:374)
at com.android.server.wifi.WifiCandidates.add(WifiCandidates.java:393)
at com.android.server.wifi.WifiNetworkSelector.lambda$selectNetwork$0$WifiNetworkSelector(WifiNetworkSelector.java:911)
at com.android.server.wifi.-$$Lambda$WifiNetworkSelector$Z7htivbXF5AzGeTh0ZNbtUXC_0Q.onConnectable(Unknown Source:15)
at com.android.server.wifi.SavedNetworkEvaluator.evaluateNetworks(SavedNetworkEvaluator.java:279)
at com.android.server.wifi.WifiNetworkSelector.selectNetwork(WifiNetworkSelector.java:900)
at com.android.server.wifi.WifiConnectivityManager.handleScanResults(WifiConnectivityManager.java:342)
at com.android.server.wifi.WifiConnectivityManager.access$900(WifiConnectivityManager.java:73)
at com.android.server.wifi.WifiConnectivityManager$AllSingleScanListener.onResults(WifiConnectivityManager.java:425)
at android.net.wifi.WifiScanner$ServiceHandler.handleMessage(WifiScanner.java:1429)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)
PID: 28683
TID: 28862
The following error message says:
FATAL EXCEPTION: main
Process: com.google.android.gms.persistent, PID: 30417
DeadSystemException: The system died; earlier logs will point to the root cause
This is consistent and the same exact error shows up every time the system crashes/reboots.
Why, and how to fix this issue?