nextcloud / officeonline

officeonline
45 stars 15 forks source link

`npm run dev` got error #16

Closed ckc closed 3 years ago

ckc commented 3 years ago

Describe the bug It seems missing package after ran npm run dev

And front end GUI shows error when open office file

Error
cURL error 3: <url> malformed (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

To Reproduce Steps to reproduce the behavior:

  1. Go to '/var/www/html/nextcloud/apps/officeonline'
  2. ran npm ci npm run dev
  3. Direclty open office file in web GUI
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots image

Client details:

Server details

Operating system: CentOS Linux release 8.2.2004 (Core)

Web server: Apache/2.4.37 (centos)

Database: mysql Ver 15.1 Distrib 10.3.17-MariaDB, for Linux (x86_64) using readline 5.1

PHP version:PHP 7.4.10 (cli) (built: Sep 1 2020 13:58:08) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.10, Copyright (c), by Zend Technologies

Nextcloud version: Next Cloud 19.0.3

Version of the officeonline app 1.0.0

Version of Office Online server npm -v 6.14.6 node -v v12.18.3

Logs #### Nextcloud log (data/nextcloud.log) ``` {"reqId":"X3LgU-fyx7CBA@8JBbxwxAAAAM0","level":3,"time":"2020-09-29T07:20:51+00:00","remoteAddr":"58.x.x.x","user":"bft","app":"officeonline","method":"GET","url":"/apps/officeonline/index?fileId=9&requesttoken=8hdfSK8%2BrmUiFzRG3L66YlEKKVOurZfaBd4tCE2pVs0%3D%3Ap1s%2Bcfx44TdHdHkIi8jTCSMlBgDly8e3RvUCeD3hbrc%3D&path=/Documents/Welcome%20to%20Nextcloud%20Hub.docx","message":{"Exception":"GuzzleHttp\\Exception\\RequestException","Message":"cURL error 3: malformed (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":155,"function":"createRejection","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","line":105,"function":"finishError","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php","line":43,"function":"finish","class":"GuzzleHttp\\Handler\\CurlFactory","type":"::"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php","line":28,"function":"__invoke","class":"GuzzleHttp\\Handler\\CurlHandler","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php","line":51,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":37,"function":"GuzzleHttp\\Handler\\{closure}","class":"GuzzleHttp\\Handler\\Proxy","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":29,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":70,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":59,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":361,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":163,"function":"transfer","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":183,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Http/Client/Client.php","line":228,"function":"request","class":"GuzzleHttp\\Client","type":"->"},{"file":"/var/www/html/nextcloud/apps/officeonline/lib/WOPI/DiscoveryManager.php","line":106,"function":"get","class":"OC\\Http\\Client\\Client","type":"->"},{"file":"/var/www/html/nextcloud/apps/officeonline/lib/WOPI/DiscoveryManager.php","line":78,"function":"fetchFromRemote","class":"OCA\\Officeonline\\WOPI\\DiscoveryManager","type":"->"},{"file":"/var/www/html/nextcloud/apps/officeonline/lib/WOPI/Parser.php","line":77,"function":"get","class":"OCA\\Officeonline\\WOPI\\DiscoveryManager","type":"->"},{"file":"/var/www/html/nextcloud/apps/officeonline/lib/WOPI/Parser.php","line":99,"function":"getParsed","class":"OCA\\Officeonline\\WOPI\\Parser","type":"->"},{"file":"/var/www/html/nextcloud/apps/officeonline/lib/TokenManager.php","line":208,"function":"getUrlSrcForFile","class":"OCA\\Officeonline\\WOPI\\Parser","type":"->"},{"file":"/var/www/html/nextcloud/apps/officeonline/lib/Controller/DocumentController.php","line":245,"function":"getToken","class":"OCA\\Officeonline\\TokenManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"index","class":"OCA\\Officeonline\\Controller\\DocumentController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":137,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":297,"function":"call_user_func"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1012,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php","Line":201,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","version":"19.0.3.1","id":"5f72e0f35236a"} ``` #### Browser log ``` Opening viewer for file /Documents/Welcome to Nextcloud Hub.docx globals.js:61 moment is deprecated: please ship your own, this will be removed in Nextcloud 20 $ @ globals.js:61 get @ globals.js:92 updateLastSavedStatus @ EditorWrapper.vue:252 (anonymous) @ EditorWrapper.vue:230 vue.runtime.esm.js:6785 GET /apps/officeonline/index?fileId=9&requesttoken=8hdfSK8%2BrmUiFzRG3L66YlEKKVOurZfaBd4tCE2pVs0%3D%3Ap1s%2Bcfx44TdHdHkIi8jTCSMlBgDly8e3RvUCeD3hbrc%3D&path=/Documents/Welcome%20to%20Nextcloud%20Hub.docx ```
juliushaertl commented 3 years ago

There is no need to run npm if you installed the app from the app store. Please check if your configured URL is valid.