I think replacing lines 40-48 in src/Plugin/MediaThumbnail/MediaThumbnailJp2.php with something like the following will address the issue. I'll see if I can create a fork and merge request with this change.
// Convert the JP2 to a thumbnail JPEG
$output=null;
$retval=null;
$cmd = "convert " . $path . " -resize " . $width . "x" . $width . " /tmp/" . $filename . ".jpg 2>&1";
exec($cmd, $output, $retval);
if ($retval !== 0) {
$this->logger->warning($output);
return NULL;
}
g011um → created an issue.
We're not using bat, fullcalendar or services. We have ctools installed but not enabled. HAL is installed and enabled.
We're primarily making use of JSON:API in core to create nodes from an external script. We do a POST to the "/node" URL, the node is created, but since upgrading from 10.1.7 to 10.2.0 the JSON response we get back is truncated. This seems to happen more frequently if we're creating a node with a formatted text field.
Our issues may not be related, but the fact that we are both seeing truncated JSON responses from Drupal after upgrading to 10.2.0 was enough that I thought I'd mention it.
We've been having issues creating nodes via REST/JSONAPI since upgrading to 10.2.0 (10.1.7 worked flawlessly) and in searching for help with that, I came across this issue. Our problem is very similar; we POST data to create a node, and the JSON response returned is missing a few characters at the end, including the final ]} which renders the response invalid.
So I'm wondering your this issue might be related, and if the root cause might not be with bat_api itself, but perhaps something more central to Drupal -- some service/module responsible for HTTP responses, streams or conversion of data to JSON; something that might truncate the response?
It's perhaps a shot in the dark, but I thought I'd mention it, just in case it helped in debugging this issue. Maybe it's not your code that's at fault, maybe it's something in Drupal itself.