Error when logging in to web interface

Upon logging in to LuCI I get the following show.

SyntaxError
Unexpected token '}'
  in http://172.16.101.19/luci-static/resources/network.js?v=git-22.213.35949-d09fbe0:?
  at http://172.16.101.19/luci-static/resources/luci.js?v=git-22.213.35949-d09fbe0:179:29
  at async Promise.all (index 4)

Version of openwrt and device?

System

Hostname OpenWrt
Model TP-Link TL-WPA8631P v3
Architecture MediaTek MT7621 ver:1 eco:3
Target Platform ramips/mt7621
Firmware Version OpenWrt 22.03.0-rc6 r19590-042d558536 / LuCI openwrt-22.03 branch git-22.204.42822-9a18337
Kernel Version 5.10.134

Thanks

Have you updated or installed any packages, or is this a fresh flash?

Tried resetting the device (run firstboot from ssh)?

I factory reset it and it fixed it, but strange as to why it happened to begin with?

Well, you're not giving us a lot to go on, your guess as good as ours.