Text: HomePage Loading Circle

Created on 27 Apr 2020  路  37Comments  路  Source: nextcloud/text

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

1. to develop bug

Most helpful comment

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

All 37 comments

Thanks for reporting :+1:

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.

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 - <a href="nunosilva2003@hotmail">nunosilva2003@hotmail</a> com - Outlook

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.

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.

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


2020-05-12 10_30_55-Window

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.

The spinner is still there...

2020-05-12 10_38_24-Window

The response for the failing xhr request is?

404 !? Where is the property "data"?

image

Click on Response ...

image

You disabled the text app?

image

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

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.

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

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.

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

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.

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

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

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

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

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'

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

*   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/

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

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.

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.

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.

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

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!

Let's keep that open to track the improvements suggested from https://github.com/nextcloud/text/issues/820#issuecomment-631384701

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.

linuxserver.io team member here

Those were removed from our default site conf well over a year ago, for Nextcloud v15: https://github.com/linuxserver/docker-nextcloud/commit/39fd8e322bf243ded22a6409e9323b75fd3d964f#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

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 ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

csantosb picture csantosb  路  5Comments

skjnldsv picture skjnldsv  路  3Comments

inthreedee picture inthreedee  路  6Comments

jancborchardt picture jancborchardt  路  4Comments

andynd picture andynd  路  3Comments