Help getting started with Roku devices, including setup, connecting your device to your TV, linking a Roku device to your account at my.roku.com/link, adding channels, subscribing to services, and more.
In addition, I'd also recommend trying to connect your device to an alternate network, such as a mobile hotspot, to see if you can update your device. Then once your device has been updated, try switching back to your home wireless network.
This doesn't answer what error code 004 means. I, too, am having the same issue while trying to set up a new TCL 6 series tv.
For reference, tv is connected via Ethernet, modem has been power cycled a few times, internet speed is good (above 100mbps) and working on every other device. I've tried doing initial software update but it hangs at 49% every time before giving error code 004. Created a mobile hotspot using phone and connected TV wirelessly to it to try update and once again hung up at 49% before giving error code 004. Clarification on what error code 004 is would be appreciated.