nextcloud / richdocuments

📑 Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
350 stars 115 forks source link

Make check for capabilities optional #949

Closed Bables55 closed 10 months ago

Bables55 commented 4 years ago

I updated the Collaboraonline app from 3.5.3 to 3.6.0. Then the office server is no longer accessible. I've downgraded to 3.5.3 and it's still not working. I am currently using the "WOPI" app as an alternative. If this is the case, it is available.

In the case of the Collaboraonline app, no matter what type of content I type in the server address entry field, it shows my previous address.

When I looked at the 3.6.0 configuration items, I found them to be very simplistic. The icon above indicating the state of the connection was red. Of course there is no mistake in the WOPI server address.

No error was output.

3.6.0 has a fatal flaw. Better not to update it.


Nextcloud 18.0.4, PHP 7.3.17, loolwsd 4.6.3

Tealk commented 4 years ago

I can confirm this, I always get the message that the server is not configured, I have no problems with 3.5.3

Bables55 commented 4 years ago

I went back to 3.5.3 and I can't even set it to blank.

taavit21 commented 4 years ago

Can confirm. I have the exact same issue. Had to disable collabora because downgrading to 3.5.3 doesnt work either.

Tealk commented 4 years ago

Can confirm. I have the exact same issue. Had to disable collabora because downgrading to 3.5.3 doesnt work either.

first disable the add-on with version 3.6.0 and then delete it, then you can upload and activate version 3.5.3 via ftp Download: https://github.com/nextcloud/richdocuments/releases/download/v3.5.3/richdocuments.tar.gz

juliushaertl commented 4 years ago

I cannot reproduce any issue with that. Please fill out the complete issue template especially if there is something in the browser console or nextcloud logs.

In the case of the Collaboraonline app, no matter what type of content I type in the server address entry field, it shows my previous address.

Maybe you can share a quick recording of the exact behavior there?

Tealk commented 4 years ago

I hope someone can take over, I just have the live instance of my company and I don't want to test it there.

buttle commented 4 years ago

Same here. Staff during times of covid are collabora dependent. Please fix soon.

first disable the add-on with version 3.6.0 and then delete it, then you can upload and activate version 3.5.3 via ftp Download: https://github.com/nextcloud/richdocuments/releases/download/v3.5.3/richdocuments.tar.gz

Downgrading works for me.

juliushaertl commented 4 years ago

@buttle Please use the Github Reactions feature instead of commenting if there is no additional information provided.

taavit21 commented 4 years ago

@juliushaertl I think this might be the issue here.

Capture

martinjakl commented 4 years ago

Same problem here. When I change in viewer.js isCollaboraConfigured:"object"===f(OC.getCapabilities().richdocuments.collabora)&&0!==OC.getCapabilities().richdocuments.collabora.length to isCollaboraConfigured:true it works again

juliushaertl commented 4 years ago

@taavit21 Is that the issue when saving? It seems that for some reason it is redirecting to /apps/files/. Are you running Nextcloud with a rewrite so that urls are not containing index.php?

thebearon commented 4 years ago

@juliushaertl: it seems like richdocuments stopped accepting Collabora Online if the hosting/capabilities endpoint is not available.

For everyone, if you are using a reverse proxy, please check if you have the following (or similar, depending on SSL/termination) configuration entries:

# Capabilities
ProxyPass           /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities retry=0
ProxyPassReverse    /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities

https://www.collaboraoffice.com/code/apache-reverse-proxy/

    # Capabilities
    location ^~ /hosting/capabilities {
        proxy_pass https://localhost:9980;
        proxy_set_header Host $http_host;
    }

https://www.collaboraoffice.com/code/nginx-reverse-proxy/

Generally, make sure https://<server:port>/hosting/discovery of the Collabora Online/CODE instance is accessible either directly, or via reverse proxy.

Tealk commented 4 years ago

@thebearon is that new? because it is not included in the nextcloud guide linked from nextcloud https://icewind.nl/entry/collabora-online/

At least that's the solution for me.

taavit21 commented 4 years ago

@taavit21 Is that the issue when saving? It seems that for some reason it is redirecting to /apps/files/. Are you running Nextcloud with a rewrite so that urls are not containing index.php?

I think it´s actually irrelevant to the current issue. I downgraded to 3.5.3 as a temporary solution.

kiki78 commented 4 years ago

I confirm that downgrade to 3.5.3 is temporary solution for me. Sorry I can't help more :-(

juliushaertl commented 4 years ago

Ok, yes we indeed use the capabilities endpoint now to check if a server is actually reachable properly.

@taavit21 @kiki78 Please check your webserver setup as described by @thebearon in that case.

taavit21 commented 4 years ago

Ok, yes we indeed use the capabilities endpoint now to check if a server is actually reachable properly.

@taavit21 @kiki78 Please check your webserver setup as described by @thebearon in that case.

I would say there is still a problem because at first check without adding endpoint it says connection to collabora server is successful.

Demonstrated here:

Capture

I dont see anything relevant in nextcloud.log.

kiki78 commented 4 years ago

Sorry if my response is irrelevant.

From my desktop browser I join https://my_collabora_server/hosting/discovery and receive XML page. If I try https://my_nextcloud_server:9980/hosting/discovery this doesn't work

After, I connect in console to my nextcloud server. wget https://my_collabora_server/hosting/discovery, receive file wget https://my_nextcloud_server:9980/hosting/discover don't work

wget localhost:9980/hosting/discovery : connected. HTTP request sent, awaiting response... No data received.

wget https://localhost:9980/hosting/discovery : connected. ERROR: The certificate of ‘localhost’ is not trusted.

For information Collabora is on same server but in Docker. We use Nginx and Let's Encrypt for certificats.

With version 3.6.0, I confirm @taavit21 : Collabora apps page say reachable when press Save, but If I refresh, I see not reachable.

@thebearon instruction are in my nginx collabora.conf

Regards,

weberhofer commented 4 years ago

If the instance is still not working after adding hosting/capabilities have a look at #948

thebearon commented 4 years ago

Ok, yes we indeed use the capabilities endpoint now to check if a server is actually reachable properly.

@juliushaertl, could we keep relying on hosting/discovery instead? hosting/capabilities isn't necessarily there... or to be more informative, check both, and warn the user if only hosting/discovery is available that some features will be missing? (like template handling and previews)

Who could update the sample proxy configuration in the following guide? https://nextcloud.com/collaboraonline/

juliushaertl commented 4 years ago

could we keep relying on hosting/discovery instead? hosting/capabilities isn't necessarily there... or to be more informative, check both, and warn the user if only hosting/discovery is available that some features will be missing? (like template handling and previews)

Yes, that sounds like a solid plan.

Who could update the sample proxy configuration in the following guide? nextcloud.com/collaboraonline

@jospoortvliet can help there I guess. We should definitely just link that to https://www.collaboraoffice.com/code/apache-reverse-proxy/ and https://www.collaboraoffice.com/code/nginx-reverse-proxy/ so we don't have multiple places where this might get forgotten if something changes.

Bables55 commented 4 years ago

Disable and remove 3.6.0. Then install 3.5.3. I was only able to use 3.5.3 right after that. But after a certain amount of time, it was no longer available again. The user becomes a downloader of the file. I went back to using the "WOPI app" again. It really is dangerous to use 3.6.0.

AndyXheli commented 4 years ago

I'm having the same issue since i updated to 3.6.0 once i rolled back to 3.5.3 it worked.

doudz commented 4 years ago

I also have the same problem, using nginx and I solved it by adding a missing / new entry in my nginx configuration file, according to https://www.collaboraoffice.com/code/nginx-reverse-proxy/

# Capabilities
    location ^~ /hosting/capabilities {
        proxy_pass http://localhost:9980;
        proxy_set_header Host $http_host;
    }

The official french doc https://nextcloud.com/fr_FR/collaboraonline/ refers to https://icewind.nl/entry/collabora-online/ where /hosting/capabilities entry is missing

kiki78 commented 4 years ago

Finally, I recheck my collabora.conf and only /hosting/discovery is inside, not /hosting/capabilities. So I add lines like thebaron and doudz and now 3.6.0 seems to work :-)

Bables55 commented 4 years ago

I wonder if 3.6.0 and later require additional settings and can no longer be supported by regular updates?

AndyXheli commented 4 years ago

Yes I was missing in my apache2 virtual host file

ProxyPass /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities retry=0 ProxyPassReverse /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities

at the end i updated to 3.6.0 and no issues

taavit21 commented 4 years ago

I also have the same problem, using nginx and I solved it by adding a missing / new entry in my nginx configuration file, according to https://www.collaboraoffice.com/code/nginx-reverse-proxy/

# Capabilities
    location ^~ /hosting/capabilities {
        proxy_pass http://localhost:9980;
        proxy_set_header Host $http_host;
    }

The official french doc https://nextcloud.com/fr_FR/collaboraonline/ refers to https://icewind.nl/entry/collabora-online/ where /hosting/capabilities entry is missing

I can confirm that this resolved issue for me aswell.

Thom1b commented 4 years ago

I also have the same problem, using nginx and I solved it by adding a missing / new entry in my nginx configuration file, according to https://www.collaboraoffice.com/code/nginx-reverse-proxy/

# Capabilities
    location ^~ /hosting/capabilities {
        proxy_pass http://localhost:9980;
        proxy_set_header Host $http_host;
    }

The official french doc https://nextcloud.com/fr_FR/collaboraonline/ refers to https://icewind.nl/entry/collabora-online/ where /hosting/capabilities entry is missing

Works for me. Thanks!

Djiock commented 4 years ago

I also have the same problem, using nginx and I solved it by adding a missing / new entry in my nginx configuration file, according to https://www.collaboraoffice.com/code/nginx-reverse-proxy/

# Capabilities
    location ^~ /hosting/capabilities {
        proxy_pass http://localhost:9980;
        proxy_set_header Host $http_host;
    }

The official french doc https://nextcloud.com/fr_FR/collaboraonline/ refers to https://icewind.nl/entry/collabora-online/ where /hosting/capabilities entry is missing

Did the trick for me too, careful when using SSL on both ends like me : proxy_pass https://localhost:9980

Bables55 commented 4 years ago

I was able to connect to Collabora by specifying "https://".

# Capabilities
    location ^~ /hosting/capabilities {
        proxy_pass https://localhost:9980;
        proxy_set_header Host $http_host;
    }

Is this a legitimate solution? Is it a temporary workaround? After all, what's the fix in 3.6.0?

juliushaertl commented 4 years ago

Is this a legitimate solution? Is it a temporary workaround?

Well if your Collabora server is using SSL then you would need to connect using that of course.

husisusi commented 4 years ago

This fixed my issue and I can now use 3.6 and 3.7,

disable app
remove app folder
run the following sql statements:
drop table oc_richdocuments_direct;
drop table oc_richdocuments_wopi;
drop table oc_richdocuments_assets;
delete from oc_migrations where app='richdocuments';
reinstall the app

From: https://github.com/nextcloud/richdocuments/issues/917#issuecomment-619104454

raffisweb commented 4 years ago

Hi there, could someone please point me to a solution for traefik?

ludogre commented 4 years ago

Hi! I've got the same problem.

This fixed my issue and I can now use 3.6 and 3.7,

disable app
remove app folder
run the following sql statements:
drop table oc_richdocuments_direct;
drop table oc_richdocuments_wopi;
drop table oc_richdocuments_assets;
delete from oc_migrations where app='richdocuments';
reinstall the app

From: #917 (comment)

It didn't work for me.

joshtrichards commented 10 months ago

This was worked out long ago, closing. Docs appear accurate today as well - e.g.

https://sdk.collaboraonline.com/docs/installation/Proxy_settings.html#reverse-proxy-with-apache-2-webserver

There's also better logging today if capabilities is unreachable (e.g. #989, #2356) and robustness for other situations like richdocumentscode/proxy (e.g. #999, #992).