Lua source code for Luci modification doesnt change anything

I'm trying to emulate a firmware with chroot in docker for qemu architecture.
The firmware that I'm trying to emulate use openwrt and have an uhtttpd server that use luci in lua.
I have no idea why,but when I'm connecting to the web interface with the root password the login works but I get the following error :

/usr/lib/lua/luci/dispatcher.lua:448: Failed to execute function dispatcher target for entry '/'.
The called action terminated with an exception:
/usr/lib/lua/luci/sauth.lua:60: Security Exception: Session ID is invalid!
stack traceback:
	[C]: in function 'assert'
	/usr/lib/lua/luci/dispatcher.lua:448: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:195: in function </usr/lib/lua/luci/dispatcher.lua:194>

I have no idea from where come the problem since I know nothing about this technology but I tried to remove the assert in this file and restart the server but nothing change.
I guess the code is compiled somehow but I cant find how to compile it and execute the modified code.

I wonder if you know a way to make my changes work in the webserver ?
Or even better would you know a way to make my emulated firmware work as a real device ?

@Neolex-Security, welcome to the community!

Hello, thank you !
I'm not sure what should I do exactly though ?
My firmware image squashfs filesystem have nothing in /root except "/rom/note"