ownCloud Web 4.2: white page with js TypeError

I made a test installation ob the new web UI on two instances of 10.8, following the deployment docs from

https://owncloud.dev/clients/web/deployments/oc10-app/#deploying-owncloud-web

Both installations show a white page when switching to the new Web UI, browser console (FF) shows

09:54:37.656 TypeError: ye is null
    exec https://www.netzwissen.de/owncloud/index.php/apps/web/js/web-runtime-c4b02f9e.js:1
web-runtime-c4b02f9e.js:1:70416

owncloud.log has no further info, any idea how to debug this?

Thanks, Thommie

Hey Thommie, thanks for giving the new web frontend a try!
Could you please share your config.json file (please make sure to remove auth related details from it) and details about your auth related setup (oauth2 or oidc app enabled and configured? auth client configuration details?).

Hi Benedikt,

Config enclosed.

config.json.txt (1,0 KB)

I have two servers, www.netzwissen.de/owncloud/ is the productive 10.8 one using local auth with oauth2. owncloud2.netzwissen.de is a test instance with OIDC. In the end, this one shall authenticate against https://ucs-sso.netzwissen.de which is an univention UCS 5 instance with Kopano. owncloud2 is in the middle of configuration/debugging for the OIDC part. I am trying to set it up with help from @wkloucek (see talk.owncloud.com).

The web app is configured identically on both servers and on both I have the same error. Did I miss some config here? Shouldn’t be the web UI stuff independent from the type of auth method?

Drop the index.php from the server URL, then you should be good to go. The rest of the config looks fine.

The new web UI is not an integral part of the server anymore, but completely API driven and a real standalone client. You could serve it from any webserver. Because of this it needs to have the information about the auth server. The fact that we also release it as an ownCloud 10 app is to make it easier to set it up - and to lower the barrier of setting it up at all.

There is a ticket about getting a setup wizard for it. https://github.com/owncloud/web/issues/5560 Hope we’ll have time for that soonish.

I’ll add a note to the dev docs about the server URL. Of course only if you can confirm that it resolves the issue. :slight_smile:

Nope, " “server” : “https://owncloud2.netzwissen.de/”, " without index.php behind does not change anything, on both servers. But I see that a strange redirect to

https://xxx/index.php/apps/web/index.html#/

Is that hash and the slash behind the html correct?

Is this correct?

We want to switch to the history mode for routing in the near future. That will clear up the URL a bit. As of now it is correct.

I can see a comma after the onlyoffice path. Learnt the hard way myself that that’s not valid json (any last element in a nested json structure must have no trailing comma) and that it will explode during parsing. Could you remove it and check again?

If that doesn’t help either, please share the web.baseUrl from your config.php.

hm, the invalid json comes from the doc:

https://owncloud.dev/clients/web/deployments/oc10-app/#configure-owncloud-10

Make sure that ONLYOFFICE works as expected in the Classic UI and add the following to config.json to make it available in ownCloud Web:

"external_apps": [
    {
        "id": "onlyoffice",
        "path": "https://<your-owncloud-server>/apps/onlyoffice/js/web/onlyoffice.js",
    }
]

But I think you are right, if i throw the json into one of the online validators (e.g https://jsonlint.com/), there are a number of errors …

Hm, the ownCloud shows in the console:

21:36:13.893 Die Ressource von "https://www.netzwissen.de/owncloud/index.php/apps/files/" wurde wegen eines MIME-Typ-Konfliktes ("text/html") blockiert (X-Content-Type-Options: nosniff). 2 web
21:36:13.970 Laden fehlgeschlagen fĂĽr das <script> mit der Quelle "https://www.netzwissen.de/owncloud/index.php/apps/js/require.js". web:18:1
21:36:13.975 Uncaught ReferenceError: requirejs is not defined
    <anonymous> https://www.netzwissen.de/owncloud/index.php/apps/web:40
web:40:5

My personal oC10 instance is configured to not use index.php. I access Web on https://cloud.kloucek.io/apps/web/index.html#/files/list/all/. My Web config can be seen here: https://cloud.kloucek.io/apps/web/config.json.

On your instances the config.json does not load:

owncloud2.netzwissen.de provides oC Web when opening https://owncloud2.netzwissen.de/apps/web/index.html#/ but the config can not be loaded from https://owncloud2.netzwissen.de/apps/web/config.json

netzwissen.de/owncloud provides oC Web when opening
https://www.netzwissen.de/owncloud/apps/web/index.html#/ but the config file can also not be loaded from https://www.netzwissen.de/owncloud/apps/web/config.json.

Interestingly https://www.netzwissen.de/owncloud/index.php/apps/web/config.json and https://owncloud2.netzwissen.de/index.php/apps/web/config.json both give me an empty json (null).

You could try to run the occ command mentioned here again: Enable index.php-less URLs :: ownCloud Documentation

OK, but Deploy as an app in ownCloud 10 | ownCloud states that the json has to be placed in the config/ directory (in parallel with the general config.php), not in the /apps/web/ directory:

there are a few config values which need to be set in order for ownCloud Web to work correctly. Please copy the example config below into config/config.json and adjust it for your environment:

This would also explain why we see this

21:36:13.970 Laden fehlgeschlagen fĂĽr das <script> mit der Quelle "https://www.netzwissen.de/owncloud/index.php/apps/js/require.js". web:18:1

There is no /apps/js/ … path, only /apps/web/js/require.js . Something is wrong with the path references. Is this a misunderstanding on my side or just an error in the deployment documentation?

1 Like

I also followed the docs when configuring it on my instance, so they should work.

My config.json also is next to the config.php:

www-data@9a9f9fa50786: ~/owncloud/config # pwd
/var/www/owncloud/config

www-data@9a9f9fa50786: ~/owncloud/config # ls -lah
total 44K
drwxr-xr-x. 2 www-data root 4.0K Aug 13 08:58 .
drwxr-xr-x. 6 www-data root 4.0K Apr 29 08:53 ..
-rw-r--r--. 1 www-data root  836 Sep 16 21:33 config.json
-rw-r-----. 1 www-data root 1.8K Jul 22 10:18 config.php
-rw-r--r--. 1 www-data root 1.1K Feb 28  2021 objectstore.config.php
-rw-r--r--. 1 www-data root  19K Jun 21 06:10 overwrite.config.php
-rw-r--r--. 1 www-data root  346 Aug 13 09:09 web.config.php

ownCloud Web will serve the config.json from there. We cannot place it into the apps/web directory because this would make the integrity check fail.

This is the code that serves the config.json https://github.com/owncloud/web/blob/a330d27b7706118d974d219d6d30776e730907ed/packages/web-integration-oc10/lib/Controller/ConfigController.php#L62-L67

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.