Sanook
December 6, 2016, 5:56am
1
Nextcloud 10.0.1 on Ubuntu 16.04, java 1.8.0_111
Nextant 0.10.4, OCRmyPDF 4.3.3, tesseract-ocr 3.04.01
####I ’ve installed it like this
apt-get install python3-pip
pip3 install --upgrade pip
apt-get install libffi-dev
pip3 install ocrmypdf
apt-get install tesseract-ocr tesseract-ocr-deu tesseract-ocr-deu-frak tesseract-ocr-eng tesseract-ocr-equ tesseract-ocr-osd
cd /var/www/nextcloud/apps
git clone https://github.com/janis91/ocr
chown -R www-data:www-data ocr
sudo -u www-data php /var/www/nextcloud/occ app:enable ocr
The output of the last line was
ocr enabled
sudo -u www-data php /var/www/nextcloud/occ app:list|grep ocr
- ocr: 1.0.0
But unfortunately now the hourglass runs forever on “Enabled Apps” in the apps settings.
I only can do a
sudo -u www-data php /var/www/nextcloud/occ app:disable ocr
This will bring back the “Enabled apps” page.
On the “Not enabled apps” page, now i have this:
Actually this is a weird behaviour, as it doesn’t come up for me, but it does for some other users. Are you sure that you have the latest nextcloud version installed?
Sanook
December 6, 2016, 2:25pm
3
Isn’t 10.0.1 the last version at the moment?
I think it is. But the problem is that I cannot reproduce the bug with my clone of the latest stable10 version from github/nextcloud.
Maybe I will give it one more try tomorrow. Sorry that I cannot help you atm.
janis91
December 7, 2016, 11:56am
5
Now I tested this weird thing and I assume this bug comes up because of the following:
Initially there has been a bug report for my ocr app 20th Sept which came up with the same behaviour.
After this i figured out, that my info.xml was likely newer than the nextcloud interpreter for the info.xml, although the official XSD file specified multiple language options as a possible solution.
I created this issue:
opened 02:15PM - 20 Sep 16 UTC
closed 05:06PM - 05 Oct 16 UTC
bug
<!--
Thanks for reporting issues back to Nextcloud! This is the issue tracker of… Nextcloud, if you have any support question please check out https://nextcloud.com/support
This is the bug tracker for the Server component. Find other components at https://github.com/nextcloud/
For reporting potential security issues please see https://nextcloud.com/security/
To make it possible for us to help you please fill out below information carefully.
-->
### Steps to reproduce
1. Install for example the next notes app from the appstore. (An app with language attribute and multiple name tags in the info.xml is required)
2. got to `/index.php/settings/apps?category=enabled#`
### Expected behaviour
I would expect the app list.
### Actual behaviour
Enabled site shows loading state forever.
### Server configuration
**Operating system**: Linux (Debian 8)
**Web server:** Php Test server
**Database:** Postgre 9.4
**PHP version:** 5.6
**Nextcloud version:** (see Nextcloud admin page)
11.0 alpha / but seems to be the same on 10 (because this [issue](https://github.com/janis91/nextnotes/issues/31) for my app was reported with version 10)
**Updated from an older Nextcloud/ownCloud or fresh install:**
no
**Where did you install Nextcloud from:**
git
The other topics of the report template are not necessary. I know the reason of the bug.
### Client configuration
**Browser:**
Firefox 45
**Operating system:**
Debian 8
### Logs
#### Web server error log
<details>
<summary>
Web server error log</summary>
```
[Tue Sep 20 15:43:20 2016] Array to string conversion at /server/settings/Controller/AppSettingsController.php#204
[Tue Sep 20 15:43:20 2016] Array to string conversion at /server/settings/Controller/AppSettingsController.php#203
```
</details>
#### Nextcloud log (data/nextcloud.log)
(I know the time of the webserver is set wrong, but it's the same call.)
<details>
<summary>
Nextcloud log</summary>
```
{"reqId":"I+cw\/09tssdKURXaW\/Fd","remoteAddr":"::1","app":"PHP","message":"Array to string conversion at \/server\/settings\/Controller\/AppSettingsController.php#204","level":0,"time":"2016-09-20T13:43:20+00:00","method":"GET","url":"\/index.php\/settings\/apps\/list?category=enabled&includeUpdateInfo=0","user":"admin"}
{"reqId":"I+cw\/09tssdKURXaW\/Fd","remoteAddr":"::1","app":"PHP","message":"Array to string conversion at \/server\/settings\/Controller\/AppSettingsController.php#203","level":0,"time":"2016-09-20T13:43:20+00:00","method":"GET","url":"\/index.php\/settings\/apps\/list?category=enabled&includeUpdateInfo=0","user":"admin"}
```
</details>
#### Browser log
Actually I don't know exactly if this has the same reason.
<details>
<summary>
Browser log</summary>
```
TypeError: t.charAt is not a function
OC.Util._chunkify()
js.js:1881
OC.Util.naturalSortCompare()
js.js:1904
OC.Settings.Apps<.loadCategory/this._loadCategoryCall<.success/<()
apps.js:103
OC.Settings.Apps<.loadCategory/this._loadCategoryCall<.success()
apps.js:100
n.Callbacks/j()
jquery.min.js:2
n.Callbacks/k.fireWith()
jquery.min.js:2
x()
jquery.min.js:4
.send/b/<()
```
</details>
#### Recommended Solution
I would recommend to change the necessary lines of code, which read the info.xml, because the defintion changed in some points [(info.xsd)](https://apps.nextcloud.com/schema/apps/info.xsd).
The reason of this specific bug is the following: in lines 203 and 204 (also 238/239 and maybe other lines as well) of the AppSettingsController.php (method: listApps) the tags of the info.xml are read.
```
$apps = $this->getInstalledApps($includeUpdateInfo);
usort($apps, function ($a, $b) {
$a = (string)$a['name'];
$b = (string)$b['name'];
if ($a === $b) {
return 0;
}
return ($a < $b) ? -1 : 1;
});
```
The new name tag's max occurrences number is unbounded as of the info.xsd:
`<xs:element name="name" type="l10n-string" minOccurs="1" maxOccurs="unbounded"/>`
Because of this the method has to be changed in a way, that supports multiple name tags. (l10n support)
_Maybe there are other occurrences and other interpreted tags as well, which have to be changed._
After this issue was fixed, tested and approved for NC10.0.1 I didn’t expect that this would still be a problem.
As of this I always referenced the mentioned issue and thought, that these people didn’t update correctly.
But I guess the problem is likely that the downloadable version of nextcloud from Download and install Nextcloud
isn’t up to date:
This is the information of the “OC_Build” Variable in the version.php:
2016-09-28T13:31:28+00:00 12ec1d1e3e5d90140e2afaca8afc3727dadeca1a
and this is kind of old. It might be one of the first 10.0.1 stable versions, but there have been a few backports and transifex-updates after that date. I guess that this is the reason, why many people still recognize this issue. The bugfix isn’t available in the download build. only in the stable10 git-branch it is available.
Maybe it is somone here, that can give some more information regarding this?
@LukasReschke I don’t know if you are the right person to contact. but maybe you are a good start point?
janis91
December 7, 2016, 12:11pm
6
Maybe it is planned to bring the 10.0.2 RC in to the downloads page after it is tested successfully. If this is right, I would suggest to wait for this update and just update nextcloud. Then it should work, I guess.