formcreator icon indicating copy to clipboard operation
formcreator copied to clipboard

An internal error has occurred

Open obreptice opened this issue 1 year ago • 5 comments

Hello everyone,

For some time now we have been experiencing a problem validating forms. A window appears with the message "An internal error has occurred. Please inform the administrator" But the ticket is still created. Debug mode does not display any messages

This is very disturbing, because after a few hours, the message no longer appears.

Here are the details retrieved from the Edge DevTools console:

scripts.js?v=ecad44e…364415cb25ccbb:1383 Uncaught TypeError: Cannot read properties of undefined (reading 'message') at Object. (scripts.js?v=ecad44e…415cb25ccbb:1383:38) at l (base.min.js?v=019c0d…f1452d8b0:186:25453) at Object.fireWith [as rejectWith] (base.min.js?v=019c0d…f1452d8b0:186:26272) at C (base.min.js?v=019c0d…f1452d8b0:186:80442) at XMLHttpRequest. (base.min.js?v=019c0d…f1452d8b0:186:82989)

Thanks,

obreptice avatar Dec 20 '24 12:12 obreptice

Hi

The backtrace should point to some JS code which handles a JSON formated message from the server. I think that something goes wring when the message is generated making it invalid. You should check if there is an error on php-errors.log or sql-errors.log (in folder glpi/files/_logs/ )

btry avatar Dec 20 '24 12:12 btry

Thanks for your answer, but I didn't find any message in the logs.

I forgot to specify the versions: GLPI : 10.0.17 Form Creator : 2.13.9

obreptice avatar Dec 20 '24 12:12 obreptice

Then you may try to oen developer tools of the browser. In tab "Nework" you will find a HTTP request to formanswer.form.php when you submit your answers.

Right click on it you will find a menu entry top copy the request as cURL. Do it, then paste pour clipboard to a terminal. Share the result of the command. It should show a JSON content; probably damaged by some output.

btry avatar Dec 20 '24 12:12 btry

The message has disappeared. Since I gave back the rights to "www-data" to the log files. Maybe the message comes from there.

Thanks a lot.

obreptice avatar Dec 20 '24 13:12 obreptice

Hello, Thanks ! I have the same issue, and yes, fix rights to /var/log/glpi for www-data resolved the problem.

sparadrus avatar Dec 20 '24 13:12 sparadrus