I have a two rokus one in my bedroom and the other in the living room. Both have been used for many years with no connection problems. However today the one in the bedroom disconnected from the internet and will no connect. I reset it multiple times and even factory reset it. Rebooted the internet as well. The wifi is perfectly fine as the one in my living room is connected. I have a roku express
Furthermore, if the affected device is a Roku Express or Roku Premiere, please note that both devices are only compatible with wireless b/g/n networks on the 2.4 GHz spectrum. Ensure that your router is broadcasting a 2.4GHz Wi-Fi network for the device to connect to. You can check your device model by navigating to Settings > System > About.
You can also try configuring your router and use wireless channels 1, 6, or 11 which are the preferred channels in North America. Each time you change the wireless channel, you will likely need to apply/save changes before you are prompted to restart the router.