Web Config Failed

I have not been able to find a thread that directly addresses this issue. I have a brand new Yun and am going through the initial configuration. After logging in to the web configuration using the default "arduino" password, I enter the board configuration screen through my web browser. I am able to enter all information, but it does not detect a wireless network. When I select "Configure & Restart" I receive the following error:

Failed to execute call dispatcher target for entry '/webpanel/config'.
The called action terminated with an exception:
?:0: attempt to index a nil value
stack traceback:

: in function 'assert'
	?: in function 'dispatch'
	?: in function <?:194>

 I have tried using Windows 7 and Windows 8. I have tried Chrome, IE, and Firefox first using wireless, then plugging the Yun in to ethernet and accessing the IP address assigned by my Linksys router. I have tried disabling my Windows firewall, as well as disabling my Bitdefender firewall. I have tried all of the reset buttons for 30+ seconds. Everything seems to be running fine on the Yun, just this communication error that I don't understand.

Can someone please point me in the right direction?

Thanks

http://forum.arduino.cc/index.php?topic=217803.msg1595131#msg1595131

sonnyyu:
No wifi signal from Yun - #5 by system - Arduino Yún - Arduino Forum

Thank you for the suggestion, but this did not help my problem. I ran through the commands in the console to reset the WiFi to factory condition, but I am receiving the same error. The issue is not with accessing the WiFi on the Yun, but getting the configuration to save, and getting the Yun to recognize the wireless network provided by my router.

Are there any other steps I can take, or another thread I can follow?

Thanks

Here are screenshots of the login details with the error I receive after clicking "Configure & Restart"

Thanks

Error.jpg

When I ran

/usr/bin/wifi-reset-and-reboot

I received the following output

root@Arduino:/# /usr/bin/wifi-reset-and-reboot
/sbin/uci: Entry not found
/sbin/uci: Entry not found
/sbin/uci: Entry not found
/sbin/uci: Entry not found
/sbin/uci: Entry not found
/sbin/uci: I/O error
/sbin/uci: I/O error
/sbin/uci: I/O error
/sbin/uci: I/O error
/sbin/uci: I/O error
/sbin/uci: I/O error
/sbin/uci: I/O error
/sbin/uci: I/O error
/sbin/uci: I/O error
/sbin/uci: I/O error

And then the Yun booted up and I began receiving the same error after trying to save an updated configuration in the web browser.

  1. try to use different browser (firefox, chrome...)

  2. after backup the code or conf file you made.

/usr/bin/reset-to-factory-anyway

http://forum.arduino.cc/index.php?topic=217803.msg1591789#msg1591789

  1. Power cycle Yun.

sonnyyu:

  1. try to use different browser (firefox, chrome...)

  2. after backup the code or conf file you made.

/usr/bin/reset-to-factory-anyway

No wifi signal from Yun - #4 by sonnyyu - Arduino Yún - Arduino Forum

  1. Power cycle Yun.

I followed everything in the above recommendation with Firefox, Chrome, and IE

From the console I did a factory reset

root@Arduino:/# /usr/bin/reset-to-factory-anyway

Then I reset the WiFi

root@Arduino:/# /usr/bin/wifi-reset-and-reboot

And then cycled the power on the Yun. I am still receiving the same error when I click "Configure & Restart"

Failed to execute call dispatcher target for entry '/webpanel/config'.
The called action terminated with an exception:
?:0: attempt to index a nil value
stack traceback:

: in function 'assert'
?: in function 'dispatch'
?: in function <?:194>[/quote]

It looks like an issue with OpenWRT, but I'm not familiar with it.

Any further help would be greatly appreciated.

Thanks

root@Arduino:/# /usr/bin/reset-to-factory-anyway

power cycle

only work with firefox, yours has no wifi.

at console

ifconfig
...
wlan0     Link encap:Ethernet  HWaddr 90:A2:DA:F0:06:76
          inet addr:192.168.240.1  Bcast:192.168.240.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:131 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:0 (0.0 B)  TX bytes:24184 (23.6 KiB)

if wlan0 is missing then

ifconfig wlan0 down
ifconfig wlan0 up

run "ifconfig" to confirm wlan0 is up, then firefox yun config page again.

I entered the command from the console

root@Arduino:/# /usr/bin/reset-to-factory-anyway

Then I cycled the power and ran

ifconfig

Here is the output

eth1      Link encap:Ethernet  HWaddr 90:A2:DA:FA:16:24  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:4 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:720 errors:0 dropped:0 overruns:0 frame:0
          TX packets:720 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:48960 (47.8 KiB)  TX bytes:48960 (47.8 KiB)

wlan0     Link encap:Ethernet  HWaddr 90:A2:DA:F2:16:24  
          inet addr:192.168.240.1  Bcast:192.168.240.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1390 errors:0 dropped:35 overruns:0 frame:0
          TX packets:1403 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32 
          RX bytes:124300 (121.3 KiB)  TX bytes:439886 (429.5 KiB)

From Firefox, I am not seeing any wireless options. I do have a wireless network from my Linksys router that I am currently using for this computer.

eth1      Link encap:Ethernet  HWaddr 90:A2:DA:FA:16:24  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:4

You have no ethernet connection. I allway have all 3 conections with Yun during develop stage.
You have to better setup wifi via ethernet ip address.

all above command should be issue at ethernet ip address via ssh/putty.
cycled the power by

reboot

So I would call this dumb luck but...

I followed this guide under the section "Console"

I uploaded the console sketch they provided to my Yun. Then I used PuTTY and telnet to connect to the Yun and run the console. I was able to send 'H' to set the on-board LED high, and 'L' to set it low from the console. While that was running I used Firefox to login to the Yun at 192.168.240.1 for the web config. To my surprise, I was able to complete the configuration successfully, and it recognized my wireless network. I am now able to access the Yun from my wireless network without having to directly connect to the Yun.

I have no idea why this worked, but it did. Maybe someone can provide a better explanation.

Thanks

I have the exact same issue. Brand new only just opened Yun and same error message and no detected wifi points regardless of operating system and browser used to access the device.

I have tried over WiFi and over Ethernet, neither yield different results. Upon submitting configuration details the following error is thrown (same as PiMios).

Failed to execute call dispatcher target for entry '/webpanel/config'.
The called action terminated with an exception:
?:0: attempt to index a nil value
stack traceback:
	[C]: in function 'assert'
	?: in function 'dispatch'
	?: in function <?:194>

More than a bit disappointing - I hope I haven't got a dud unit, I repeated the steps PiMos reported to fix his device but it did not work for mine. I followed his entire chain of events just in case the solution depends on the prior - nothing.

Any ideas?

The message tell us is lua script error.

It might be either system config file lua script working on or javascript which call the lua script.

  • Use Firefox
  • Restore fresh copy of firmware

Methods of Restore firmware:

/usr/bin/reset-to-factory-anyway
reboot

Or holding the WLAN RST button for longer than 30 seconds.

As I stated I have used all possible combinations of operating systems and web browsers available to me, I have restored the device all the ways possible multiple times now and I followed all instructions prior to my original post in this thread. It simply doesn't work.

I think I have found the problem but I am unsure how to fix it.

First I noticed a javascript error in firefox:

Imgur

Then I opened the resource directly and saw that the js file was ending prematurely:

"use strict";function formCheck(e){function a(e){return e==null||e===""}var t=e["wifi.ssid"],n=e["wifi.encryption"],r=e["wifi.password"],i=e.hostname,s=e.password,o,u=document.getElementById("error_response");return u.innerHTML="",o=!1,r.className="normal",t.className="normal",i.className="normal",s.className="normal",u.className="hidden",!t.disabled&&a(t.value)&&(errorHandler(t,u,"Please choose a WiFi network name"),o=!0),!r.disabled&&n.value!="none"&&(a(r.value)?(errorHandler(r,u,"Please choose a WiFi password"),o=!0):r.value.length<8&&(errorHandler(r,u,"WiFi password should be 8 char at least"),o=!0)),a(i.value)?(errorHandler(i,u,"Please choose a name for your Y&uacute;n"),o=!0):i.value.match(/[^a-zA-Z0-9]/)&&(errorHandler(i,u,"You can only use alphabetical characters for the hostname (A-Z or a-z)"),o=!0),s.value!=null&&s.value!=""&&s.value.length<8&&(errorHandler(s,u,"Password should be 8 char at least"),o=!0),!o}function formReset(){setTimeout(function(){grey_out_wifi_conf(!document.getElementById("wificheck").checked),onchange_security(document.getElementById("wifi_encryption"))},100)}function errorHandler(e,t,n){e.className="error",t.className="visible",t.innerHTML="<p>"+t.innerHTML+n+"
</p>"}function goto(e){return document.location=e,!1}function onchange_security(e){var t=document.getElementById("wifi_password_container"),n=document.getElementById("wifi_password");e.value=="none"?t.setAttribute("class","hidden"):(t.removeAttribute("class"),n.value="",n.focus())}function send_post(e,t,n){var r={};for(var i=3;i<arguments.length;i++)t[arguments[i]].disabled||(r[arguments[i]]=t[arguments[i]].value);var s=doEncrypt(key_id,0,public_key,JSON.stringify(r)),o=document.getElementById(n);return o.pgp_message.value=s,o.submit(),!1}function grey_out_wifi_conf(e){e?document.getElementById("wifi_container").setAttribute("class","disabled"):document.getElementById("wifi_container").setAttribute("class",""),document.getElementById("wifi_password").disabled=e,document.getElementById("wifi_ssid").disabled=e,document.getElementById("wifi_encryption").disabled=e,document.getElementById("detected_wifis").disabled=e}function matchpassword(){var e=document.getElementById("confpassword"),t=document.getElementById("password");e.value==t.value?document.getElementById("pass_mismatch").setAttribute("class","hidden error_container input_message"):document.getElementById("pass_mismatch").setAttribute("class","error_container input_message")}var pu,key_id,public_key;typeof getPublicKey=="function"&&(pu=new getPublicKey(pub_key),key_id=pu.keyid,public_key=pu.pkey.replace(/\n/g,"")),document.body.onload=function(){document.getElementById("username")&&document.getElementById("password").focus();var e=document.getElementById("wificheck");e&&(e.onclick=function(e){grey_out_wifi_conf(!e.target.checked)});var t=document.getElementById("wifi_encryption");t&&(t.onchange=function(e){onchange_security(e.target)});var n=document.getElementById("confpassword");n&&(n.onkeyup=matchpassword,document.getElementById("password").onkeyup=matchpassword);var r=document.getElementById("dmesg");r&&($("#dmesg").hide(),$("#dmesg_toogle").on("click",function(){return $(this).text()=="Show"?($("#dmesg").show(),$(this).text("Hide")):($("#dmesg").hide(),$(this).text("Show")),!1}));var i=document.getElementById("detected_wifis");if(i){var s=function(){var e=$("#detected_wifis");return e[0].disabled?!1:(e.empty(),e.append("<option>Detecting ...</option>"),$.get(refresh_wifi_url,function(t){e.empty(),e.append("<option>Select a wifi network...</option>");for(var n=0;n<t.length;n++){var r='<option value="'+t[n].name+"|||"+t[n].encryption+'">'+t[n].name;t[n].encryption!=="none"&&(r=r+" ("+t[n].pretty_encryption+")"),r+="</option>",e.append(r)}}),!1)};document.getElementById("refresh_detected_wifis").onclick=s,i.onchange=function(){var e=$("#detected_wifis").val().split("|||");if(e.length!==2)return;$("#wifi_ssid").val(e[0]);var t=$("#wifi_encryption");t.val(e[1]),t.change()},s()}var o=document.getElementById("restopen");if(o){var u=function(){var e={};e[this.name]=$(this).val(),$.post(this.form.action,e)};o.onclick=u,document.getElementById("restpass").on

So I ssh'd into the yun and the full file should be:

"use strict";function formCheck(e){function a(e){return e==null||e===""}var t=e["wifi.ssid"],n=e["wifi.encryption"],r=e["wifi.password"],i=e.hostname,s=e.password,o,u=document.getElementById("error_response");return u.innerHTML="",o=!1,r.className="normal",t.className="normal",i.className="normal",s.className="normal",u.className="hidden",!t.disabled&&a(t.value)&&(errorHandler(t,u,"Please choose a WiFi network name"),o=!0),!r.disabled&&n.value!="none"&&(a(r.value)?(errorHandler(r,u,"Please choose a WiFi password"),o=!0):r.value.length<8&&(errorHandler(r,u,"WiFi password should be 8 char at least"),o=!0)),a(i.value)?(errorHandler(i,u,"Please choose a name for your Y&uacute;n"),o=!0):i.value.match(/[^a-zA-Z0-9]/)&&(errorHandler(i,u,"You can only use alphabetical characters for the hostname (A-Z or a-z)"),o=!0),s.value!=null&&s.value!=""&&s.value.length<8&&(errorHandler(s,u,"Password should be 8 char at least"),o=!0),!o}function formReset(){setTimeout(function(){grey_out_wifi_conf(!document.getElementById("wificheck").checked),onchange_security(document.getElementById("wifi_encryption"))},100)}function errorHandler(e,t,n){e.className="error",t.className="visible",t.innerHTML="<p>"+t.innerHTML+n+"
</p>"}function goto(e){return document.location=e,!1}function onchange_security(e){var t=document.getElementById("wifi_password_container"),n=document.getElementById("wifi_password");e.value=="none"?t.setAttribute("class","hidden"):(t.removeAttribute("class"),n.value="",n.focus())}function send_post(e,t,n){var r={};for(var i=3;i<arguments.length;i++)t[arguments[i]].disabled||(r[arguments[i]]=t[arguments[i]].value);var s=doEncrypt(key_id,0,public_key,JSON.stringify(r)),o=document.getElementById(n);return o.pgp_message.value=s,o.submit(),!1}function grey_out_wifi_conf(e){e?document.getElementById("wifi_container").setAttribute("class","disabled"):document.getElementById("wifi_container").setAttribute("class",""),document.getElementById("wifi_password").disabled=e,document.getElementById("wifi_ssid").disabled=e,document.getElementById("wifi_encryption").disabled=e,document.getElementById("detected_wifis").disabled=e}function matchpassword(){var e=document.getElementById("confpassword"),t=document.getElementById("password");e.value==t.value?document.getElementById("pass_mismatch").setAttribute("class","hidden error_container input_message"):document.getElementById("pass_mismatch").setAttribute("class","error_container input_message")}var pu,key_id,public_key;typeof getPublicKey=="function"&&(pu=new getPublicKey(pub_key),key_id=pu.keyid,public_key=pu.pkey.replace(/\n/g,"")),document.body.onload=function(){document.getElementById("username")&&document.getElementById("password").focus();var e=document.getElementById("wificheck");e&&(e.onclick=function(e){grey_out_wifi_conf(!e.target.checked)});var t=document.getElementById("wifi_encryption");t&&(t.onchange=function(e){onchange_security(e.target)});var n=document.getElementById("confpassword");n&&(n.onkeyup=matchpassword,document.getElementById("password").onkeyup=matchpassword);var r=document.getElementById("dmesg");r&&($("#dmesg").hide(),$("#dmesg_toogle").on("click",function(){return $(this).text()=="Show"?($("#dmesg").show(),$(this).text("Hide")):($("#dmesg").hide(),$(this).text("Show")),!1}));var i=document.getElementById("detected_wifis");if(i){var s=function(){var e=$("#detected_wifis");return e[0].disabled?!1:(e.empty(),e.append("<option>Detecting ...</option>"),$.get(refresh_wifi_url,function(t){e.empty(),e.append("<option>Select a wifi network...</option>");for(var n=0;n<t.length;n++){var r='<option value="'+t[n].name+"|||"+t[n].encryption+'">'+t[n].name;t[n].encryption!=="none"&&(r=r+" ("+t[n].pretty_encryption+")"),r+="</option>",e.append(r)}}),!1)};document.getElementById("refresh_detected_wifis").onclick=s,i.onchange=function(){var e=$("#detected_wifis").val().split("|||");if(e.length!==2)return;$("#wifi_ssid").val(e[0]);var t=$("#wifi_encryption");t.val(e[1]),t.change()},s()}var o=document.getElementById("restopen");if(o){var u=function(){var e={};e[this.name]=$(this).val(),$.post(this.form.action,e)};o.onclick=u,document.getElementById("restpass").onclick=u}};

So the problem is that the yun isn't sending the full js file - that's very weird, perhaps someone can shed some further light onto this?

This same javascript issue is happening on multiple computers / browsers with the Yun device. So please don't blame the computer or me! :wink:

Xavier.

You have no ethernet connection. I allway have all 3 conections with Yun during develop stage.
You have to better setup wifi via ethernet ip address.

  • Ethernet connection
  • Strong wifi signal(>80%)
  • Access via ethernet ip address
  • Firefox
  • Clear Firefox's Cache, restart Firefox

I am usually thankful for help and advice on forums... but you cannot be serious with your reply can you? :roll_eyes:

You must think I am quite a retard if this is a genuine solution / offering.

Hi
I had the exact same problem. I could not choose a network to connect the YUN to.
The errormessages were the same.
Trying different browsers helpt (maybe there is one you didn't try, I faild on 2 PCs and 4 Browsers). Internet Explorer 11 worked for me firefox and Chrome on the other hand didn't.
Maybe this helped you, if not: my deepest appologies.

Hermelinmaster

I can report same error message and symptoms:

  • could not submit
  • no listing of available wifi networks

Both Firefox 30.0 and Chrome 35 where not functional.
Internet Explorer 11 worked
Lesson learned: keep as many browsers as you can

Really? IE FTW :open_mouth:

Just done with both and works fine

jdrudnicki:

  • could not submit

You weren't able to press "configure" button? Are you sure you haven't missed some error messages?