New User - First Login Hangs

Hi

I’m new to Nextcloud and not that familiar with PHP/Apache.

I have created new users – and when tried to login with the new users. The first time I try to login with a new account – it just keep saying logging in (spinning icon) – after some time I get Gateway Timeout. The next time I login with the account the problem is gone. What might be wrong?

Nextcloud version (eg, 20.0.5): 24.0.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.4
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.41
PHP version (eg, 7.4): 7.4.3

LOG

{"reqId":"QzYwSFa51vZ13Gkin71N"	level:3	time:"2022-05-26T07:11:39+00:00"	remoteAddr:"37.97.28.204"	user:"admin"	app:"index"	method:"GET"	url:"/"	message:"Argument 2 passed to OC\\Files\\Type\\Detection::__construct() must implement interface Psr\\Log\\LoggerInterface	 instance of OC\\Log given	 called in /var/www/html/lib/private/Server.php on line 1106"	userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"	version:"23.0.5.1"	exception:{"Exception":"TypeError"	Message:"Argument 2 passed to OC\\Files\\Type\\Detection::__construct() must implement interface Psr\\Log\\LoggerInterface	 instance of OC\\Log given	 called in /var/www/html/lib/private/Server.php on line 1106"	Code:0	Trace:[{"file":"/var/www/html/lib/private/Server.php"	line:1106	function:"__construct"	class:"OC\\Files\\Type\\Detection"	type:"->"}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:160	function:"OC\\{closure}"	class:"OC\\Server"	type:"->"	args:["*** sensitive parameters replaced ***"]}	{"file":"/var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php"	line:118	function:"OC\\AppFramework\\Utility\\{closure}"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"	args:["*** sensitive parameters replaced ***"]}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:127	function:"offsetGet"	class:"Pimple\\Container"	type:"->"}	{"file":"/var/www/html/lib/private/ServerContainer.php"	line:136	function:"query"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:56	function:"query"	class:"OC\\ServerContainer"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Storage/Local.php"	line:86	function:"get"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Storage/Home.php"	line:55	function:"__construct"	class:"OC\\Files\\Storage\\Local"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:167	function:"__construct"	class:"OC\\Files\\Storage\\Home"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:192	function:"createStorage"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:290	function:"getStorage"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Filesystem.php"	line:415	function:"getStorageRootId"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Filesystem.php"	line:341	function:"initMountPoints"	class:"OC\\Files\\Filesystem"	type:"::"}	{"file":"/var/www/html/lib/private/legacy/OC_Util.php"	line:342	function:"init"	class:"OC\\Files\\Filesystem"	type:"::"}	{"file":"/var/www/html/lib/base.php"	line:1031	function:"setupFS"	class:"OC_Util"	type:"::"}	{"file":"/var/www/html/index.php"	line:36	function:"handleRequest"	class:"OC"	type:"::"}]	File:"/var/www/html/lib/private/Files/Type/Detection.php"	Line:77	CustomMessage:"--"}}		
{"reqId":"QzYwSFa51vZ13Gkin71N"	level:3	time:"2022-05-26T07:11:39+00:00"	remoteAddr:"37.97.28.204"	user:"admin"	app:"PHP"	method:"GET"	url:"/"	message:"Error: Call to undefined method OCP\\Util::getScripts() at /var/www/html/lib/private/TemplateLayout.php#205"	userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"	version:"23.0.5.1"}																																																																																														
{"reqId":"aOgyuA0f106teUsfa9qB"	level:3	time:"2022-05-26T07:11:40+00:00"	remoteAddr:"37.97.28.204"	user:"admin"	app:"index"	method:"GET"	url:"/favicon.ico"	message:"Argument 2 passed to OC\\Files\\Type\\Detection::__construct() must implement interface Psr\\Log\\LoggerInterface	 instance of OC\\Log given	 called in /var/www/html/lib/private/Server.php on line 1106"	userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"	version:"23.0.5.1"	exception:{"Exception":"TypeError"	Message:"Argument 2 passed to OC\\Files\\Type\\Detection::__construct() must implement interface Psr\\Log\\LoggerInterface	 instance of OC\\Log given	 called in /var/www/html/lib/private/Server.php on line 1106"	Code:0	Trace:[{"file":"/var/www/html/lib/private/Server.php"	line:1106	function:"__construct"	class:"OC\\Files\\Type\\Detection"	type:"->"}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:160	function:"OC\\{closure}"	class:"OC\\Server"	type:"->"	args:["*** sensitive parameters replaced ***"]}	{"file":"/var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php"	line:118	function:"OC\\AppFramework\\Utility\\{closure}"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"	args:["*** sensitive parameters replaced ***"]}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:127	function:"offsetGet"	class:"Pimple\\Container"	type:"->"}	{"file":"/var/www/html/lib/private/ServerContainer.php"	line:136	function:"query"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:56	function:"query"	class:"OC\\ServerContainer"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Storage/Local.php"	line:86	function:"get"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Storage/Home.php"	line:55	function:"__construct"	class:"OC\\Files\\Storage\\Local"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:167	function:"__construct"	class:"OC\\Files\\Storage\\Home"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:192	function:"createStorage"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:290	function:"getStorage"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Filesystem.php"	line:415	function:"getStorageRootId"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Filesystem.php"	line:341	function:"initMountPoints"	class:"OC\\Files\\Filesystem"	type:"::"}	{"file":"/var/www/html/lib/private/legacy/OC_Util.php"	line:342	function:"init"	class:"OC\\Files\\Filesystem"	type:"::"}	{"file":"/var/www/html/lib/base.php"	line:1031	function:"setupFS"	class:"OC_Util"	type:"::"}	{"file":"/var/www/html/index.php"	line:36	function:"handleRequest"	class:"OC"	type:"::"}]	File:"/var/www/html/lib/private/Files/Type/Detection.php"	Line:77	CustomMessage:"--"}}		
{"reqId":"aOgyuA0f106teUsfa9qB"	level:3	time:"2022-05-26T07:11:40+00:00"	remoteAddr:"37.97.28.204"	user:"admin"	app:"PHP"	method:"GET"	url:"/favicon.ico"	message:"Error: Call to undefined method OCP\\Util::getScripts() at /var/www/html/lib/private/TemplateLayout.php#205"	userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"	version:"23.0.5.1"}																																																																																														
{"reqId":"eo7mI0yGbxMavNUVTe7L"	level:3	time:"2022-05-26T07:11:48+00:00"	remoteAddr:"37.97.28.204"	user:"admin"	app:"index"	method:"GET"	url:"/"	message:"Argument 2 passed to OC\\Files\\Type\\Detection::__construct() must implement interface Psr\\Log\\LoggerInterface	 instance of OC\\Log given	 called in /var/www/html/lib/private/Server.php on line 1106"	userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"	version:"23.0.5.1"	exception:{"Exception":"TypeError"	Message:"Argument 2 passed to OC\\Files\\Type\\Detection::__construct() must implement interface Psr\\Log\\LoggerInterface	 instance of OC\\Log given	 called in /var/www/html/lib/private/Server.php on line 1106"	Code:0	Trace:[{"file":"/var/www/html/lib/private/Server.php"	line:1106	function:"__construct"	class:"OC\\Files\\Type\\Detection"	type:"->"}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:160	function:"OC\\{closure}"	class:"OC\\Server"	type:"->"	args:["*** sensitive parameters replaced ***"]}	{"file":"/var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php"	line:118	function:"OC\\AppFramework\\Utility\\{closure}"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"	args:["*** sensitive parameters replaced ***"]}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:127	function:"offsetGet"	class:"Pimple\\Container"	type:"->"}	{"file":"/var/www/html/lib/private/ServerContainer.php"	line:136	function:"query"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:56	function:"query"	class:"OC\\ServerContainer"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Storage/Local.php"	line:86	function:"get"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Storage/Home.php"	line:55	function:"__construct"	class:"OC\\Files\\Storage\\Local"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:167	function:"__construct"	class:"OC\\Files\\Storage\\Home"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:192	function:"createStorage"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:290	function:"getStorage"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Filesystem.php"	line:415	function:"getStorageRootId"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Filesystem.php"	line:341	function:"initMountPoints"	class:"OC\\Files\\Filesystem"	type:"::"}	{"file":"/var/www/html/lib/private/legacy/OC_Util.php"	line:342	function:"init"	class:"OC\\Files\\Filesystem"	type:"::"}	{"file":"/var/www/html/lib/base.php"	line:1031	function:"setupFS"	class:"OC_Util"	type:"::"}	{"file":"/var/www/html/index.php"	line:36	function:"handleRequest"	class:"OC"	type:"::"}]	File:"/var/www/html/lib/private/Files/Type/Detection.php"	Line:77	CustomMessage:"--"}}		
{"reqId":"eo7mI0yGbxMavNUVTe7L"	level:3	time:"2022-05-26T07:11:48+00:00"	remoteAddr:"37.97.28.204"	user:"admin"	app:"PHP"	method:"GET"	url:"/"	message:"Error: Call to undefined method OCP\\Util::getScripts() at /var/www/html/lib/private/TemplateLayout.php#205"	userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"	version:"23.0.5.1"}																																																																																														
{"reqId":"F5hWvekw6rviCyrtHYtI"	level:3	time:"2022-05-26T07:11:51+00:00"	remoteAddr:"37.97.28.204"	user:"admin"	app:"index"	method:"GET"	url:"/"	message:"Argument 2 passed to OC\\Files\\Type\\Detection::__construct() must implement interface Psr\\Log\\LoggerInterface	 instance of OC\\Log given	 called in /var/www/html/lib/private/Server.php on line 1106"	userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"	version:"23.0.5.1"	exception:{"Exception":"TypeError"	Message:"Argument 2 passed to OC\\Files\\Type\\Detection::__construct() must implement interface Psr\\Log\\LoggerInterface	 instance of OC\\Log given	 called in /var/www/html/lib/private/Server.php on line 1106"	Code:0	Trace:[{"file":"/var/www/html/lib/private/Server.php"	line:1106	function:"__construct"	class:"OC\\Files\\Type\\Detection"	type:"->"}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:160	function:"OC\\{closure}"	class:"OC\\Server"	type:"->"	args:["*** sensitive parameters replaced ***"]}	{"file":"/var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php"	line:118	function:"OC\\AppFramework\\Utility\\{closure}"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"	args:["*** sensitive parameters replaced ***"]}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:127	function:"offsetGet"	class:"Pimple\\Container"	type:"->"}	{"file":"/var/www/html/lib/private/ServerContainer.php"	line:136	function:"query"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:56	function:"query"	class:"OC\\ServerContainer"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Storage/Local.php"	line:86	function:"get"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Storage/Home.php"	line:55	function:"__construct"	class:"OC\\Files\\Storage\\Local"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:167	function:"__construct"	class:"OC\\Files\\Storage\\Home"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:192	function:"createStorage"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:290	function:"getStorage"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Filesystem.php"	line:415	function:"getStorageRootId"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Filesystem.php"	line:341	function:"initMountPoints"	class:"OC\\Files\\Filesystem"	type:"::"}	{"file":"/var/www/html/lib/private/legacy/OC_Util.php"	line:342	function:"init"	class:"OC\\Files\\Filesystem"	type:"::"}	{"file":"/var/www/html/lib/base.php"	line:1031	function:"setupFS"	class:"OC_Util"	type:"::"}	{"file":"/var/www/html/index.php"	line:36	function:"handleRequest"	class:"OC"	type:"::"}]	File:"/var/www/html/lib/private/Files/Type/Detection.php"	Line:77	CustomMessage:"--"}}		
{"reqId":"F5hWvekw6rviCyrtHYtI"	level:3	time:"2022-05-26T07:11:51+00:00"	remoteAddr:"37.97.28.204"	user:"admin"	app:"PHP"	method:"GET"	url:"/"	message:"Error: Call to undefined method OCP\\Util::getScripts() at /var/www/html/lib/private/TemplateLayout.php#205"	userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"	version:"23.0.5.1"}																																																																																														
{"reqId":"nF9fEZe6RuSMsn36KFPr"	level:3	time:"2022-05-26T07:12:13+00:00"	remoteAddr:"37.97.28.204"	user:"admin"	app:"index"	method:"GET"	url:"/"	message:"Argument 2 passed to OC\\Files\\Type\\Detection::__construct() must implement interface Psr\\Log\\LoggerInterface	 instance of OC\\Log given	 called in /var/www/html/lib/private/Server.php on line 1106"	userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"	version:"23.0.5.1"	exception:{"Exception":"TypeError"	Message:"Argument 2 passed to OC\\Files\\Type\\Detection::__construct() must implement interface Psr\\Log\\LoggerInterface	 instance of OC\\Log given	 called in /var/www/html/lib/private/Server.php on line 1106"	Code:0	Trace:[{"file":"/var/www/html/lib/private/Server.php"	line:1106	function:"__construct"	class:"OC\\Files\\Type\\Detection"	type:"->"}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:160	function:"OC\\{closure}"	class:"OC\\Server"	type:"->"	args:["*** sensitive parameters replaced ***"]}	{"file":"/var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php"	line:118	function:"OC\\AppFramework\\Utility\\{closure}"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"	args:["*** sensitive parameters replaced ***"]}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:127	function:"offsetGet"	class:"Pimple\\Container"	type:"->"}	{"file":"/var/www/html/lib/private/ServerContainer.php"	line:136	function:"query"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:56	function:"query"	class:"OC\\ServerContainer"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Storage/Local.php"	line:86	function:"get"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Storage/Home.php"	line:55	function:"__construct"	class:"OC\\Files\\Storage\\Local"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:167	function:"__construct"	class:"OC\\Files\\Storage\\Home"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:192	function:"createStorage"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:290	function:"getStorage"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Filesystem.php"	line:415	function:"getStorageRootId"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Filesystem.php"	line:341	function:"initMountPoints"	class:"OC\\Files\\Filesystem"	type:"::"}	{"file":"/var/www/html/lib/private/legacy/OC_Util.php"	line:342	function:"init"	class:"OC\\Files\\Filesystem"	type:"::"}	{"file":"/var/www/html/lib/base.php"	line:1031	function:"setupFS"	class:"OC_Util"	type:"::"}	{"file":"/var/www/html/index.php"	line:36	function:"handleRequest"	class:"OC"	type:"::"}]	File:"/var/www/html/lib/private/Files/Type/Detection.php"	Line:77	CustomMessage:"--"}}		
{"reqId":"nF9fEZe6RuSMsn36KFPr"	level:3	time:"2022-05-26T07:12:13+00:00"	remoteAddr:"37.97.28.204"	user:"admin"	app:"PHP"	method:"GET"	url:"/"	message:"Error: Call to undefined method OCP\\Util::getScripts() at /var/www/html/lib/private/TemplateLayout.php#205"	userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"	version:"23.0.5.1"}																																																																																														
{"reqId":"j6GzA7v0EYggn9bL6ME5"	level:3	time:"2022-05-26T07:12:17+00:00"	remoteAddr:"37.97.28.204"	user:"admin"	app:"index"	method:"GET"	url:"/"	message:"Argument 2 passed to OC\\Files\\Type\\Detection::__construct() must implement interface Psr\\Log\\LoggerInterface	 instance of OC\\Log given	 called in /var/www/html/lib/private/Server.php on line 1106"	userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"	version:"23.0.5.1"	exception:{"Exception":"TypeError"	Message:"Argument 2 passed to OC\\Files\\Type\\Detection::__construct() must implement interface Psr\\Log\\LoggerInterface	 instance of OC\\Log given	 called in /var/www/html/lib/private/Server.php on line 1106"	Code:0	Trace:[{"file":"/var/www/html/lib/private/Server.php"	line:1106	function:"__construct"	class:"OC\\Files\\Type\\Detection"	type:"->"}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:160	function:"OC\\{closure}"	class:"OC\\Server"	type:"->"	args:["*** sensitive parameters replaced ***"]}	{"file":"/var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php"	line:118	function:"OC\\AppFramework\\Utility\\{closure}"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"	args:["*** sensitive parameters replaced ***"]}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:127	function:"offsetGet"	class:"Pimple\\Container"	type:"->"}	{"file":"/var/www/html/lib/private/ServerContainer.php"	line:136	function:"query"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"}	{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php"	line:56	function:"query"	class:"OC\\ServerContainer"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Storage/Local.php"	line:86	function:"get"	class:"OC\\AppFramework\\Utility\\SimpleContainer"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Storage/Home.php"	line:55	function:"__construct"	class:"OC\\Files\\Storage\\Local"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:167	function:"__construct"	class:"OC\\Files\\Storage\\Home"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:192	function:"createStorage"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Mount/MountPoint.php"	line:290	function:"getStorage"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Filesystem.php"	line:415	function:"getStorageRootId"	class:"OC\\Files\\Mount\\MountPoint"	type:"->"}	{"file":"/var/www/html/lib/private/Files/Filesystem.php"	line:341	function:"initMountPoints"	class:"OC\\Files\\Filesystem"	type:"::"}	{"file":"/var/www/html/lib/private/legacy/OC_Util.php"	line:342	function:"init"	class:"OC\\Files\\Filesystem"	type:"::"}	{"file":"/var/www/html/lib/base.php"	line:1031	function:"setupFS"	class:"OC_Util"	type:"::"}	{"file":"/var/www/html/index.php"	line:36	function:"handleRequest"	class:"OC"	type:"::"}]	File:"/var/www/html/lib/private/Files/Type/Detection.php"	Line:77	CustomMessage:"--"}}		
{"reqId":"j6GzA7v0EYggn9bL6ME5"	level:3	time:"2022-05-26T07:12:17+00:00"	remoteAddr:"37.97.28.204"	user:"admin"	app:"PHP"	method:"GET"	url:"/"	message:"Error: Call to undefined method OCP\\Util::getScripts() at /var/www/html/lib/private/TemplateLayout.php#205"	userAgent:"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"	version:"23.0.5.1"}																

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => 'redacted,
  'secret' => 'redacted',
  'trusted_domains' => 
  array (
    0 => 'redacted',
    1 => 'redacted',
  ),
  'datadirectory' => '/home/nextclouddata',
  'dbtype' => 'mysql',
  'version' => '24.0.1.1',
  'overwrite.cli.url' => 'redacted',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'redacted',
  'dbpassword' => 'redacted',
  'installed' => true,
  'instanceid' => 'redacted',
  'htaccess.RewriteBase' => '/',
  'maintenance' => false,
  'loglevel' => 1,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'redacted',
  'mail_from_address' => 'staging-d',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'redacted',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'redacted',
  'mail_smtppassword' => 'redacted',
  'theme' => '',
  'default_language' => 'da',
  'default_locale' => 'da_DK',
  'default_phone_region' => 'DK',
);

The output of your Apache/nginx/system log in /var/log/____:

[Thu May 26 00:00:01.536440 2022] [mpm_event:notice] [pid 23235:tid 139916658105408] AH00489: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Thu May 26 00:00:01.536471 2022] [core:notice] [pid 23235:tid 139916658105408] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 26 06:45:44.438364 2022] [proxy_fcgi:error] [pid 72165:tid 139916304013056] (70007)The timeout specified has expired: [client 37.97.28.204:58245] AH01075: Error dispatching request to : (polling)
[Thu May 26 07:00:27.884551 2022] [mpm_event:notice] [pid 23235:tid 139916658105408] AH00491: caught SIGTERM, shutting down
[Thu May 26 07:00:44.557930 2022] [mpm_event:notice] [pid 740:tid 139809724476480] AH00489: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Thu May 26 07:00:44.558808 2022] [core:notice] [pid 740:tid 139809724476480] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 26 07:12:37.829587 2022] [mpm_event:notice] [pid 740:tid 139809724476480] AH00491: caught SIGTERM, shutting down
[Thu May 26 07:12:53.075816 2022] [mpm_event:notice] [pid 711:tid 139876549622848] AH00489: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f configured -- resuming normal operations
[Thu May 26 07:12:53.076378 2022] [core:notice] [pid 711:tid 139876549622848] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 26 07:23:25.215237 2022] [proxy_fcgi:error] [pid 712:tid 139875567249152] (70007)The timeout specified has expired: [client 37.97.28.204:53812] AH01075: Error dispatching request to : (polling)

I think I have found the problem. I have installed the app. Antivirus for files. When I changed the mode to ClamAV Daemon (Socket) from ClamAV Executable - it does not hang - it take a few seconds to login.