DJ2LS / FreeDATA

A free, open-source, multi-platform application for sending files and messages, using the codec2 HF modems
https://wiki.freedata.app/
GNU General Public License v3.0
137 stars 17 forks source link

[Bug]: Problem with Ubuntu 24.04 #748

Closed frspin closed 1 month ago

frspin commented 1 month ago

FreeDATA Version

Current develop branch from Github

What operating system are you using?

Ubuntu

Operating System Version

24.04 full updated

Architecture

x86

Area of problem

GUI

Describe the bug

Running server I am invited to do a npm i and npm run build in freedata_gui directory.

Doing this latest step I get a message error:

ERROR Failed to compile with 1 error 13:12:48

error in ./src/js/popupHandler.js

Module not found: Error: Can't resolve 'uuid' in '/mnt/Prog/ham_2404/FreeDATA/freedata_gui/src/js'

ERROR Error: Build failed with errors. Error: Build failed with errors. at /mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/@vue/cli-service/lib/commands/build/index.js:207:23 at /mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/webpack.js:168:8 at /mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/HookWebpackError.js:68:3 at Hook.eval [as callAsync] (eval at create (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/tapable/lib/Hook.js:18:14) at Cache.shutdown (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/Cache.js:156:23) at /mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/Compiler.js:1378:15 at Hook.eval [as callAsync] (eval at create (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/tapable/lib/Hook.js:18:14) at Compiler.close (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/Compiler.js:1371:23) at /mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/webpack.js:167:16 at finalCallback (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/Compiler.js:496:32) at /mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/Compiler.js:520:13 at Hook.eval [as callAsync] (eval at create (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/tapable/lib/HookCodeFactory.js:33:10), :24:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/tapable/lib/Hook.js:18:14) at onCompiled (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/Compiler.js:518:21) at /mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/Compiler.js:1349:17 at Hook.eval [as callAsync] (eval at create (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/tapable/lib/Hook.js:18:14) at /mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/Compiler.js:1345:33 at finalCallback (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/Compilation.js:2906:11) at /mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/Compilation.js:3215:11 at Hook.eval [as callAsync] (eval at create (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/tapable/lib/HookCodeFactory.js:33:10), :6:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/tapable/lib/Hook.js:18:14) at /mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/webpack/lib/Compilation.js:3208:38 at eval (eval at create (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1) at eval (eval at create (/mnt/Prog/ham_2404/FreeDATA/freedata_gui/node_modules/tapable/lib/HookCodeFactory.js:33:10), :14:1) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

After this obviously no GUI at all.

Another question:

With this solution (server is now starting GUI as WEB app) how can I start server only for usage with my alternative GUI?

Regards

Franco Spinelli

To Reproduce

go to freedata_gui dir do: npm run build

and get error as in description

Expected behavior

A compiled app for WEB GUI

Screenshots

No response

Log Files

No response

Additional context

No response

frspin commented 1 month ago

Some update to problem.

Running

npm install uuid

solve the problem and now building step for GUI complete with only some warnings

But running: FREEDATA_CONFIG=$HOME/.config/FreeDATA/config.ini python3 $serverdir/server.py > FreeDATA-server.log 2>&1 as in run-freedata-linux.sh don' t find compiled GUI.

Changing directory to freedata_server and running: FREEDATA_CONFIG=$HOME/.config/FreeDATA/config.ini python3 .r/server.py > FreeDATA-server.log 2>&1 is OK and GUI pop-up in Firefox as 127.0.0.1:5000/gui/

After this remain question on how can I start server without GUI.

And this new version don't exit with Ctrl C key

Franco Spinelli IW2DHW

DJ2LS commented 1 month ago

Hi @frspin please do another git pull, I added the missing uuid dependency., Please also download again the installation and runner scripts ( they are actually a work in progress )

wget -N https://raw.githubusercontent.com/DJ2LS/FreeDATA/develop/tools/Linux/install-freedata-linux.sh wget -N https://raw.githubusercontent.com/DJ2LS/FreeDATA/develop/tools/Linux/run-freedata-linux.sh

DJ2LS commented 1 month ago

The gui is actually opened automatically, but we can implement a setting for disabling this feature in future. For now I want to ensure it is working reliable, first, before implementing further features.

Also Ctrl-C should work meanwhile. Can you provide more information about this?

frspin commented 1 month ago

Il 23/07/24 14:26, DJ2LS ha scritto:

Hi @frspin https://github.com/frspin please do another git pull, I added the missing uuid dependency., Please also download again the installation and runner scripts ( they are actually a work in progress )

Done and UUID problem is solved

wget -N https://raw.githubusercontent.com/DJ2LS/FreeDATA/develop/tools/Linux/install-freedata-linux.sh https://raw.githubusercontent.com/DJ2LS/FreeDATA/develop/tools/Linux/install-freedata-linux.sh wget -N https://raw.githubusercontent.com/DJ2LS/FreeDATA/develop/tools/Linux/run-freedata-linux.sh https://raw.githubusercontent.com/DJ2LS/FreeDATA/develop/tools/Linux/run-freedata-linux.sh

This show

FREEDATA_CONFIG=$HOME/.config/FreeDATA/config.ini python3 $serverdir/server.py > FreeDATA-server.log 2>&1 &

as command for starting FD

But in server.py there is

source_gui_dir = "../freedata_gui/dist"

so, if you are in root directory, as in command suggested, GUI dir is not found. If you move to freedata_server directory and run python3 ./server.py all is working.

So you can change command for server starting or code in server.py as

source_gui_dir = "freedata_gui/dist"

Franco Spinelli IW2DHW

— Reply to this email directly, view it on GitHub https://github.com/DJ2LS/FreeDATA/issues/748#issuecomment-2245117366, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZJWG5YSDMI5GMOFNBTRFLZNZDWVAVCNFSM6AAAAABLKG4DXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBVGEYTOMZWGY. You are receiving this because you were mentioned.Message ID: @.***>

frspin commented 1 month ago

Il 23/07/24 14:29, DJ2LS ha scritto:

The gui is actually opened automatically, but we can implement a setting for disabling this feature in future. For now I want to ensure it is working reliable, first, before implementing further features.

Ok, I can wait for this!

Also Ctrl-C should work meanwhile. Can you provide more information about this?

Rigctld started by hand. FD server started from another terminal window

With Ctrl C I get

^C2024-07-23 14:34:15 [warning ] Client connection lost e=WebSocketDisconnect(1012) 2024-07-23 14:34:15 [warning ] Client connection lost e=WebSocketDisconnect(1012) 2024-07-23 14:34:15 [warning ] Client connection lost e=WebSocketDisconnect(1012) 2024-07-23 14:34:39 [info ] [DatabaseManagerBeacon]: Deleted 0 beacons older than 2 days

but server is still running.

Test system is Ubuntu 24.04

Franco Spinelli IW2DHW

— Reply to this email directly, view it on GitHub https://github.com/DJ2LS/FreeDATA/issues/748#issuecomment-2245122345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZJWG3CQWC7JFS3LAET2DLZNZEAZAVCNFSM6AAAAABLKG4DXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBVGEZDEMZUGU. You are receiving this because you were mentioned.Message ID: @.***>

DJ2LS commented 1 month ago

Thanks for the fix, I just pushed it 👍

The server needs some time, about 5 seconds to shutdown. Is it getting stuck ?

frspin commented 1 month ago

Il 23/07/24 14:42, DJ2LS ha scritto:

Thanks for the fix, I just pushed it 👍

The server needs some time, about 5 seconds to shutdown. Is it getting stuck ?

Done a git pull for latest update.

Now I get an error at startup

2024-07-23 14:45:55 [info ] [API] GET response_code=304 url=http://127.0.0.1:5000/gui/

and an error pop-up for few seconds. After this all is working but Cntrl C don't kill the server

^C2024-07-23 14:48:19 [warning ] Client connection lost e=WebSocketDisconnect(1012) 2024-07-23 14:48:19 [warning ] Client connection lost e=WebSocketDisconnect(1012) 2024-07-23 14:48:19 [warning ] Client connection lost e=WebSocketDisconnect(1012) 2024-07-23 14:48:19 [warning ] Client connection lost e=WebSocketDisconnect(1012) 2024-07-23 14:48:19 [warning ] Client connection lost e=WebSocketDisconnect(1012) 2024-07-23 14:48:19 [warning ] Client connection lost e=WebSocketDisconnect(1012)

and server is stuck forever until I kill with a kill -9 [server PID]

Franco Spinelli IW2DHW

— Reply to this email directly, view it on GitHub https://github.com/DJ2LS/FreeDATA/issues/748#issuecomment-2245149581, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZJWGYYICQOTH57VXUV6HLZNZFUTAVCNFSM6AAAAABLKG4DXSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBVGE2DSNJYGE. You are receiving this because you were mentioned.Message ID: @.***>

frspin commented 1 month ago

I have seen your latest addition to execution proc for Linux. You have changed CtrlC trapping SIGINT signal to a function which send a SIGINT to server and after this wait for 5 second. This don't solve the problem. I am not using your proc for starting the server but a kill -9 (SIGHUP) is required to terminate the server.

In version at starting of July CtrlC was working.

Franco Spinelli IW2DHW

DJ2LS commented 1 month ago

But even the server itself, running without the startup scripts, should be able, handling this. Could you do me the favor and checking if it sticks together with rigctld? What happens if you set "Vox" as radio settings? Does it then also getting stuck at shutdown?

DJ2LS commented 1 month ago

Ah yes, I can reproduce the shutdown problem. I have to check where it occurs

DJ2LS commented 1 month ago

@frspin can you confirm the problems still exist?

frspin commented 1 month ago

Last test was OK and shutdown was correct. More test needed.

Franco Spinelli

frspin commented 1 month ago

I can confirm than shutdown problem is solved.

A small problem with GUI on Firefox. I have Firefox already opened so GUI open a new tab in current Firefox. Sometime this new tab is opened before FreeDATA server is active and a reload of page is required.

Franco Spinelli IW2DHW

DJ2LS commented 1 month ago

Yes we need some delay between starting the server and opening the user interface