CollaboraOnline / richdocumentscode

Built-in CODE Server app
https://apps.nextcloud.com/apps/richdocumentscode
Apache License 2.0
119 stars 29 forks source link

build-in CODE not work on nextcloud 29.0.3 #279

Open JustinWuCN opened 3 months ago

JustinWuCN commented 3 months ago

my system is archlinux, setup nextcloud version is 29.0.3.

use command sudo -u nextcloud php -d memory_limit=512M occ app:install richdocumentscode_arm64 setup richdocumentscode sever. but it cannot edit office document.

check nextcloud.log, it show error like this:

{"reqId":"0rZYVw3VzSXJ5MUIvqfe","level":3,"time":"2024-08-01T10:12:08+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Trying to access array offset on null at /var/lib/nextcloud/apps/richdocuments/lib/Service/CachedRequestService.php#150","userAgent":"--","version":"29.0.3.4","data":{"app":"PHP"}}
{"reqId":"0rZYVw3VzSXJ5MUIvqfe","level":3,"time":"2024-08-01T10:12:08+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Trying to access array offset on null at /var/lib/nextcloud/apps/richdocuments/lib/Service/CachedRequestService.php#151","userAgent":"--","version":"29.0.3.4","data":{"app":"PHP"}}
{"reqId":"0rZYVw3VzSXJ5MUIvqfe","level":3,"time":"2024-08-01T10:12:08+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Trying to access array offset on null at /var/lib/nextcloud/apps/richdocuments/lib/Service/CachedRequestService.php#152","userAgent":"--","version":"29.0.3.4","data":{"app":"PHP"}}
{"reqId":"0rZYVw3VzSXJ5MUIvqfe","level":3,"time":"2024-08-01T10:12:08+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Trying to access array offset on null at /var/lib/nextcloud/apps/richdocuments/lib/Service/CachedRequestService.php#150","userAgent":"--","version":"29.0.3.4","data":{"app":"PHP"}}
{"reqId":"0rZYVw3VzSXJ5MUIvqfe","level":3,"time":"2024-08-01T10:12:08+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Trying to access array offset on null at /var/lib/nextcloud/apps/richdocuments/lib/Service/CachedRequestService.php#151","userAgent":"--","version":"29.0.3.4","data":{"app":"PHP"}}
{"reqId":"0rZYVw3VzSXJ5MUIvqfe","level":3,"time":"2024-08-01T10:12:08+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Trying to access array offset on null at /var/lib/nextcloud/apps/richdocuments/lib/Service/CachedRequestService.php#152","userAgent":"--","version":"29.0.3.4","data":{"app":"PHP"}}

the code:

125         private function isProxyStarting(): bool {
126                 $url = $this->appConfig->getValueString('richdocuments', 'wopi_url', '');
127                 $usesProxy = false;
128                 $proxyPos = strrpos($url, 'proxy.php');
129                 if ($proxyPos !== false) {
130                         $usesProxy = true;
131                 }
132 
133                 if ($usesProxy === true) {
134                         $statusUrl = substr($url, 0, $proxyPos);
135                         $statusUrl = $statusUrl . 'proxy.php?status';
136 
137                         $client = $this->clientService->newClient();
138                         $options = ['timeout' => 5, 'nextcloud' => ['allow_local_address' => true]];
139 
140                         if ($this->appConfig->getValueString('richdocuments', 'disable_certificate_verification') === 'yes') {
141                                 $options['verify'] = false;
142                         }
143 
144                         try {
145                                 $response = $client->get($statusUrl, $options);
146 
147                                 if ($response->getStatusCode() === 200) {
148                                         $body = json_decode($response->getBody(), true);
149 
150                                         if ($body['status'] === 'starting'
151                                                 || $body['status'] === 'stopped'
152                                                 || $body['status'] === 'restarting') {
153                                                 return true;
154                                         }
JustinWuCN commented 3 months ago

collabora version is Collabora Online Development Edition 24.04.5.2 ca2ed20

timur-g commented 5 days ago

This seems like ARM issue, for which there is long open #226. Please check.