Ansuel / tch-nginx-gui

Modified file to apply to a stock technicolor GUI
GNU General Public License v3.0
340 stars 52 forks source link

HTTP 500 while trying to download a tcpdump #1112

Open ferrarimarco opened 2 years ago

ferrarimarco commented 2 years ago

NB: Before submitting an issue, check if there is one already open that suits the problem you are having!

Device Model/Firmware: DGA4130, AGTEF_2.2.1 GUI Version: 9.6.65-89342d7b

Please go to Cards >> GUI Settings >> Debug Report and press the Generate button. Attach the debug file here:

Description of problem, HOW TO REPRODUCE, Media/Photos:

After executing a tcpdump from the gui and saving the results in memory, I'm not able to download the tcpdump file. I get an HTTP 500 error.

In the nginx error log on the DGA 4130, I read:

2021/09/29 17:04:34 [error] 4792#0: *111 lua entry thread aborted: runtime error: [string "/modals/diagnostics-tcpdump-modal.lp"]:24: attempt to index local 't' (a nil value)
stack traceback:
coroutine 0:
    [string "/modals/diagnostics-tcpdump-modal.lp"]:24: in function <[string "/modals/diagnostics-tcpdump-modal.lp"]:15>
    (tail call): ?
    /usr/lib/lua/web/web.lua:101: in function 'process'
    content_by_lua(nginx.conf:108):4: in function <content_by_lua(nginx.conf:108):1>, client: 192.168.0.2, server: localhost, request: "POST /modals/diagnostics-tcpdump-modal.lp HTTP/1.1", host: "192.168
.0.1", referrer: "https://192.168.0.1/cards.lp"

Is that expected? In the tcpdump modal, I read:

'Download' will be invalid if nothing was captured.

Is this the case?

Thanks!

Edit: If it's the case, maybe it would be better to show an error message that explains what's wrong?