Archive > 22.7 Legacy Series

OPNSense 22.7_4 - Fatal error: Uncaught TypeError while setting WAN properties

(1/2) > >>

diedenieded:
Hello. I'm trying to save my changes to the WAN Interface, but the following error keeps popping up. This error also happens if I'm not changing anything and just pressing the Save button. Any clue why this happens?


--- Code: ---Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/interfaces.php:931 Stack trace: #0 {main} thrown in /usr/local/www/interfaces.php on line 931
--- End code ---

My WAN interface is an AX200 loaded by iwlwifi if that matters. Please do tell me if there's any extra info I can provide. I'm quite new to this.

franco:
https://forum.opnsense.org/index.php?topic=29543.0

diedenieded:
Hello, thank you for replying.

I'm not too clear on what I'm supposed to do. I'm using English, not French, and I do have a 'Save' button.

I've ran the commands anyways, and I still have the same issues.

hsw:
Seems like it is a problem if WLAN is selected as a WAN device. The php tries to access:
$a_interfaces["wireless"]["mode"] but the wireless element is not an object, it is an empty string.

As a workaround I tried setting the mode in /config/config.xml  i.e. find the line in the right interface block which shows:
   <wireless/>
and use "vi" change it to
   <wireless><mode>bss</mode></wireless>
this suppresses the error and allows further configuration.
After this I a was able to see that the wlan associated.

(all done via a shell from the console)

hsw:
I also found that NAT is not working using WIFI as a WAN

in ifconfig the interface appears as iwm0_wlan0 but the NAT does not see this, so no automatic rules are generated.
Adding manual rules looks like
rdr nat on iwm0 inet …
manually change rules to change to iwmo_wlan0 appears to work

so fix is to edit /conf/config.xml from:
    <wan><if>iwm0</if>
to be
    <wan><if>iwm0_wlan0</if>

Next disable outbound NAT, save, apply.
Finally re enable automatic Nat, save, apply.
Now have working NAT with WIFI WAN.

Navigation

[0] Message Index

[#] Next page

Go to full version