"TypeError Cannot read property 'link' of undefined"

Has anyone seen this when browsing to the Switch Page?

Version: 19.07.0-rc2
Device: Mikrotik RB433AH

Yes, I have the same problem. my device is zyxel P2812hnulf1.

Please provide the output of ubus call luci getSwconfigPortState '{ "switch": "switch0" }'

root@OpenWrt:~# ubus call luci getSwconfigPortState '{ "switch": "switch0" }'
{
	"error": "No such switch"
}

Well run swconfig list and use the name shown there instead of switch0

Ummmm...odd...

root@OpenWrt:~# swconfig list
Found: switch0 - eth1

(Just to be sure I used eth1 in the command, no dice either.)

Then we found the culprit at least. Is swconfig dev switch0 show working at least?

It does:

root@OpenWrt:~# swconfig dev switch0 show
Global attributes:
	enable_vlan: 1
	name: IP175D
	phy: 0
	reg: 0
	val: 12544
Port 0:
	status: down, auto-negotiate (in progress)
	link: 0
	tagged: 0
	pvid: 0
Port 1:
	status: down, auto-negotiate (in progress)
	link: 0
	tagged: 0
	pvid: 1
Port 2:
	status: down, auto-negotiate (in progress)
	link: 0
	tagged: 0
	pvid: 1
Port 3:
	status: down, auto-negotiate (in progress)
	link: 0
	tagged: 0
	pvid: 0
Port 4:
	status: up, 100 Mbps, full duplex, auto-negotiate
	link: 100
	tagged: 0
	pvid: 0
Port 5:
	status: up, 100 Mbps, cpu port
	link: 100
	tagged: 1
	pvid: 0
VLAN 1:
	vid: 1
	ports: 1 2 5t

Thanks, will investigate later this week.

1 Like

Fixed by https://github.com/openwrt/luci/commit/616d44c155ae2b4f19e8b2645744a107e38a56c7 and https://github.com/openwrt/luci/commit/6d59a6400ed055d71e0b335679d291c22bbdbd40

Excellent! Thanks. Now the only problem is I won't see it [pre-compiled] until 19.07.1 (Service Release 1). I discovered it on a ar71xx device. :slightly_frowning_face:

Hopefully I can do some more testing before then.