Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lime-App, Un unexpected error occurred. #763

Closed
rallep71 opened this issue Sep 20, 2020 · 51 comments
Closed

Lime-App, Un unexpected error occurred. #763

rallep71 opened this issue Sep 20, 2020 · 51 comments
Assignees
Labels
bug lime-app OpenWrt 19.07 compatible Mark pull requests compatible with OpenWrt 19.07, would be nice to merge those before re-targetting

Comments

@rallep71
Copy link

rallep71 commented Sep 20, 2020

Lime-App, Un unexpected error occurred.

Hello,

once again I have a problem with the display in the browser of the Lime-App. I don't need the First-Boot-Wizzard, that's why it is not compiled. I only need to see in which node I am located in the Lime-App. See photo.

systems:
Openwrt 19.07.4, following routers are in use, TP-Link Archer C50 v3, TP-Link Archer C50 v4, TP-Link TL-WDR4300 v1.

Config File:(this file is for C50, but identical except for the different routers)
https://pastebin.com/sdpGx1Ca
feeds.conf:
src-git packages https://git.openwrt.org/feed/packages.git^eae1bb397f064befe003b01a36ae318321e81d35
src-git luci https://git.openwrt.org/project/luci.git^0d0ab01a64f25d15325d3c98a7df252085382f1d
src-git routing https://git.openwrt.org/feed/routing.git^b77498bd56d5e45ab4577a1f4ad6ffc55b4a86b7
src-git telephony https://git.openwrt.org/feed/telephony.git^91b34e7eefa1d37a18390d0c6881978cd76804a1
src-git libremesh https://github.com/libremesh/lime-packages.git
src-git libremap https://github.com/libremesh/libremap-agent.git
src-git networkprofiles https://github.com/libremesh/network-profiles.git

lime

one more thing i have to say, i used the network profile of libremesh to encrypt mesh,

80-set-11s-encryption

#!/bin/sh
uci set lime-defaults.wifi.ieee80211s_encryption='psk2+aes'
uci set lime-defaults.wifi.ieee80211s_key='libremesh'
uci commit lime-defaults

have I forgotten to compile anything, or what could I do?

THX

@spiccinini
Copy link
Contributor

spiccinini commented Sep 20, 2020

Hi @rallep71 indeed the lime-app error is related to firstbootwizard not being installed. Thanks for reporting it :) I've created this issue libremesh/lime-app#275 to track it in lime-app

In order to use encrypted mesh, the wpad-mini package have to be replaced with wpad-mesh-wolfssl package.

@rallep71
Copy link
Author

Thanks for the quick answer!
I had mentioned it before in another posting, I am very impressed with libremesh! I have been looking for solutions to build a mesh for over a year. Sure, there are ready-made solutions from different vendors including hardware, but I don't have control over them, and usually after two or three years there are no more updates.

I replaced wpad-mini with wpad-mesh-openssl, what is the difference to wpad-mesh-wolfssl? would wpad-mesh.openssl also be possible?

again to my understanding, is it possible to realize this without fbw? would both ways to view the node info be possible? or even a minimal version which only shows in which node you are?

the documentation on the website is kept very minimal, it is enough to build a mesh for the beginning. I had to make many attempts, i.e. compiling new images with more software, until I am now on this stand to know what is really needed, also with regard to security. maybe there would be some need for action.

@AndyMcSchopf
Copy link

AndyMcSchopf commented Sep 22, 2020

Hi all,

I have a similar Problem - same Error-Message, and encrypted Mesh.
The difference is, that I have fbw compiled into my images.

Maybe there is an other problem here?

P.S. @rallep71 afaik wolf-ssl is a much smaller implementation - my images are about 1M smaller compared to openssl...

@rallep71
Copy link
Author

rallep71 commented Sep 22, 2020

Hello everybody,

i have done my work again and compiled a new image, this time with fbw.

So far so good. Now I don't get any more errors, Lime-App is displayed as it should be. except for a small error but more about that in the next posting.

I was really amazed for the first time! Not in a positive sense.

I gave the router a root password, I encrypted the AP's, also the mesh.

I log on to the AP, go to the node, fwb, create a new network. So I can create a new network, no matter if the network is encrypted or not.

I create a new network with fbw, assign a password, assign the network name, that's it..I am not asked if I am allowed to do this at all, it's easy.

the new network is created and at the same time with this new password the root password is changed, unbelievable. And, the whole original configuration is gone, too. Guys, this makes no sense with the fbw, honestly not.

PS:@AndyMcSchopf i now it now ;)

@ilario
Copy link
Member

ilario commented Sep 22, 2020

The reported issue about FirstBootWizard looks like #640 (and in my opinion it can be more serious when considering also #280), which was closed based on the fact that FBW has an option for disabling it when configuring the system manually.
@rallep71 if you agree that #640 describes your case, could you continue the thread there?

@rallep71
Copy link
Author

Thanks for the answer,

yes of course I agree that we continue there #640, that's fine. oder auf deutsch, des passt scho :)

thx

@AndyMcSchopf
Copy link

Hi all,

I have a similar Problem - same Error-Message, and encrypted Mesh.
The difference is, that I have fbw compiled into my images.

Maybe there is an other problem here?

P.S. @rallep71 afaik wolf-ssl is a much smaller implementation - my images are about 1M smaller compared to openssl...

I tried the whole thing again - made new images - but still have the problem.
I used 19074 with feeds:
src-git packages https://git.openwrt.org/feed/packages.git^eae1bb397
src-git luci https://git.openwrt.org/project/luci.git^0d0ab01a6
src-git routing https://git.openwrt.org/feed/routing.git^b77498b
src-git telephony https://git.openwrt.org/feed/telephony.git^91b34e7
src-git libremesh https://github.com/libremesh/lime-packages.git^80c79378
src-git libremap https://github.com/libremesh/libremap-agent.git^e2b94dc

Not working on meraki mx60, mr18, ubiquity ac-mesh and wavlink 577a2...
Still getting the error message above.

@rallep71
Copy link
Author

rallep71 commented Sep 23, 2020

hi Andy ,

make clean,
scripts/feeds update -a
scripts/feeds install -a
make manuconfig
select > LiMe select first-boot-wizard , safe exit
select > Ubus > select 3. Aplications, select lime-ubus-fbw, safe exit
make download
make...

but alsotung!, with fbw who is also part of it there is a promblem, everyone who has access to your network can change the configuration via fbw!!!! see above.

#640

@AndyMcSchopf
Copy link

Hi rallep71,

i will check with your instructions tomorrow...

Danke Dir! ;-)

@AndyMcSchopf
Copy link

AndyMcSchopf commented Sep 24, 2020

Ok so the point is you need both - lime first boot wizard and the ubus-lime-fbw.
Then the Lime App is working - but every time you start it it wants to create a new network...

This whole behaviour changed in the last 2 weeks or so - I had older builds with an (more or less) working lime app without that ubus-lime-fbw... Hm

@AndyMcSchopf
Copy link

Update:
with the info mentioned here: https://github.com/libremesh/lime-packages/issues/640#issuecomment-558081082 I added option firstbootwizard_configured 'true' to lime-node.
Now the fbw is away and the configs need the knowledge of the root password.

@rallep71
Copy link
Author

hm, i have done the same now, but no difference, fbw is still there and the configuration can still be changed.

@rallep71
Copy link
Author

Hello,
I stand corrected, but what procedure...
with fbw first set something, rootpw, node..etc, then a short reboot, and only then change everything in luci e.g. mesh and ap encryption etc..

I can live with that for now :D

thx andy ;)

@AndyMcSchopf
Copy link

You're welcome ;-)
I solved the whole config thing with an lime-community and lime-node file compiled in the firmware (for each with own config like lime-node-mr18, lime-node-mx60, etc.) and then only rename on the router -> lime-config, lime-apply and voila...

@AndyMcSchopf
Copy link

BTW for the firstbootwizard_configured 'true' to work you have to reboot. For the most other things the lime-config and lime-apply commands are sufficiant...

@rallep71
Copy link
Author

you'll have to explain this to me again, because that's where I'm standing on the hose right now..

jetzt scheint batman nicht zu laufen, ich bekomme noch die krise...
batman

@AndyMcSchopf
Copy link

Ok short in german:

Ich habe die gesamte Konfiguration nicht über luci sondern über die Config-Files von libremesh gemacht.
Also auf der Konsole (ssh auf den node1) unter dem Verzeichnis /etc/config die Dateien lime-community und lime-node angepasst.
lime-community ist das config-File für alle nodes - und lime-node dann noch Node-spezifisch.
Wird hier genauer erklärt:
-> https://libremesh.org/docs/en_config.html

Wenn die angelegt sind wird über die Befehle lime-config die Konfiguration komplett automatisch gebaut und mit lime-apply direkt angewandt. Wie gesagt bei dem firstbootwizard kommt noch der reboot dazu.

Bei Bedarf kann ich dir auch meine zwei configs mal auflisten...

@rallep71
Copy link
Author

Danke Dir,
meine Fragen wären, die lime-community und die lime-node bestückst Du erst nach dem ersten Bootvorgang gemeinsam mit fbw auf true? dann lime-config + lime-apply und dann reboot?
hast Du die selbe feeds.conf wie ich? oder setzt du manuell wpad-mesh-wolfssl in menuconfig? um mesh zu verschlüsseln?

Sehr gerne würde ich mir deine Dateien ansehen, Danke Dir sehr!!

Thank you,
my questions would be, the lime-community and the lime-node you only populate after the first boot process together with fbw to true? then lime-config + lime-apply and then reboot?
do you have the same feeds.conf as me? or do you manually set wpad-mesh-wolfssl in menuconfig? to encrypt mesh?

I would love to have a look at your files, thank you very much!

@AndyMcSchopf
Copy link

Danke Dir,
meine Fragen wären, die lime-community und die lime-node bestückst Du erst nach dem ersten Bootvorgang gemeinsam mit fbw auf true? dann lime-config + lime-apply und dann reboot?

Jepp, genau so (bzw. kopieren der im image enthaltenen lime-community-myNet Datei auf lime-community, gleiches bei der node) ..

hast Du die selbe feeds.conf wie ich? oder setzt du manuell wpad-mesh-wolfssl in menuconfig? um mesh zu verschlüsseln?

feeds.conf analog der Dokumentation auf libremesh.org.
wpad-mesh-wolfssl setze ich im menuconfig.

Sehr gerne würde ich mir deine Dateien ansehen, Danke Dir sehr!!

Thank you,
my questions would be, the lime-community and the lime-node you only populate after the first boot process together with fbw to true? then lime-config + lime-apply and then reboot?

yes

do you have the same feeds.conf as me? or do you manually set wpad-mesh-wolfssl in menuconfig? to encrypt mesh?

feeds.conf as described on libremesh.org
wpad-mesh-wolfssl set in menuconfig

I would love to have a look at your files, thank you very much!

example of my lime-community file:

### System options

config lime system
        option hostname 'myNet-%M4%M5%M6'
        option domain   'myNet.local'

### Network general option

config lime network


### WiFi general options

config lime wifi
        option ap_ssid 'myNet'
        option ap_encryption 'sae-mixed'
        option ap_key '<key>'
        option apname_ssid 'myNet/%H'
        option apname_encryption 'sae-mixed'
        option apname_key '<key>'
        option adhoc_ssid 'myNet_adhoc'
        option ieee80211s_mesh_id 'myNet_mesh'
        option ieee80211s_encryption 'sae'       
        option ieee80211s_key '<key>'

Example for the lime-node on my MX60

config lime 'system'
        option hostname 'myNet-MX60'
	option firstbootwizard_configured 'true'

config lime 'network'

config lime 'wifi'

@rallep71
Copy link
Author

rallep71 commented Sep 24, 2020

Danke Dir, soweit verstanden.
noch ein paar Fragen:

lime-community >>

Network general option

config lime network

lässt Du leer, wird das von der default übernommen?

2,4 Ghz und 5Ghz Netzwerk wären dann identisch, oder hast du nur ein 2Ghz Netzwerk laut Deiner Config?
Ich hatte im Nachgang immer unterschieden, zwischen 2 und 5, z.b. HTMesh2G HTMesh2G/Node, HTMesh5G HTMesh5G/Node, auch Mesh hatte ich aufgeteilt, HTMesh2G und HTMesh5G,

Macht das überhaupt Sinn?

Thank you, so far understood.
a few more questions:

lime-community >>

Network general option

config lime network

if you leave it blank, will it be taken over by the default?

2.4 Ghz and 5Ghz network would be identical, or do you have only a 2Ghz network according to your config?
I had always distinguished between 2 and 5, e.g. HTMesh2G HTMesh2G/Node, HTMesh5G HTMesh5G/Node, I had also divided mesh, HTMesh2G and HTMesh5G,

Does that make any sense at all?

@spiccinini
Copy link
Contributor

spiccinini commented Sep 24, 2020

@rallep71 Yes, blanks in the config are configured using the lower hierarchy config. lime-node > lime-community > lime-defaults, these three files are compiled by lime-config in the file lime-autogen. Then this lime-autogen is what it is used to config the device.

Here is a work in progress (in spanish and a bit of english) docs for the config system: https://hackmd.io/CWm5MbwrToevK1-mLh4Y-Q?view I want to finalize it for the release but it may be useful for you as it is now.

Essids can be different or the same on 2.4 and 5ghz... depending on the use case. In our communities very few people have computers and phones with 5ghz so we use 5ghz only for the mesh and 2.4 ghz only for the wireless access to clients.

@germanferrero
Copy link
Contributor

#793 (comment) have been merged, so I close this issue. Feel free to re-open if necessary

@ilario
Copy link
Member

ilario commented Nov 1, 2020

I just tested and still got the same error. @germanferrero @spiccinini does it work for you?
I don't know anything of JS but looks like this error handling does not work:
https://github.com/libremesh/lime-app/blob/v0.2.10/src/utils/app.context.js#L84-L85

@ilario ilario reopened this Nov 1, 2020
@spiccinini
Copy link
Contributor

I just tested and still got the same error. @germanferrero @spiccinini does it work for you?
I don't know anything of JS but looks like this error handling does not work:
https://github.com/libremesh/lime-app/blob/v0.2.10/src/utils/app.context.js#L84-L85

I have tested and it is working for me. Maybe it is another part of the initialization that is failing to you?
I have this response {"jsonrpc":"2.0","id":4,"error":{"code":-32000,"message":"Object not found"}} to the the lime-fbw status call and the page shows no error.
Maybe the problem is other call?

@ilario
Copy link
Member

ilario commented Nov 1, 2020

I have tested and it is working for me.

So, lime-app is opening for you even without lime-fbw and ubus-lime-fbw?

Maybe it is another part of the initialization that is failing to you?
Maybe the problem is other call?

Nope, when I remove the call to _fetchFBWStatus in the JS code on the router, the lime-app stops complaining, and the same happens if I replace the content of _fetchFBWStatus with something always setting lock to whatever value.

I have this response {"jsonrpc":"2.0","id":4,"error":{"code":-32000,"message":"Object not found"}} to the the lime-fbw status call and the page shows no error.

I know how to test this just on the command line...

# ubus call lime-fbw status
Command failed: Not found

@spiccinini
Copy link
Contributor

spiccinini commented Nov 1, 2020 via email

@ilario
Copy link
Member

ilario commented Nov 7, 2020

I tested also on a second router: the fix does not work for me (I compiled the latest code using the instructions on the development page, no lime-fbw nor ubus-lime-fbw).

I checked and I can confirm that in my case the error is caused by the error handling here:
https://github.com/libremesh/lime-app/blob/v0.2.10/src/utils/app.context.js#L84-L85

I managed to compile lime-app and to deploy a locally modified version, but I know zero JS and I cannot find a way to fix this.

Can anyone else confirm if it works or if it does not? @rallep71 @AndyMcSchopf

@spiccinini
Copy link
Contributor

spiccinini commented Nov 8, 2020

I was able to reproduce it with 19.07. I think that we are hitting a bug in 19.07's uhttpd / rpcd / ubus.

Here is the request to lime-fbw, that as it is not installed is returning an error:
image

And then for some reason the next request gets a 0 size response from the node.
Screenshot_2020-11-08_17-50-51-19 07
This 0 size response is finally rising an error (it corresponds to the upgrade info request).

In 18.06 the 0 size response does not happen:
image

@ilario
Copy link
Member

ilario commented Nov 8, 2020

WOW!
Amazing @spiccinini! This is a huge step forward!
@aparcar @dangowrt does this sound like a known issue to you?

@ilario ilario added the OpenWrt 19.07 compatible Mark pull requests compatible with OpenWrt 19.07, would be nice to merge those before re-targetting label Nov 8, 2020
@AndyMcSchopf
Copy link

I tested also on a second router: the fix does not work for me (I compiled the latest code using the instructions on the development page, no lime-fbw nor ubus-lime-fbw).

I checked and I can confirm that in my case the error is caused by the error handling here:
https://github.com/libremesh/lime-app/blob/v0.2.10/src/utils/app.context.js#L84-L85

I managed to compile lime-app and to deploy a locally modified version, but I know zero JS and I cannot find a way to fix this.

Can anyone else confirm if it works or if it does not? @rallep71 @AndyMcSchopf

Well I have the "mystery" that i get the erromessage when using my iPhone - but not when connected by ethernet directly to the accesspoint...
There I can change (for example) the map - BUT I see anything on the status or the metrics page...

So I have to add this is tested on my netgear ex6130 with lime 20.09 and openwrt snapshot (today) and just another "problem" found....

@rallep71
Copy link
Author

rallep71 commented Nov 9, 2020

@AndyMcSchopf
Hi, I will be back for testing in the course of the week, had little time the last weeks

@AndyMcSchopf
Copy link

On my ex6150v2 with openwrt 19.04 it shows the error wired and wireless (compiled without fbw).

@spiccinini
Copy link
Contributor

I have investigated this issue a bit. I think that the problem is related to this uhttpd commit https://git.openwrt.org/?p=project/uhttpd.git;a=commit;h=975dce23257e713e5e52eb87b194513eb81110a5 that enables keep alive in post requests. The issue is then fixed byt https://git.openwrt.org/?p=project/uhttpd.git;a=blobdiff;f=client.c;h=6233d01cd43508c6a9f15026985da21abead8cce;hp=b5736e4b00fbd2bd66784b5b551ff2051ccb36f6;hb=0f38b0370718518e66dabeaa5522f546cb459393;hpb=88ba2fa7b414f3f63e66d1708f5bda9465e0ee89 that is in the master branch but not in the 19.07 branch. I tried appying the patch and building the package and it fixes the probem.
I don't know what is the procedure to backport this fixes to the 19.07 branch.

@spiccinini
Copy link
Contributor

Also configuring uhttpd with option http_keepalive '0' workarrounds the issue,

@spiccinini
Copy link
Contributor

I've opened https://bugs.openwrt.org/index.php?do=details&task_id=3443 in hope that the next 19.07 version is realeased with the fix.

@ilario
Copy link
Member

ilario commented Nov 16, 2020

Also configuring uhttpd with option http_keepalive '0' workarrounds the issue,

Waiting for the commit to be picked in OpenWrt 19.07, do you mind applying this workaround and adding it to the list of temporarily-needed code in #809?

@spiccinini
Copy link
Contributor

Also configuring uhttpd with option http_keepalive '0' workarrounds the issue,

Waiting for the commit to be picked in OpenWrt 19.07, do you mind applying this workaround and adding it to the list of temporarily-needed code in #809?

I am not sure about the side effects of this.

@ilario
Copy link
Member

ilario commented Nov 17, 2020

I am not sure about the side effects of this.

According to this comment from @jow- it should just slow down TLS, which would not be a real problem in our case.
https://forum.openwrt.org/t/massive-interface-lag-on-chrome-with-luci/56673/15

@ilario
Copy link
Member

ilario commented Nov 20, 2020

Seems that Jow solved for 19.07 branch, so it will be included in 19.07.5 :)
https://bugs.openwrt.org/index.php?do=details&task_id=3443
https://git.openwrt.org/a448ad7490

ilario added a commit to libremesh/libremesh.github.io that referenced this issue Nov 22, 2020
@ilario
Copy link
Member

ilario commented Nov 22, 2020

While we wait for 19.07.5 to be released, I edited the development page suggesting to use the openwrt-19.07 branch which already includes the fix: libremesh/libremesh.github.io@1185edd

@spiccinini
Copy link
Contributor

Great idea Ilario thanks

@spiccinini
Copy link
Contributor

With the latest web instructions (using 19.07 branch) it is working so I am closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug lime-app OpenWrt 19.07 compatible Mark pull requests compatible with OpenWrt 19.07, would be nice to merge those before re-targetting
Projects
None yet
Development

No branches or pull requests

7 participants