Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HomePage Loading Circle #820

Closed
nunofmds opened this issue Apr 27, 2020 · 40 comments
Closed

HomePage Loading Circle #820

nunofmds opened this issue Apr 27, 2020 · 40 comments
Labels
1. to develop bug Something isn't working

Comments

@nunofmds
Copy link

Steps to reproduce

  1. Login and open homepage

Expected behaviour

Circle progress should disappear after work done

Actual behaviour

Circle progress always spinning

Server configuration

Operating system: Docker Image

Web server: Docker Image

Database: Latest

PHP version: Latest

Nextcloud version: (see Nextcloud admin page)
Nextcloud 18.0.4

Updated from an older Nextcloud/ownCloud or fresh install:
Updated from Nextcloud 18.0.3

Where did you install Nextcloud from:
Docker Image

2020-04-27 15_56_24-Files - Nextcloud

@kesselb
Copy link
Contributor

kesselb commented Apr 27, 2020

Thanks for reporting 👍

Added the "needs info" label because without server and client logs (as described in the issue template) it's impossible to figure out whats wrong.

@nunofmds
Copy link
Author

What more info you need? This seems to be on the client side not on the server side... Javascript maybe?

2020-04-27 18_12_15-Inbox - nunosilva2003@hotmail com - Outlook

@keagster
Copy link

Also getting this error after a clean install on ubuntu server.

  • Console shows TypeError: t.response.data.ocs is undefined
  • Error coming from RichWorkspace.vue
    It hits the catch from the axiom.get and on line 139 this error comes through when running
  • const data = error.response.data.ocs.data

Gone through and checked all libs and installation requirements are met and config is correct.

@keagster
Copy link

Okay traced this and if no README.md is located in the directory you are in this loading circle will just sit there.

  • This rich workspace option should 100% not be turned on by default
  • Condition required if README.md or *.md not in DIR then disable richworkspace view
    That would allow default on to remain without causing people issues.

@kesselb
Copy link
Contributor

kesselb commented May 12, 2020

Mind to check your network tab and share the failing xhr request?

@nunofmds
Copy link
Author

nunofmds commented May 12, 2020

«
2020-05-12 10_30_55-Window

@kesselb kesselb transferred this issue from nextcloud/server May 12, 2020
@kesselb kesselb added 0. Needs triage bug Something isn't working labels May 12, 2020
@kesselb
Copy link
Contributor

kesselb commented May 12, 2020

404 is the correct response if there is no README.md found. Yeah it's a bad choice (because the webserver will log it).

It works fine over here. 404 response, spinner is gone.

@nunofmds
Copy link
Author

The spinner is still there...

@nunofmds
Copy link
Author

2020-05-12 10_38_24-Window

@kesselb
Copy link
Contributor

kesselb commented May 12, 2020

The response for the failing xhr request is?

@nunofmds
Copy link
Author

404 !? Where is the property "data"?

@kesselb
Copy link
Contributor

kesselb commented May 12, 2020

image

Click on Response ...

@nunofmds
Copy link
Author

image

@kesselb
Copy link
Contributor

kesselb commented May 12, 2020

You disabled the text app?

@nunofmds
Copy link
Author

image

It is enabled and I can use it to edit md txt files...

@kesselb
Copy link
Contributor

kesselb commented May 12, 2020

Anything in nextcloud.log?

Actually logs, configuration and apps are already part of the issue template and I already added the "needs info" label earlier because those information are missing. You see there is a reason we ask that information.

Any chance that your webserver is changing the response? The response should not be empty and have response data.

@nunofmds
Copy link
Author

Just did a tail -f /data/nextcloud.log and nothing new appears even after a force CTRL+F5 on the page

@kesselb
Copy link
Contributor

kesselb commented May 12, 2020

Request for a folder without readme.md

curl --location --request GET 'https://nextcloud.test/ocs/v2.php/apps/text/workspace?path=%2F' \
--header 'OCS-APIRequest: true' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='
<?xml version="1.0"?>
<ocs>
    <meta>
        <status>failure</status>
        <statuscode>404</statuscode>
        <message/>
    </meta>
    <data>
        <message>No workspace file found</message>
        <folder>
            <permissions>31</permissions>
        </folder>
    </data>
</ocs>

Request for a folder with README.md

curl --location --request GET 'https://nextcloud.test/ocs/v2.php/apps/text/workspace?path=%2FTalk' \
--header 'OCS-APIRequest: true' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='
<?xml version="1.0"?>
<ocs>
    <meta>
        <status>ok</status>
        <statuscode>200</statuscode>
        <message>OK</message>
    </meta>
    <data>
        <file>
            <id>2752</id>
            <mimetype>text/markdown</mimetype>
            <name>Readme.md</name>
        </file>
        <folder>
            <permissions>31</permissions>
        </folder>
    </data>
</ocs>

Is the text app disabled there are no such requests. If one needs a test instance to compare the requests / responses: https://try.nextcloud.com/. Looks like a configuration issue to me. We probably need more information to investigate further.

@nunofmds
Copy link
Author

Confirmed. If i disable text app it's ok! What config do you refer? I never configured nothing for the text app...

@kesselb
Copy link
Contributor

kesselb commented May 12, 2020

What config do you refer?

I suspect that your webserver changes the response. The code does not check if the response is the expected response. It's assumed that the 404 response contains data. Should be possible to check this. But the actual issue is your configuration / webserver changing the 404 response.

@nunofmds
Copy link
Author

Ok...strange this didnt happen before the latest update. I'm running nextcloud docker image...

@shelterx
Copy link

shelterx commented May 13, 2020

Same issue here after upgrading to 18.0.4, running behind nginx "proxy" and a standard next cloud install on the other end.
This was not a problem in 18.0.3.

EDIT: Disabling the text app makes the spinner disappear.
EDIT2: Creating README.md also makes the spinner disappear when text app is enabled.
[/data/user/files]# touch README.md

@shelterx
Copy link

I ended up turning off rich workspace for now.
occ config:app:set text workspace_available --value=0

@juliushaertl
Copy link
Member

I cannot reproduce this. Please try to provide the output of the requests that @kesselb provided.

@shelterx
Copy link

It's the result as @nunofmds got, 404 code with empty response,
I also tried this and it didn't output anything at all:
curl -u 'userhidden:passwordhidden' --location --request GET 'https://sitehidden/ocs/v2.php/apps/text/workspace?path=%2F' --header 'OCS-APIRequest: true'

@juliushaertl
Copy link
Member

Can you run it with -v to get the http headers as well?

@shelterx
Copy link

*   Trying 12.34.56.78:443...
* Connected to hiddensite.cloud (12.34.56.78) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: CN=*.hiddensite.cloud
*  start date: Mar 24 12:26:07 2020 GMT
*  expire date: Jun 22 12:26:07 2020 GMT
*  subjectAltName: host "hiddensite.cloud" matched cert's "*.hiddensite.cloud"
*  issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
*  SSL certificate verify ok.
* Server auth using Basic with user 'hiddenuser'
> GET /ocs/v2.php/apps/text/workspace?path=%2F HTTP/1.1
> Host: hiddensite.cloud
> Authorization: Basic Dmlja2FnZDohMKRhbGwtYWxsXDEh
> User-Agent: curl/7.69.1
> Accept: */*
> OCS-APIRequest: true
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Server: nginx
< Date: Fri, 15 May 2020 15:30:56 GMT
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Keep-Alive: timeout=20
< Vary: Accept-Encoding
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
< Set-Cookie: oc_sessionPassphrase=LE9WCuAy3yxz%2FR3DHKXwIQb9byXi9PaZPAuHYV%2FJM30MKHGFxJa4ToRoo1t2ZPQkYda6S85dHQh3ncS2%2Be1S5KiR3BXiZiMOe0LAH2j3bHxpGto0ApUNE3hqOpLywh%2Fd; path=/; secure; HttpOnly
< Content-Security-Policy: default-src 'self'; script-src 'self' 'nonce-WWZZWTE3bVFiN3FOa3NKNDRhY3IrRVZnZDErbzc2R0tMaEZncGZVdFNlOD06R2J0cHBORC9Kczc1NFlGUDJOWlNxM0luQURybHU5blpURlpSaXJOWERhYz0='; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';
< Set-Cookie: __Host-nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
< Set-Cookie: __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
< Set-Cookie: oclxr7es4g6u=bb0503b21dbf092aa2f551044c035b47; path=/; secure; HttpOnly
< Set-Cookie: cookie_test=test; expires=Fri, 15-May-2020 16:31:13 GMT; Max-Age=3600
< Location: https://hiddensite.cloud/apps/files/

@RealKelsar
Copy link

Hi,
in my Nginx config I had:

error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;

Removing those, which are no longer in the provided Nginx configuration fixes the Issue for me.

Kind Regards

@juliushaertl
Copy link
Member

Ok, yes that would explain it. Basically if the workspace returns a 404 because there is no readme file yet for that directory your nginx is trying to hand out an error page that does not exist anymore and therefore it redirects to the files app itself, which we cannot handle as the text app.

Maybe we can add some hardening to not fail in such a redirect case.

@shelterx
Copy link

shelterx commented May 20, 2020

Hi,
in my Nginx config I had:

error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;

Removing those, which are no longer in the provided Nginx configuration fixes the Issue for me.

Kind Regards

Nice find! I had that setting too and after removing it, the spinning circle is gone.
I guess I have update me on how nextcloud recommend setting up ngnix, I noticed the error_page settings are not mentioned anymore in the documentation.

@juliushaertl
Copy link
Member

As @kesselb suggested it might worth to move away from returning a 404 here and rather use a 2xx status code or even get rid of the /workspace endpoint and use the custom dav property we already have for mobile integration instead.

@TheManchineel
Copy link

Hi,
in my Nginx config I had:

error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;

Removing those, which are no longer in the provided Nginx configuration fixes the Issue for me.

Kind Regards

Wow, amazing that this solved it for me! How did you find it?

Thanks a lot

@nunofmds
Copy link
Author

For thoose that use linuxserver/nextcloud docker image the nginx config file is on

/config/nginx/site-confs/default

edit the file and comment

error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;

restart the docker and should be fixed... worked for me as well...

Thanks!

@juliushaertl
Copy link
Member

Let's keep that open to track the improvements suggested from #820 (comment)

@juliushaertl juliushaertl reopened this May 22, 2020
@dysonsphere-startmail
Copy link

Had the same issue. Ubuntu 20.04, nginx.

Disabling Rich Workspaces also gets rid of the spinning wheel. But neither of these is a fix.

Creating a Readme.md file in a directory ends the spinning wheel and loads the "Add notes, lists or links..." dialogue.

However, commenting out the following lines in /etc/nginx/conf.d/nextcloud.conf

error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;

Did the trick.
After this edit of nextcloud.conf the rich workspace dialogue loads on the top of the files page in all directories with, or without, a Readme.md file present.

@aptalca
Copy link

aptalca commented May 22, 2020

linuxserver.io team member here

Those were removed from our default site conf well over a year ago, for Nextcloud v15: linuxserver/docker-nextcloud@39fd8e3#diff-cab6a3a029fd4edc2e44acec10375bdcL44-L45

Our changelog includes notes about existing users having to delete the default site conf and restart the container to update whenever there is a change such as this one: 18.11.19: - Nginx default site config updated for v17 (existing users should delete /config/nginx/site-confs/default and restart the container).
We don't automatically update it because that file is user customizable and we don't want to overwrite any user customizations

@rriclet
Copy link

rriclet commented Oct 14, 2020

Same issue with apache server from https://github.com/nextcloud/docker

When a folder is opened, I get a 404 with the message "No workspace file found".

You seem to have found a solution for Nginx, I am using apache and still searching for a solution.
Do you know where the equivalent of /etc/nginx/conf.d/nextcloud.conf for an apache server could be located ?

@vesector
Copy link

Any solution besides disabling rich workspace for snap users? I cannot delete nor modify 403.php/404.php as it is inside the snap folder (Read-only file system).

@Upperholme
Copy link

Still seeing this issue. Using version 23.03

@max-nextcloud
Copy link
Collaborator

In Nextcloud 24 we replaced the workspace url with parsing properties from the PROPFIND request: #2193. This will therefore be fixed.
Backporting this to older versions of text seems to involved. Please make sure your http servers do not alter 404 requests as explained for nginx above.

I'll close this issue. Feel free to reopen it or open another one if you are still seeing the problem from Nextcloud 24 onwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop bug Something isn't working
Projects
None yet
Development

No branches or pull requests