I have the same problem, what has helped me is to see the logs of both OCS and Apache, in my case, this is my result:
OCS log:
# cat /var/log/ocsinventory-server/activity.log
Thu Jan 5 14:01:44 2023;1297;321;NA;10.0.10.14;OCS-NG_Android_agent_v2.3.1;system;gzip
Thu Jan 5 14:01:44 2023;1297;103;android-f39668a53a671a62-2022-12-26-10-01-15;10.0.10.14;OCS-NG_Android_agent_v2.3.1;prolog;new_deviceid
Thu Jan 5 14:01:44 2023;1297;1001;android-f39668a53a671a62-2022-12-26-10-01-15;10.0.10.14;OCS-NG_Android_agent_v2.3.1;ipdiscover;checking if is enabled
Thu Jan 5 14:01:44 2023;1297;100;android-f39668a53a671a62-2022-12-26-10-01-15;10.0.10.14;OCS-NG_Android_agent_v2.3.1;prolog;accepted
Thu Jan 5 14:01:44 2023;1297;311;android-f39668a53a671a62-2022-12-26-10-01-15;10.0.10.14;OCS-NG_Android_agent_v2.3.1;session;started
Thu Jan 5 14:01:45 2023;1305;321;NA;10.0.10.14;OCS-NG_Android_agent_v2.3.1;system;gzip
Apache log:
# cat /var/log/apache2/error.log
[Thu Jan 05 12:43:06.385549 2023] [perl:error] [pid 1298] [client 10.0.10.14:56638] \nnot well-formed (invalid token) at line 76, column 18, byte 2248 at /usr/lib/x86_64-linux-gnu/perl5/5.32/XML/Parser.pm line 187.\nXML::Simple called at /usr/local/share/perl/5.32.1/Apache/Ocsinventory.pm line 220.\n
Do you have the same problem? If yes, please help me to fix mine, and if I find de fix first I'll help you