[OnePlus 3 Questions & Answers] tiagobt:
I've been having a weird issue lately. Every time I try to switch Wifi off, the toggle keeps blinking (switching on and off very quickly). If I restart the device, the toggle goes back to normal. I'm not sure when the problem started.

I've received the 3.2.8 update (OTA) today, but the problem remains. My device is unrooted.

I've run logcat to see what's wrong and found the following:

12-05 19:53:23.725 1324 2393 E WifiConfigStore: readAutoJoinStatus: Error parsing configurationjava.io.FileNotFoundException: /data/misc/wifi/autojoinconfig.txt: open failed: ENOENT (No such file or directory)
12-05 19:53:23.726 1324 2393 E WifiConfigStore: buildPnoList sortedWifiConfigurations size 13
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-NONE
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-NONE
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_EAP
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-NONE
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-NONE
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_EAP
12-05 19:53:23.739 721 1425 D CommandListener: Setting iface cfg
12-05 19:53:23.739 721 1425 D CommandListener: Trying to bring up p2p0
12-05 19:53:23.739 1324 2391 D WifiMonitor: startMonitoring(p2p0) with mConnected = true
12-05 19:53:23.744 1324 2391 D WifiNative-HAL: p2pGetDeviceAddress
12-05 19:53:23.745 1324 2391 D WifiNative-HAL: p2pGetDeviceAddress returning c2:ee:fb:d5:b7:f8
12-05 19:53:23.760 1324 2393 D WifiStateMachine: Disconnected CMD_START_SCAN source -2 867, 907 -> obsolete
12-05 19:53:23.763 2544 2544 I wpa_supplicant: p2p0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=BR
12-05 19:53:23.769 3368 22060 W ContentTaskController: Invalid newTask was provided to startTracking.
12-05 19:53:23.773 1324 2778 D WifiService: setWifiEnabled: false pid=3368, uid=10010
12-05 19:53:23.773 1324 2778 E WifiService: Invoking mWifiStateMachine.setWifiEnabled
12-05 19:53:23.775 1324 5700 E OsAgent : Wifi Scan Always Available: 1
12-05 19:53:23.776 1324 5700 E OsAgent : Wifi Scan Always Available: 1
12-05 19:53:23.776 1324 5700 E OsAgent : Wifi Scan Always Available: 1
12-05 19:53:23.807 3368 3881 W Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
12-05 19:53:23.808 1324 1351 D WifiService: setWifiEnabled: true pid=3368, uid=10010
12-05 19:53:23.808 1324 1351 E WifiService: Invoking mWifiStateMachine.setWifiEnabled
12-05 19:53:23.810 1324 5700 E OsAgent : Wifi Scan Always Available: 1
12-05 19:53:23.811 1324 5700 E OsAgent : Wifi Scan Always Available: 1
12-05 19:53:23.811 1324 5700 E OsAgent : Wifi Scan Always Available: 1
12-05 19:53:23.831 1324 2393 D WifiConfigStore: Loading config and enabling all networks
12-05 19:53:23.916 1324 2393 D WifiConfigStore: loaded 0 passpoint configs
12-05 19:53:23.918 1324 2393 W WifiConfigStore: Upgrading network 8 to android.uid.system:1000
12-05 19:53:23.918 1324 2393 W WifiConfigStore: Upgrading network 11 to android.uid.system:1000
12-05 19:53:23.918 1324 2393 W WifiConfigStore: Upgrading network 0 to android.uid.system:1000
12-05 19:53:23.918 1324 2393 W WifiConfigStore: Upgrading network 9 to android.uid.system:1000
12-05 19:53:23.919 1324 2393 W WifiConfigStore: Upgrading network 5 to android.uid.system:1000
12-05 19:53:23.919 1324 2393 W WifiConfigStore: Upgrading network 3 to android.uid.system:1000
12-05 19:53:23.919 1324 2393 W WifiConfigStore: Upgrading network 12 to android.uid.system:1000
12-05 19:53:23.919 1324 2393 W WifiConfigStore: Upgrading network 4 to android.uid.system:1000
12-05 19:53:23.920 1324 2393 W WifiConfigStore: Upgrading network 10 to android.uid.system:1000
12-05 19:53:23.920 1324 2393 W WifiConfigStore: Upgrading network 1 to android.uid.system:1000
12-05 19:53:23.920 1324 2393 W WifiConfigStore: Upgrading network 7 to android.uid.system:1000
12-05 19:53:23.920 1324 2393 W WifiConfigStore: Upgrading network 6 to android.uid.system:1000
12-05 19:53:23.921 1324 2393 W WifiConfigStore: Upgrading network 2 to android.uid.system:1000
12-05 19:53:23.921 1324 2393 E WifiConfigStore: readAutoJoinStatus: Error parsing configurationjava.io.FileNotFoundException: /data/misc/wifi/autojoinconfig.txt: open failed: ENOENT (No such file or directory)
12-05 19:53:23.922 1324 2393 E WifiConfigStore: buildPnoList sortedWifiConfigurations size 13
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-NONE
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-NONE
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_PSK
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_EAP
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-NONE
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-NONE
12-05 19:53:23.726 1324 2393 E WifiConfigStore: found sortedWifiConfigurations : "XXXXX"-WPA_EAP
12-05 19:53:23.942 721 1425 D CommandListener: Setting iface cfg
12-05 19:53:23.942 721 1425 D CommandListener: Trying to bring up p2p0
12-05 19:53:23.943 1324 2391 D WifiMonitor: startMonitoring(p2p0) with mConnected = true
12-05 19:53:23.953 1324 2391 D WifiNative-HAL: p2pGetDeviceAddress
12-05 19:53:23.953 1324 2391 D WifiNative-HAL: p2pGetDeviceAddress returning c2:ee:fb:d5:b7:f8
12-05 19:53:23.960 1324 2783 D WifiService: setWifiEnabled: false pid=3368, uid=10010
12-05 19:53:23.960 1324 2783 E WifiService: Invoking mWifiStateMachine.setWifiEnabled
12-05 19:53:23.964 1324 5700 E OsAgent : Wifi Scan Always Available: 1
12-05 19:53:23.965 1324 5700 E OsAgent : Wifi Scan Always Available: 1
12-05 19:53:23.965 1324 5700 E OsAgent : Wifi Scan Always Available: 1
12-05 19:53:23.971 2544 2544 I wpa_supplicant: p2p0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=BR
12-05 19:53:24.009 1324 2948 D WifiService: setWifiEnabled: true pid=3368, uid=10010
12-05 19:53:24.009 1324 2948 E WifiService: Invoking mWifiStateMachine.setWifiEnabled
12-05 19:53:24.010 3368 3881 W Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
12-05 19:53:24.011 1324 5700 E OsAgent : Wifi Scan Always Available: 1
12-05 19:53:24.011 1324 5700 E OsAgent : Wifi Scan Always Available: 1
12-05 19:53:24.012 1324 5700 E OsAgent : Wifi Scan Always Available: 1
12-05 19:53:24.032 1324 2393 D WifiConfigStore: Loading config and enabling all networks
12-05 19:53:24.177 1324 2393 D WifiConfigStore: loaded 0 passpoint configs
12-05 19:53:24.181 1324 2393 W WifiConfigStore: Upgrading network 8 to android.uid.system:1000
12-05 19:53:24.182 1324 2393 W WifiConfigStore: Upgrading network 11 to android.uid.system:1000
12-05 19:53:24.183 1324 2393 W WifiConfigStore: Upgrading network 0 to android.uid.system:1000
12-05 19:53:24.184 1324 2393 W WifiConfigStore: Upgrading network 9 to android.uid.system:1000
12-05 19:53:24.184 1324 2393 W WifiConfigStore: Upgrading network 5 to android.uid.system:1000
12-05 19:53:24.185 1324 2393 W WifiConfigStore: Upgrading network 3 to android.uid.system:1000
12-05 19:53:24.185 1324 2393 W WifiConfigStore: Upgrading network 12 to android.uid.system:1000
12-05 19:53:24.185 1324 2393 W WifiConfigStore: Upgrading network 4 to android.uid.system:1000
12-05 19:53:24.185 1324 2393 W WifiConfigStore: Upgrading network 10 to android.uid.system:1000
12-05 19:53:24.186 1324 2393 W WifiConfigStore: Upgrading network 1 to android.uid.system:1000
12-05 19:53:24.186 1324 2393 W WifiConfigStore: Upgrading network 7 to android.uid.system:1000
12-05 19:53:24.186 1324 2393 W WifiConfigStore: Upgrading network 6 to android.uid.system:1000
12-05 19:53:24.187 1324 2393 W WifiConfigStore: Upgrading network 2 to android.uid.system:1000

(This log pattern keeps repeating many times)

Any idea how to get this fixed? It appears that the file /data/misc/wifi/autojoinconfig.txt is corrupted or missing.

Thanks!