Endless loading / error in user's notifications / tasks

Hi!
First of all: Thanks for your awesome work developing OJS. We are a small community-driven journal (Diamond OA for ten years), and are currently moving our editorial workflow to OJS. I love it!

I have two users experiencing the same problem: After logging in they are notified about new tasks/notifications. When clicking the notifications icon, the popup doesn’t show any task but only the little loading circle.

I found two or three older forum discussions with very similar problems. I suspect, that the problem might be similar (training submissions were deleted directly from the database). As these submissions have no value I saved backups and simply deleted all notifications from the database associated with those old (deleted) submissions. For one user this worked out. The other one still has the issue.

The server log reads:

2021-12-15 09:46:35	Access	93.228.232.208	200	GET /index.php/esp/$$$call$$$/page/page/tasks?_=1639557991675 HTTP/1.0	https://empirische-sonderpaedagogik.de/index.php/esp/submissions
2021-12-15 09:46:35	Error	93.228.232.208	500	GET /index.php/esp/$$$call$$$/grid/notifications/task-notifications-grid/fetch-grid?_=1639557991676 HTTP/1.0	https://empirische-sonderpaedagogik.de/index.php/esp/submissions

How can I figure out which notification / submission causes the problem? Is my assumption, that this is related to the database deletion of old submissions correct?

We’re on OJS 3.3.0.5 right now. Error occurs with different browsers (FF, Chromium, Edge)

Thanks in advance for your time!
timo

I suspect OJS is unable to reach a resource… and this usually happens when you have wrong mod_rewrite rules.

Do you mind to enable the dev tools in your favorite browser and check your network petitions and JS errors?

GET
scheme
	https
host
	empirische-sonderpaedagogik.de
filename
	/index.php/esp/$$$call$$$/grid/notifications/task-notifications-grid/fetch-grid
_
	1639579446283
Adresse
	185.233....
Status
500
Internal Server Error
VersionHTTP/1.1
Übertragen402 B (0 B Größe)
Referrer Policystrict-origin-when-cross-origin

That’s the only error message I can find. Could you explain to me what you mean by “network petitions”? Sorry

A 500 error should left some message in your server’s logs.
Do you mind to take a look, and if is long, anonymize and post it in pastebin?

BTW, are you behind a reverse proxy?
The “Policystrict-origin-when-cross-origin” is suspicious.

Could you explain to me what you mean by “network petitions”?

On every browser you have the “Inspect > Network” feature that shows the petitions and the resources you get from your server.

This is on Firefox:

Those are the errors and warnings that appear in the server log:

2021-12-16 15:18:11	Error	142....	500	GET /index.php/esp/$$$call$$$/grid/notifications/task-notifications-grid/fetch-grid HTTP/1.0		Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15	435 	Apache SSL/TLS access
2021-12-16 15:18:11	Warning	142....		mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/controllers/grid/notifications/TaskNotificationsGridHandler.inc.php:40				Apache error
2021-12-16 15:18:11	Warning	142....		mod_fcgid: stderr: Stack trace:				Apache error
2021-12-16 15:18:11	Warning	142....		mod_fcgid: stderr: #0 /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/classes/controllers/grid/GridHandler.inc.php(314): TaskNotificationsGridHandler->loadData(Object(Request), NULL)				Apache error
2021-12-16 15:18:11	Warning	142....		mod_fcgid: stderr: #1 /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1030): GridHandler->getGridDataElements(Object(Request))				Apache error
2021-12-16 15:18:11	Warning	142....		mod_fcgid: stderr: #2 /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/classes/controllers/grid/GridHandler.inc.php(921): GridHandler->renderGridBodyPartsInternally(Object(Request))				Apache error
2021-12-16 15:18:11	Warning	142....		mod_fcgid: stderr: #3 /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/classes/controllers/grid/GridHandler.inc.php(643): GridHandler->doSpecificFetchGridActions(Array, Object(Request), Object(TemplateManager))				Apache error
2021-12-16 15:18:11	Warning	142....		mod_fcgid: stderr: #4 /var/www/vhosts/empirische-sonderpaedagogik in /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/controllers/grid/notifications/TaskNotificationsGridHandler.inc.php on line 40				Apache error

and this from the Chrome inspector.
first entry:

GET /index.php/esp/$$$call$$$/page/page/tasks?_=1639663670396 HTTP/1.1
Host: empirische-sonderpaedagogik.de
Connection: keep-alive
sec-ch-ua: "Chromium";v="97", " Not;A Brand";v="99"
Accept: application/json, text/javascript, */*; q=0.01
X-Requested-With: XMLHttpRequest
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4673.0 Safari/537.36
sec-ch-ua-platform: "Windows"
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://empirische-sonderpaedagogik.de/index.php/esp/submissions
Accept-Encoding: gzip, deflate, br
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: OJSSID=83...
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 16 Dec 2021 14:29:01 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PleskLin
Content-Encoding: br

second entry:

GET /index.php/esp/$$$call$$$/grid/notifications/task-notifications-grid/fetch-grid?_=1639663670397 HTTP/1.1
Host: empirische-sonderpaedagogik.de
Connection: keep-alive
sec-ch-ua: "Chromium";v="97", " Not;A Brand";v="99"
Accept: application/json, text/javascript, */*; q=0.01
X-Requested-With: XMLHttpRequest
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4673.0 Safari/537.36
sec-ch-ua-platform: "Windows"
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://empirische-sonderpaedagogik.de/index.php/esp/submissions
Accept-Encoding: gzip, deflate, br
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: OJSSID=83...
HTTP/1.1 500 Internal Server Error
Server: nginx
Date: Thu, 16 Dec 2021 14:29:02 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive

I’m not sure if I understood your request. Sorry. :slight_smile: Thank you for your time and patience!
Yes, there’s the 500 in the server log, but that’s basically what I copied into my first post. That’s why I suspected, that this specific task named there is the cause of this.
Thanks for your help!
timo

Hi Timo,

Sorry a lot for the delay. I didn’t forget about you… it’s only that I’m a bit stuck.
I asked PKP for help. Hopefully they will answer between today and tomorrow.

Please, post your advances, if any.

With the info you posted, the only thing I found relevant to dig further is the 500 error due a missing getId() function. This is the only issue I found about this same error:

As you can see, in this post, the error is preceded by some warnings due ojs is unable to find files.
Do you have any warnings in your log?

Cheers,
m.

We had a similar situation with a few of our journals. There had been a suspicious submission made to several of our journals and our tech team removed them. If the journal editors had opened the submission before it was removed, they got the endless loading when they went to their Tasks because the notification couldn’t find the submission.

Our tech team fixed this by finding and removing the problematic notification for each editor affected.

Thank you for your time. That is indeed, what I suspect. Do you know how exactly they identified the tasks/notifications that cause the problem?
Cheers,
timo

Hi Marc, no worries! Thank you for your time.
No there are no other warnings/errors in my server log. The solution in the post you mentioned won’t work - I assume because the database structure changed during the updates. I get SQL errors for using “roles”. It seems that’s not an existing table anymore.
timo

Timo, did you manage to fix the issue? If not, please let us know to keep digging.

Cheers,
m.

Based on the error message shown, the fatal error is happening in this line:

That suggests to me that $user = $request->getUser() is returning null. However, that shouldn’t really be possible if the user is logged in. Perhaps something more drastic is happening. Do you see any other errors in your logs?

1 Like

Does it definitely refer to the user currently logged in (editor) which wouldn’t make much sense. Or could it be a user who acted as author or reviewer on the submission associated with this task? That would make sense, because we deleted some example submissions directly from the database (which I couldn’t regret more).

Best,
timo

This line:

$user = $request->getUser();

Gets the user who is currently logged in. If you are “logged in as” another user, it will be that user. I agree it doesn’t make a lot of sense. Can you check what line 40 is in that file on your server?

1 Like

both lines 36 and 40 are exactly the same on our server.

However, there are new error messages now (I recently updated to 3.3.0.8):

ate Type IP Code Message R Agent Size Source
2022-01-22 11:23:27 Access IP 200 GET /index.php/esp/$$$call$$$/page/page/tasks?_=1642846690571 HTTP/1.0 Einloggen | Empirische Sonderpädagogik Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0 1.11 K Apache SSL/TLS access
2022-01-22 11:23:27 Error IP 500 GET /index.php/esp/$$$call$$$/grid/notifications/task-notifications-grid/fetch-grid?_=1642846690572 HTTP/1.0 Einloggen | Empirische Sonderpädagogik Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0 577 Apache SSL/TLS access
2022-01-22 11:23:28 Warning IP mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to a member function getLocalizedTitle() on null in /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php:157, referer: Einloggen | Empirische Sonderpädagogik Apache error
2022-01-22 11:23:28 Warning IP mod_fcgid: stderr: Stack trace:, referer: Einloggen | Empirische Sonderpädagogik Apache error
2022-01-22 11:23:28 Warning IP mod_fcgid: stderr: #0 /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php(44): NotificationsGridCellProvider->_getTitle(Object(Notification)), referer: Einloggen | Empirische Sonderpädagogik Apache error
2022-01-22 11:23:28 Warning IP mod_fcgid: stderr: #1 /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/classes/controllers/grid/GridCellProvider.inc.php(56): NotificationsGridCellProvider->getCellActions(Object(Request), Object(GridRow), Object(GridColumn)), referer: Einloggen | Empirische Sonderpädagogik Apache error
2022-01-22 11:23:28 Warning IP mod_fcgid: stderr: #2 /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1102): GridCellProvider->render(Object(Request), Object(GridRow), Object(GridColumn)), referer: Einloggen | Empirische Sonderpädagogik Apache error
2022-01-22 11:23:28 Warning IP mod_fcgid: stderr: #3 /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1009): GridHandler->_renderCel in /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php on line 157, referer: Einloggen | Empirische Sonderpädagogik Apache error

Does that help?

That’s this line:

So that means it is trying to find a notification for a submission or submission file that doesn’t exist in the database. You’ll want to add an entry to your error log to identify the submission ID or submission file ID that is causing the problem:

// Add this just above line 157
if (is_null($submission)) {
    error_log($submissionId . '/' . $fileId);
}
1 Like

OK, thank you for walking me through this. :slight_smile:

|Date|Type|IP|Code|Message|R|Agent|Size|Source|
|---|---|---|---|---|---|---|---|---|
|2022-01-24 19:01:13|Access|IP|200|GET /index.php/esp/$$$call$$$/page/page/tasks?_=1643046852372 HTTP/1.0|https://empirische-sonderpaedagogik.de/index.php/esp/submissions|Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0|1.11 K|Apache SSL/TLS access|
|2022-01-24 19:01:13|Error|IP|500|GET /index.php/esp/$$$call$$$/grid/notifications/task-notifications-grid/fetch-grid?_=1643046852373 HTTP/1.0|https://empirische-sonderpaedagogik.de/index.php/esp/submissions|Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0|577 |Apache SSL/TLS access|
|2022-01-24 19:01:14|Warning|IP||mod_fcgid: stderr: 29/, referer: https://empirische-sonderpaedagogik.de/index.php/esp/submissions||||Apache error|
|2022-01-24 19:01:14|Warning|IP||mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to a member function getLocalizedTitle() on null in /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php:161, referer: https://empirische-sonderpaedagogik.de/index.php/esp/submissions||||Apache error|
|2022-01-24 19:01:14|Warning|IP||mod_fcgid: stderr: Stack trace:, referer: https://empirische-sonderpaedagogik.de/index.php/esp/submissions||||Apache error|
|2022-01-24 19:01:14|Warning|IP||mod_fcgid: stderr: #0 /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php(44): NotificationsGridCellProvider->_getTitle(Object(Notification)), referer: https://empirische-sonderpaedagogik.de/index.php/esp/submissions||||Apache error|
|2022-01-24 19:01:14|Warning|IP||mod_fcgid: stderr: #1 /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/classes/controllers/grid/GridCellProvider.inc.php(56): NotificationsGridCellProvider->getCellActions(Object(Request), Object(GridRow), Object(GridColumn)), referer: https://empirische-sonderpaedagogik.de/index.php/esp/submissions||||Apache error|
|2022-01-24 19:01:14|Warning|IP||mod_fcgid: stderr: #2 /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1102): GridCellProvider->render(Object(Request), Object(GridRow), Object(GridColumn)), referer: https://empirische-sonderpaedagogik.de/index.php/esp/submissions||||Apache error|
|2022-01-24 19:01:14|Warning|IP||mod_fcgid: stderr: #3 /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1009): GridHandler->_renderCel in /var/www/vhosts/empirische-sonderpaedagogik.de/httpdocs/jm/ojs/lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php on line 161, referer: https://empirische-sonderpaedagogik.de/index.php/esp/submissions||||Apache error|

Does that mean submission 29 (which is indeed a submission that has been deleted), is the bad boy?
The next step would be to got to the notifications table in the database and drop entries with assoc_id = 29?

Problem persists. I would be super grateful for any advice.
-timo