DocumentServer icon indicating copy to clipboard operation
DocumentServer copied to clipboard

DocumentServer Word not working on ARM

Open pi-xel opened this issue 9 years ago • 166 comments

Hello everyone,

I have successfully compiled OnlyOffice DocumentServer for ARM (latest GIT clone, on an ODroid XU4 running Debian Jessie) and integrated it with Nextcloud.

I can edit spreadsheets and presentations flawlessly, however, when I try to open a Word document, the loading screen gets stuck at 100% and I log messages like:

2017-08-10 01:38:15.688] [ERROR] nodeJS - changesError: docId = 3344951502280414 Error: Uncaught TypeError: Cannot read property 'kb' of null Script: https://example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js Line: 7205:203 userAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36 platform: Linux x86_64 StackTrace: TypeError: Cannot read property 'kb' of null at Sa.yV (https://example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:7205:203) at wf (https://example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:94:300) at kt.ASb (https://example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:8644:493) at kt.v7c (https://example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:8642:264) at kt.Rka (https://example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:8639:197) at Ea.Rka (https://example.com/2017-07-21-15-20/sdkjs/word/sdk-all-min.js:698:177) at Ea.mAc (https://example.com/2017-07-21-15-20/sdkjs/word/sdk-all-min.js:699:137) at Object.W3a (https://example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:5357:79) at gxc (https://example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:5358:85)

I do not expect that you fix these errors as I know that ARM is not sufficiently supported. But maybe you can give me an indication on how to debug this, the compressed *.js files are not really readable.

Best regards, pi-xel

pi-xel avatar Aug 09 '17 23:08 pi-xel

Hi there. Personally I've never tried to compile our project on ARM. Does x2t working well? I think core (x2t is part of this project) will have most troubles for compiling on ARM Is it working well? What is output of /var/www/onlyoffice/documentserver/server/FileConverter/bin/x2t? It should show some help. And if it work correctly - try to convert some random doc file to docx using it

ShockwaveNN avatar Aug 10 '17 14:08 ShockwaveNN

Hey,

Thanks for your response. Output of x2t:

------------------------------------------------------------------------------- OOX/binary file converter. Version: 2.4.470.0 -------------------------------------------------------------------------------

USAGE: x2t "path_to_params_xml" or USAGE: x2t "path_to_file_1" "path_to_file_2" ["path_to_font_selection"] WHERE: "path_to_file_1" is a path to file to be converted "path_to_file_2" is a path to the corresponding output file "path_to_font_selection" is a path to 'font_selection.bin' location

Tried to convert a file from doc to docx, i.e. ./x2t /tmp/test.doc /tmp/test.docx. This worked flawlessly, x2t did not produce any output and the generated docx can be opened and is valid.

pi-xel avatar Aug 10 '17 15:08 pi-xel

@pi-xel Wow. This is a great news. Did you compile core using cross-compiling or it can be achieved on that ODroid XU4 device?

ShockwaveNN avatar Aug 10 '17 15:08 ShockwaveNN

@pi-xel also - is there any error in browser whyle you trying to open it? And did you try to open empty document or with some content

ShockwaveNN avatar Aug 10 '17 15:08 ShockwaveNN

I compiled everything on XU4, except for CEF which I cross-compiled on my PC. Also ICU I had to compile manually, as the provided download link was only x86.

When I open a docx in the browser, no matter whether it's empty or not, the file loads to 100% and then gets stuck in that screen. And all that is logged is the error message I've sent in my first post.

pi-xel avatar Aug 10 '17 15:08 pi-xel

PS: Also had to switch from GCC 4.9 to GCC 6 coz I got some compiler internal errors when compiling core and had to do some manual tweaking on obtaining and compiling certain node modules which I don't remember exactly to get sdkjs compiled (which also took an awful long time on XU4, each module (word, sheet, cell) took about 6-8 hours).

pi-xel avatar Aug 10 '17 15:08 pi-xel

no matter whether it's empty or not, the file loads to 100% and then gets stuck in that screen.

Сan you attach data from WebSocket? socketdata

at Sa.yV (https://example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:7205:203)

Your error in logs contains dates. Did you add them manually? Because if I remember correctly - path to sdk.js on manually compiled DocumentServer should be like this https://example.com/sdkjs/word/sdk-all.js /etc/nginx/sites-available/onlyoffice-documentserver file have not dates in our instruction http://helpcenter.onlyoffice.com/server/linux/document/compile-source-code.aspx

ShockwaveNN avatar Aug 10 '17 15:08 ShockwaveNN

I wanted the server to run using SSL and did not manage to derive a working configuration from the one given in the source code instructions. Before trying for too long, I simply copied the configuration from the respective *.deb package.

Which websocket data do you want?

pi-xel avatar Aug 10 '17 15:08 pi-xel

@pi-xel There is two websockets, one for spell check - we don't need it, other for docservice, data should look like on my screenshot - we need that data

ShockwaveNN avatar Aug 10 '17 16:08 ShockwaveNN

Here we go: screenshot

pi-xel avatar Aug 10 '17 16:08 pi-xel

@pi-xel Sorry, but we need whole data, not only screenshot. Could you copy paste each line to text file, replace your secret data and attach it here?

ShockwaveNN avatar Aug 10 '17 16:08 ShockwaveNN

a["{\"type\":\"license\",\"license\":{\"type\":7,\"light\":false,\"trial\":false,\"rights\":1,\"buildVersion\":\"0.0.0\",\"buildNumber\":0,\"branding\":false}}"]

["{\"type\":\"auth\",\"docid\":\"6027281502367408\",\"documentCallbackUrl\":\"https://nextcloud.example.com/index.php/apps/onlyoffice/track?doc=dm9XOVdld0tjVVZyWjFKcnB3cHYzQ21nVjV3dmFQS3NBZUd3QVgyZS9zRT0/eyJmaWxlSWQiOjYwMjcyOCwib3duZXJJZCI6InBoaWwiLCJhY3Rpb24iOiJ0cmFjayJ9\",\"token\":\"fghhfgsjdgfjs\",\"user\":{\"id\":\"xxxx\",\"username\":\"Xxxx\",\"firstname\":null,\"lastname\":null,\"indexUser\":-1},\"editorType\":0,\"lastOtherSaveTime\":-1,\"block\":[],\"sessionId\":null,\"sessionTimeConnect\":null,\"sessionTimeIdle\":0,\"documentFormatSave\":0,\"view\":false,\"isCloseCoAuthoring\":false,\"openCmd\":{\"c\":\"open\",\"id\":\"6027281502367408\",\"userid\":\"xxxx\",\"format\":\"docx\",\"url\":\"https://nextcloud.example.com/index.php/apps/onlyoffice/download?doc=MTRYbS9RUjNwa3RWeU1ucWJjYkZiQ3dVN2RjTUl4OU5YVDM3elg4TElYUT0/eyJmaWxlSWQiOjYwMjcyOCwib3duZXJJZCI6InBoaWwiLCJhY3Rpb24iOiJkb3dubG9hZCJ9\",\"title\":\"test.docx\"},\"lang\":null,\"mode\":null,\"permissions\":null}"]

a["{\"type\":\"auth\",\"result\":1,\"sessionId\":\"af676707-e22b-4ce5-afb9-c396520f0b0c\",\"sessionTimeConnect\":1502381007762,\"participants\":[{\"id\":\"xxxx3\",\"idOriginal\":\"xxxx\",\"username\":\"Xxxx\",\"indexUser\":3,\"view\":false,\"connectionId\":\"af676707-e22b-4ce5-afb9-c396520f0b0c\",\"isCloseCoAuthoring\":false}],\"locks\":{},\"changes\":[],\"changesIndex\":0,\"indexUser\":3,\"g_cAscSpellCheckUrl\":\"/spellchecker\",\"buildVersion\":\"0.0.0\",\"buildNumber\":0}"]

a["{\"type\":\"documentOpen\",\"data\":{\"type\":\"open\",\"status\":\"ok\",\"data\":{\"Editor.bin\":\"https://onlyoffice.example.com/cache/files/6027281502367408/Editor.bin/Editor.bin?md5=WEF6wITV1U5kJWkGH36t3g==&expires=1504973010&disposition=attachment&ooname=output.bin\"}}}"]

["{\"type\":\"changesError\",\"stack\":\"Error: Uncaught TypeError: Cannot read property 'kb' of null Script: https://onlyoffice.example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js Line: 7205:203 userAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36 platform: Linux x86_64 StackTrace: TypeError: Cannot read property 'kb' of null\\n at Sa.yV (https://onlyoffice.example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:7205:203)\\n at wf (https://onlyoffice.example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:94:300)\\n at kt.ASb (https://onlyoffice.example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:8644:493)\\n at kt.v7c (https://onlyoffice.example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:8642:264)\\n at kt.Rka (https://onlyoffice.example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:8639:197)\\n at Ea.Rka (https://onlyoffice.example.com/2017-07-21-15-20/sdkjs/word/sdk-all-min.js:698:177)\\n at Ea.mAc (https://onlyoffice.example.com/2017-07-21-15-20/sdkjs/word/sdk-all-min.js:699:137)\\n at Object.W3a (https://onlyoffice.example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:5357:79)\\n at gxc (https://onlyoffice.example.com/2017-07-21-15-20/sdkjs/word/sdk-all.js:5358:85)\"}"]

pi-xel avatar Aug 10 '17 16:08 pi-xel

Does that tell you something?

pi-xel avatar Aug 10 '17 19:08 pi-xel

@pi-xel

"title":"test.docx"

Could you attach this file?

ShockwaveNN avatar Aug 11 '17 08:08 ShockwaveNN

@ShockwaveNN This is a newly created file from within Nextcloud, but the result is the same for already existent (externally created) files. Have attached the file.

test.docx

pi-xel avatar Aug 11 '17 08:08 pi-xel

@pi-xel could you attach sdkjs/word/sdk-all.js and sdkjs/word/sdk-all-min.js

ShockwaveNN avatar Aug 11 '17 08:08 ShockwaveNN

Attached.

sdk-all.zip

pi-xel avatar Aug 11 '17 08:08 pi-xel

@pi-xel How did you compiled sdk js files? Like in instruction cd ../sdkjs && make or did you use some hack?

ShockwaveNN avatar Aug 11 '17 09:08 ShockwaveNN

Followed instructions there, no hack if I remember correctly

pi-xel avatar Aug 11 '17 09:08 pi-xel

@pi-xel In attached sdk-all you have header Version: 4.4.2 (build:20). This is strange, it should be Version: 0.0.0 (build:0)

ShockwaveNN avatar Aug 11 '17 09:08 ShockwaveNN