nextcloud / officeonline

officeonline
47 stars 14 forks source link

Office online error #15

Closed wwwwiii closed 3 years ago

wwwwiii commented 4 years ago

Describe the bug cURL error 6: Could not resolve host: https://hostname (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) After trying to open a document.

To Reproduce Steps to reproduce the behavior:

  1. Go to install plugin for office online.
  2. i entered the https url
  3. after opening the the doc editor i recieved the error above.
  4. See error

Client details:

Server details

Operating system: Ubuntu server 18 lts

Web server: nginx

Database:mysql

PHP version: 7.2.24

**Nextcloud version:18.0.3

Version of the officeonline app newest

Version of Office Online server newest

juliusknorr commented 3 years ago

I cannot reproduce any issue. How did you enter the url into the settings, with or without the protocol? Can you maybe change your actual hostname to something made up and share the server url you have configured?

dartcafe commented 3 years ago

I was just testing this. I was using https://ownaccount.onmicrosoft.com This is from a office365-Account. Not sure if this is supported.

NC: 19.0.3 Office Online integration: fresh install 1.0.1

The configuration says OK: grafik On opening a document the error appears: grafik

Log: [officeonline] Error: GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: ownaccount.onmicrosoft.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) at <>

  1. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 155 GuzzleHttp\Handler\CurlFactory::createRejection(GuzzleHttp\Handl ... l}, {errno: 6,error: ... "})
  2. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 105 GuzzleHttp\Handler\CurlFactory::finishError(GuzzleHttp\Handler\CurlHandler {}, GuzzleHttp\Handl ... l}, GuzzleHttp\Handler\CurlFactory {})
  3. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php line 43 GuzzleHttp\Handler\CurlFactory::finish(GuzzleHttp\Handler\CurlHandler {}, GuzzleHttp\Handl ... l}, GuzzleHttp\Handler\CurlFactory {})
  4. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php line 28 GuzzleHttp\Handler\CurlHandler->__invoke(" sensitive parameter replaced ", " sensitive parameter replaced ")
  5. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php line 51 GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler{closure}(" sensitive parameters replaced ")
  6. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php line 37 GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler{closure}(" sensitive parameters replaced ")
  7. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 29 GuzzleHttp\PrepareBodyMiddleware->__invoke(" sensitive parameter replaced ", " sensitive parameter replaced ")
  8. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php line 70 GuzzleHttp\Middleware::GuzzleHttp{closure}(" sensitive parameters replaced ")
  9. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 59 GuzzleHttp\RedirectMiddleware->__invoke(" sensitive parameter replaced ", " sensitive parameter replaced ")
  10. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php line 71 GuzzleHttp\Middleware::GuzzleHttp{closure}(" sensitive parameters replaced ")
    1. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 361 GuzzleHttp\HandlerStack->__invoke(" sensitive parameter replaced ", " sensitive parameter replaced ")
    2. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 163 GuzzleHttp\Client->transfer(" sensitive parameter replaced ", " sensitive parameter replaced ")
    3. /var/www/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php line 183 GuzzleHttp\Client->requestAsync("get", GuzzleHttp\Psr7\Uri {}, {verify: "/var/w ... }})
    4. /var/www/nextcloud/lib/private/Http/Client/Client.php line 228 GuzzleHttp\Client->request("get", "ownaccount.onmicros ... y", {verify: "/var/w ... e})
    5. /var/www/nextcloud/apps/officeonline/lib/WOPI/DiscoveryManager.php line 106 OC\Http\Client\Client->get("ownaccount.onmicros ... y", {timeout: 45,nex ... }})
    6. /var/www/nextcloud/apps/officeonline/lib/WOPI/DiscoveryManager.php line 78 OCA\Officeonline\WOPI\DiscoveryManager->fetchFromRemote()
    7. /var/www/nextcloud/apps/officeonline/lib/WOPI/Parser.php line 77 OCA\Officeonline\WOPI\DiscoveryManager->get()
    8. /var/www/nextcloud/apps/officeonline/lib/WOPI/Parser.php line 99 OCA\Officeonline\WOPI\Parser->getParsed()
    9. /var/www/nextcloud/apps/officeonline/lib/TokenManager.php line 208 OCA\Officeonline\WOPI\Parser->getUrlSrcForFile(OC\Files\Node\File {}, true)
    10. /var/www/nextcloud/apps/officeonline/lib/Controller/DocumentController.php line 245 OCA\Officeonline\TokenManager->getToken(" sensitive parameters replaced ")
    11. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170 OCA\Officeonline\Controller\DocumentController->index(" sensitive parameter replaced ", "/testtimestamp.docx")
    12. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 100 OC\AppFramework\Http\Dispatcher->executeController(OCA\Officeonline ... {}, "index")
    13. /var/www/nextcloud/lib/private/AppFramework/App.php line 137 OC\AppFramework\Http\Dispatcher->dispatch(OCA\Officeonline ... {}, "index")
    14. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47 OC\AppFramework\App::main("OCA\Officeonli ... r", "index", OC\AppFramework\ ... {}, {_route: "officeonline.document.index"})
    15. <> OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "officeonline.document.index"})
    16. /var/www/nextcloud/lib/private/Route/Router.php line 297 call_user_func(OC\AppFramework\ ... {}, {_route: "officeonline.document.index"})
    17. /var/www/nextcloud/lib/base.php line 1012 OC\Route\Router->match("/apps/officeonline/index")
    18. /var/www/nextcloud/index.php line 37 OC::handleRequest()

GET /index.php/apps/officeonline/index?fileId= sensitive parameter replaced

juliusknorr commented 3 years ago

Make sure you have the protocol added to your url in the settings.

juliusknorr commented 3 years ago

This is from a office365-Account. Not sure if this is supported.

Ah and the app only supports on-premise Office Online installations.

dartcafe commented 3 years ago

Thought that. But I am not sure, if this is the OP's issue....

wwwwiii commented 3 years ago

This is from a office365-Account. Not sure if this is supported.

Ah and the app only supports on-premise Office Online installations.

So office 365 is not supported? because that what i tried!

juliusknorr commented 3 years ago

Yep, this is not supported

wwwwiii commented 3 years ago

Didn't even know people are still actively self-hosting office online :D

juliusknorr commented 3 years ago

Added a more clear note to https://github.com/nextcloud/officeonline/blob/master/README.md#server

wwwwiii commented 3 years ago

Should be possible to intergratie with office 365. I personally would prefer nextcloud above sharepoint.

juliusknorr commented 3 years ago

It will only be possible if you are able to register for the Office 365 - Cloud Storage Partner Program which from the concept of how the registration works is not aimed for self-hosted on premise solutions like Nextcloud. The WOPI procotol should be the same so it might work, but there will be no support for this from our side.

Feel free to checkout https://wopi.readthedocs.io/en/latest/ for more details on the requirements.

juliusknorr commented 3 years ago

The main issue here is that you need your Nextcloud domain whitelisted in the Office 365 cloud service which they don't allow for regular users.