Web UI: Redirecting Please wait a while. You are being redirected

Yes, I’m using apache.

I’ve tried many more times, but I always get the same problem again and again.
It seems to work, it authenticates, but then it gets stuck on this screen:

Screenshot from 2021-10-08 17-49-35

I cant’ see anything in the log file that is related to a possible issue with the configuration.

My app is behind an Nginx proxy which provides SSL etc, but runs using the official Docker image. Could it be the reverse proxy perhaps?

If @ivnmad or @Koaebk are using reverse proxies I’ll have a go removing mine to see what happens but if you aren’t then it clearly isn’t that.

I use HAproxy, not Nginx. Maybe there is a configuration in Nginx that is causing the problem.

Hmmm, I’ve updated to version 4.4.0 and I’m still getting this error in my console:

Uncaught (in promise) Invalid query, please check the syntax.

The error is coming from line 12 of vendor.js which is vuex v3.6.2 - however I suspect the bug isn’t in Vue itself but in whatever is using / calling it. From the stack trace that appears to be initAuth in web-runtime.js.

The only other thing in my Console are these:

UserManager.getUser: user loaded
web-runtime-03539e51.js:1 New User Loaded. access_token: xxxRemovedxxx, refresh_token: undefined
vendor-fee82cbd.js:57 UserManager.signinRedirectCallback: no sub

Is it correct that the refresh_token is undefined there?

Edit

Within initAuth the lines causing the issue for me are these (2294/2295):

const s = await i.users.getUserGroups(n.id)
  , r = await i.users.getUser(n.id);

It is at that point that I get this in my console: Uncaught (in promise) Invalid query, please check the syntax.

I indeed use a reverse proxy in nginx @bencgreen
This is my nginx conf, see attachement.

nginx_default.txt (5,7 KB)

@bencgreen I use a reverse proxy in Apache…

I can confirm that accessing my ownCloud installation directly (i.e. bypassing the proxy) results in the same error, suggesting to me that this has nothing to do with the proxy server.

Method:

  • Forward port 18795 to Docker container port 8080
  • Change URLs in config.json and config.php to point to http://192.168.1.104:18795
  • Login via new URL
  • Click ‘New Design’ link
  • Authorize application
  • Receive ‘Redirecting Please wait a while. You are being redirected.’ message

There is clearly something wrong here. I have tried deleting the web app and reinstalling it, I’ve gone through the instructions so many times my eyes hurt - I’m at a loss to know what to try next.

Check the network console with the web developer tools. There might be some request failing, so we’d need to know which one is it.

Thanks @jvillafanez - I already did in this post here.

What I want to know is if there is any request that could be returning a 404 or 500 or maybe it’s redirecting to a different place, when it was expected to return some valid information. This could be a possible cause of the malfunction.

Thanks @jvillafanez - no issues with requests:

That very request results in the errors I have detailed above:

Seems that your token is invalid. Error: DOMException: Aborted | web-runtime-03539e51.js:1:43855
Uncaught (in promise) TypeError: e is undefined | vendor-fee82cbd.js:57:51674
Uncaught (in promise) Invalid query, please check the syntax | vendor-fee82cbd.js:12:1367

Hey guys, not that it would help much but I installed owncloud the same way I did before but this time on ubuntu server instead on my raspbian and there my oweb configuration is working without any issues. :frowning:

New insight, It was working on ubuntu, as soon as I merged my old database/app folder to the new server it shows the same invalid query behaviour. So it has nothing to do with nginx/proxy or ubuntu it is indeed something in my files or database.

Thanks @Koaebk - that’s a great help narrowing it down. I’m now getting this with 5.1.0:

UserManager.getUser: user not found in storage
web-runtime-68d21e27.js:1  ownCloud Web UI 4.9.0 
web-runtime-68d21e27.js:1 New User Loaded. access_token: ***redacted***, refresh_token: undefined
vendor-62f8e512.js:52 UserManager.signinRedirectCallback: no sub
Uncaught (in promise) Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT:
/ocs/v2.php/apps/not…tions?format=json:1 
Failed to load resource: the server responded with a status of 502 ()
index.html#/oidc-cal…1b9454a7b5ed2996a:1 
Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0
    at parse (<anonymous>)

In the console with Chrome. I have had a look through my DB tables, and I can’t see anything that’s a likely candidate for causing this.

Here’s the latest after updating to Web 5.2.0. I scrubbed everything and started from scratch (again) using these instructions.

When I log in, I still get stuck at the ‘please wait, you are being redirected’ page. The console has this:

UserManager.getUser: user not found in storage
web-runtime-dde094f8.js:1 Failed to load theme 'https://.../themes/owncloud/theme.json' is not a valid json file, using default theme.
(anonymous) @ web-runtime-dde094f8.js:1
web-runtime-dde094f8.js:1 ownCloud Web UI 5.2.0 
web-runtime-dde094f8.js:1 New User Loaded. access_token:..., refresh_token: undefined
vendor-ee745c20.js:45 UserManager.signinRedirectCallback: no sub
vendor-ee745c20.js:6 Uncaught (in promise) Invalid query, please check the syntax.

It’s worth noting that the theme.json file is unmodified, and entirely valid json. I even copied the contents from here in case something was corrupted, but that didn’t work either.

If I remove the oidc-callback part of the URL and go instead to index.php/apps/web/index.html, I get the following:

UserManager.getUser: user loaded
web-runtime-dde094f8.js:1  ownCloud Web UI 5.2.0 
web-runtime-dde094f8.js:1  ownCloud 10.9.1 Community 
web-runtime-dde094f8.js:1  Invalid query, please check the syntax.

Two things to note however: 1 - the web version is now correct (it was stuck on 4.9.0 before, despite being 5.1.0 - I presume a caching issue); 2 - UserManager.getUser is now working!

However, the error I then get on the web page is:

Missing or invalid config
Please check if the file config.json exists and is correct.
Also, make sure to check the browser console for more information.

My config.json is in config/config.json, and is entirely valid JSON. Permissions look fine to me:

drwxrwxr-x 2 www-data root  4096 Mar 13 11:24 .
drwxr-xr-x 6 www-data root  4096 Feb 26 10:59 ..
-rw-rw-r-- 1 www-data root   771 Mar 13 11:19 config.json
-rw-r----- 1 www-data root  2237 Mar 13 11:10 config.php
-rw-rw-r-- 1 www-data root  1104 Mar 11  2021 objectstore.config.php
-rw-rw-r-- 1 www-data root 18658 Jun 18  2021 overwrite.config.php

I’ve been staring at it for ages but I can’t see anything wrong with the json file compared to the instruction page linked to above (I have removed my domain and client ID):

{
	"server": "https://...",
	"theme": "https://.../themes/owncloud/theme.json",
	"auth": {
		"clientId": "...",
		"url": "https://.../index.php/apps/oauth2/api/v1/token",
		"authUrl": "https://.../index.php/apps/oauth2/authorize"
	},
	"apps": [
		"files",
		"media-viewer",
		"draw-io"
	],
	"applications": [{
			"title": {
				"en": "Classic Design"
			},
			"icon": "swap-box",
			"url": "https://.../index.php/apps/files"
		},
		{
			"icon": "settings-4",
			"menu": "user",
			"target": "_self",
			"title": {
				"en": "Settings"
			},
			"url": "https://.../index.php/settings/personal"
		}
	]
}

I would say it has to be something in our database. I am pretty confident that there is nothing wrong with our config file nor anything else regarding the setup.

Maybe give it a try as I did before and setup a fresh instance of owncloud and see if it works.

Yup. Identical setup, but with a fresh database, it works fine. Logs in, loads new interface, etc. So it must be something in the database, or possibly an old file or something somewhere? Might try fiddling a bit, the only issue is I don’t want to stuff up my ownCloud, and there are GBs of files so copying / duplicating files takes a while!

1 Like

I had to wipe the data folder too, so the db was installed on startup. So I guess it could be something in there instead?