# Failure: "Please ensure the file type is supported and not corrupted"

**URL:** <https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031>\
**Category:** 📄 Office\
**Tags:** collabora-online\
**Created:** [January 25, 2017, 8:23pm UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031 "2017-01-25T20:23:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajdunevent](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ajdunevent/32/1391_2.png) [@ajdunevent](https://help.nextcloud.com/u/ajdunevent)\
**Post date:** [January 25, 2017, 8:23pm UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/1 "2017-01-25T20:23:46Z")

</div>

Greetings, community, and thanks in advance for any help you can provide!

I’m running Nextcloud 11.0.1, apache 2.4.25, php 7.1.1, mariadb 10.1.21, and docker 1.12.6.  
I’m up to date on the collabora/code latest Docker image.  
I have version 1.1.25 of the Collabora Online app for Nextcloud.  
I have current valid certs from LetsEncrypt for mydomain.tld and office.mydomain.tld.  
Docker is using overlay2, not aufs.  
I copied the virtualhost config directly from [Nextcloud Office - Self-hosted online office suite](https://nextcloud.com/collaboraonline) changing only the ServerName and SSL paths. The new websocket stuff and the nocanon are all intact.  
The Docker image was run using the command provided at [https://nextcloud.com/collaboraonline](https://nextcloud.com/collaboraonline) except with mydomain.tld (properly escaped) and prepended with sudo.  
The admin interface for the Collabora Online app for Nextcloud points to [https://office.mydomain.tld](https://office.mydomain.tld) (without the port number).  
The Collabora Online app is not restricted to only certain groups (not that such an option exists any longer for this app).  
[https://office.mydomain.tld/hosting/discovery](https://office.mydomain.tld/hosting/discovery) is reachable and gives the expected output.

When I visit [https://office.mydomain.tld/loleaflet/2.0.2/loleaflet.html](https://office.mydomain.tld/loleaflet/2.0.2/loleaflet.html)? in my browser, CODE tells me  
“Well, this is embarrassing, we cannot connect to your document. Please try again.”  
followed by  
“Wrong WOPISrc, usage: WOPISrc=valid encoded URI, or file\_path, usage: file\_path=/path/to/doc/”  
(which I think is the expected behavior since I didn’t pass it anything to do).

When I try to open any existing or new document in Nextcloud, CODE tells me  
“Failed to load the document. Please ensure the file type is supported and not corrupted, and try again.”

I feel like I’ve tried everything and searched thoroughly but I haven’t gotten anywhere. I’m sure I’ve just got some dumb mistake hanging out in an old config file that I’ve been dragging around in the years since I first started messing with this installation.

Please let me know what I can provide to help troubleshoot this problem.  
I appreciate any help more than I can express in a single post.

---

<div class="post-metadata">

**Author:** ![ajdunevent](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ajdunevent/32/1391_2.png) [@ajdunevent](https://help.nextcloud.com/u/ajdunevent)\
**Post date:** [February 8, 2017, 7:10pm UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/2 "2017-02-08T19:10:41Z")

</div>

I hate to “bump” a post but I’ve continued to have no luck figuring this out after 2 weeks so I’m hoping some kind soul has a hint. Thanks, again.

---

<div class="post-metadata">

**Author:** ![enoch85](https://help.nextcloud.com/user_avatar/help.nextcloud.com/enoch85/32/49403_2.png) [@enoch85](https://help.nextcloud.com/u/enoch85)\
**Post date:** [February 9, 2017, 10:27am UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/3 "2017-02-09T10:27:16Z")

</div>

Also experiencing the same thing.

 ![](https://help.nextcloud.com/uploads/default/original/2X/7/7075cb4df582023eed68ff665bb531bbd1104a28.png)

---

<div class="post-metadata">

**Author:** ![ajdunevent](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ajdunevent/32/1391_2.png) [@ajdunevent](https://help.nextcloud.com/u/ajdunevent)\
**Post date:** [February 10, 2017, 3:14pm UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/4 "2017-02-10T15:14:45Z")

</div>

Today’s CODE 2.0 update changed the message to “Service is unavailable. Please try again later and report to your administrator if the issue persists.” I guess that’s an improvement?

EDIT: Nevermind, if you give it long enough, it still throws the supported/not corrupted error.

---

<div class="post-metadata">

**Author:** ![ajdunevent](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ajdunevent/32/1391_2.png) [@ajdunevent](https://help.nextcloud.com/u/ajdunevent)\
**Post date:** [February 10, 2017, 4:35pm UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/5 "2017-02-10T16:35:32Z")

</div>

Alright, I seem to have figured out some voodoo that works on my end.

1. Run the Docker image as normal
2. Keep trying to open docs on Nextcloud…
3. Click “OK” on “Well, this is embarrassing, we cannot connect to your document. Please try again.”
4. Click “OK” on “Service is unavailable. Please try again later and report to your administrator if the issue persists.”
5. Keeping going back to step 3 until you finally get “Failed to load the document. Please ensure the file type is supported and not corrupted, and try again.”
6. Click “OK” and exit to Files.
7. Restart Docker itself (the service, not just the image).
8. Profit.

Why this works, I have no idea but it has worked three times in a row for me. I hope it’ll help someone else and, ultimately, I hope it provides a clue needed to address the problem.

It’s not a real “Solution” but I’ll mark this as solved for now.

---

<div class="post-metadata">

**Author:** ![enoch85](https://help.nextcloud.com/user_avatar/help.nextcloud.com/enoch85/32/49403_2.png) [@enoch85](https://help.nextcloud.com/u/enoch85)\
**Post date:** [February 11, 2017, 9:36am UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/6 "2017-02-11T09:36:54Z")

</div>

Docker seems very unstable for sure…

---

<div class="post-metadata">

**Author:** ![ayao281](https://help.nextcloud.com/letter_avatar/ayao281/32/6_22734026db12803ebb3e059622ac3534.png) [@ayao281](https://help.nextcloud.com/u/ayao281)\
**Post date:** [April 25, 2017, 12:30am UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/7 "2017-04-25T00:30:25Z")

</div>

Ok seriously? I can’t believe this worked! Thanks!

I’ve been sitting here restarting the machine and restarting the containers to no avail but this simple solution fixed it?! It even remained fixed across reboots. Whats up with this?

---

<div class="post-metadata">

**Author:** ![ajdunevent](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ajdunevent/32/1391_2.png) [@ajdunevent](https://help.nextcloud.com/u/ajdunevent)\
**Post date:** [April 25, 2017, 1:30am UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/8 "2017-04-25T01:30:03Z")

</div>

I wish I knew! This is still the only thing that gets it working for me. For what it’s worth, I don’t actually believe it is a Docker issue. I get the same series of error messages when I run LibreOffice Online without Docker.

---

<div class="post-metadata">

**Author:** ![Maximiliano\_Castro](https://help.nextcloud.com/letter_avatar/maximiliano_castro/32/6_22734026db12803ebb3e059622ac3534.png) [@Maximiliano\_Castro](https://help.nextcloud.com/u/Maximiliano_Castro)\
**Post date:** [October 18, 2017, 9:20pm UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/9 "2017-10-18T21:20:29Z")

</div>

The voodoo works !! The only thing that works !  
anyone able to get technical details about this fault?

---

<div class="post-metadata">

**Author:** ![fweng322](https://help.nextcloud.com/user_avatar/help.nextcloud.com/fweng322/32/6637_2.png) [@fweng322](https://help.nextcloud.com/u/fweng322)\
**Post date:** [November 27, 2017, 7:13am UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/10 "2017-11-27T07:13:58Z")

</div>

This voodoo really works on my machine too…

---

<div class="post-metadata">

**Author:** ![chrisc](https://help.nextcloud.com/user_avatar/help.nextcloud.com/chrisc/32/6396_2.png) [@chrisc](https://help.nextcloud.com/u/chrisc)\
**Post date:** [December 8, 2017, 7:43pm UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/11 "2017-12-08T19:43:43Z")

</div>

I can also confirm that a `service docker restart` solved the _“Failed to load the document. Please ensure the file type is supported and not corrupted, and try again.”_ error with Collabora Online.

---

<div class="post-metadata">

**Author:** ![Plastikschnitzer](https://help.nextcloud.com/letter_avatar/plastikschnitzer/32/6_22734026db12803ebb3e059622ac3534.png) [@Plastikschnitzer](https://help.nextcloud.com/u/Plastikschnitzer)\
**Post date:** [December 11, 2017, 6:32pm UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/12 "2017-12-11T18:32:17Z")

</div>

I had the exact same issue and

> sudo service docker restart

did the job! Ubuntu 16.04 and the docker/apache setup as recommended by Nextcloud. Maybe this can be added to the [documentation](https://nextcloud.com/collaboraonline/) it took me some time to figure out that my setup was totally fine … 😀🕶

---

<div class="post-metadata">

**Author:** ![kingrabbit](https://help.nextcloud.com/letter_avatar/kingrabbit/32/6_22734026db12803ebb3e059622ac3534.png) [@kingrabbit](https://help.nextcloud.com/u/kingrabbit)\
**Post date:** [February 17, 2018, 9:36pm UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/14 "2018-02-17T21:36:34Z")

</div>

I had the same issue (Nextcloud and code in docker on ubuntu 16.04, nginx as reverse proxy in front)  
Wasted so much time trying to change all possible proxy settings, I build a test env. for that … but that is really a “magic solution” 😄 … but it works

Is this solution working “stable” or is it necessary to restart docker every day or so ? … I will find out , but I will keep the over a year old image from code in my registry as a backup, that is working without magic 😀

Many thanks for the help here !

---

<div class="post-metadata">

**Author:** ![ajdunevent](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ajdunevent/32/1391_2.png) [@ajdunevent](https://help.nextcloud.com/u/ajdunevent)\
**Post date:** [February 17, 2018, 11:43pm UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/15 "2018-02-17T23:43:31Z")

</div>

I’m glad it is still helping people a year later. In my experience, it is a “stable” solution. If I recall correctly, it even survives power cycles. The only time I remember needing to revisit it was when I updated the Docker image.

---

<div class="post-metadata">

**Author:** ![BenjaminRehn](https://help.nextcloud.com/letter_avatar/benjaminrehn/32/6_22734026db12803ebb3e059622ac3534.png) [@BenjaminRehn](https://help.nextcloud.com/u/BenjaminRehn)\
**Post date:** [April 17, 2018, 7:15am UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/16 "2018-04-17T07:15:05Z")

</div>

That DID IT … restarting the docker service… it self … runs it now…

Debian GNU/Linux 8 (jessie)  
17.5.3 debian8.0.build1705170317.16

---

<div class="post-metadata">

**Author:** ![Floppik](https://help.nextcloud.com/letter_avatar/floppik/32/6_22734026db12803ebb3e059622ac3534.png) [@Floppik](https://help.nextcloud.com/u/Floppik)\
**Post date:** [April 20, 2018, 8:45am UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/17 "2018-04-20T08:45:49Z")

</div>

After upgrading collabora to latest version, files with russian names can’t open:

> Apr 20 11:42:06 Iru113 loolwsd[699]: kit-01700-01906 08:42:06.351323 [lokit\_002] ERR Failed to load: file:///user/docs/H1YwVwEuLoKUAj7U/%D0%9F%D0%BE% D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20%D0%BE%20%D0%BC%D0%B5%D1%80%D0%BE%D0%BF%D1%80%D0%B8%D1%8F%D1%82%D0%B8%D1%8F%D1%85\_%D1%84%D0%BE%D1%80%D1%83%D 0%BC%20%D0%93%D0%BE%D1%80%D0%B8%D0%B7%D0%BE%D0%BD%D1%82%D1%8B.docx, error: Unsupported URL \<file:///user/docs/H1YwVwEuLoKUAj7U/%D0%9F%D0%BE%D0%BB%D0%BE% D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20%D0%BE%20%D0%BC%D0%B5%D1%80%D0%BE%D0%BF%D1%80%D0%B8%D1%8F%D1%82%D0%B8%D1%8F%D1%85\_%D1%84%D0%BE%D1%80%D1%83%D0%BC%20%D0%9 3%D0%BE%D1%80%D0%B8%D0%B7%D0%BE%D0%BD%D1%82%D1%8B.docx\>: “type detection failed”| kit/Kit.cpp:1527  
> Apr 20 11:42:06 Iru113 loolwsd[699]: kit-01700-01906 08:42:06.351529 [lokit\_002] ERR Failed to get LoKitDocument instance.| kit/ChildSession.cpp:368  
> Apr 20 11:42:06 Iru113 loolwsd[699]: kit-01700-01906 08:42:06.352289 [lokit\_002] WRN Document::ViewCallback. Session [-1] is no longer active to proc ess [ERROR] [{  
> Apr 20 11:42:06 Iru113 loolwsd[699]: “classification”: “error”,  
> Apr 20 11:42:06 Iru113 loolwsd[699]: “cmd”: “load”,  
> Apr 20 11:42:06 Iru113 loolwsd[699]: “kind”: “io”,  
> Apr 20 11:42:06 Iru113 loolwsd[699]: “code”: “770”,  
> Apr 20 11:42:06 Iru113 loolwsd[699]: “message”: “”  
> Apr 20 11:42:06 Iru113 loolwsd[699]: }  
> Apr 20 11:42:06 Iru113 loolwsd[699]: ] message to Master Session.| kit/Kit.cpp:1842

English filenames open correctly. How can i downgrade the CODE to prewious version?

---

<div class="post-metadata">

**Author:** ![sackla](https://help.nextcloud.com/user_avatar/help.nextcloud.com/sackla/32/2358_2.png) [@sackla](https://help.nextcloud.com/u/sackla)\
**Post date:** [May 15, 2018, 10:56am UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/18 "2018-05-15T10:56:05Z")

</div>

i don’t know if you still need this information.

if you are using a docker container you can pull a specific version with the corresponding tag.  
see: [https://docs.docker.com/engine/reference/commandline/pull/](https://docs.docker.com/engine/reference/commandline/pull/)  
and [https://hub.docker.com/r/collabora/code/tags/](https://hub.docker.com/r/collabora/code/tags/)

---

<div class="post-metadata">

**Author:** ![chrs79](https://help.nextcloud.com/user_avatar/help.nextcloud.com/chrs79/32/1052_2.png) [@chrs79](https://help.nextcloud.com/u/chrs79)\
**Post date:** [June 16, 2018, 6:47am UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/19 "2018-06-16T06:47:42Z")

</div>

Did you ever find a solution for fixing this without using docker? I have the same problem without using docker but installing the packges like described here [https://www.collaboraoffice.com/code/](https://www.collaboraoffice.com/code/). For me the download of the document from nextcloud works, file is not corrupted (took url from lool log, so below mentioned user/docs/zlsR1DoDPyj5BMNO/NewSpreadsheet.ods is OK) but lool fails to open the file locally. Reads like this

````auto
kit-07780-07791 06:28:02.956088 [lokit_001] INF Loading new document from URI: [file:///user/docs/zlsR1DoDPyj5BMNO/NewSpreadsheet.ods] for session [0003].| kit/Kit.cpp:1498
kit-07780-07791 06:28:02.956171 [lokit_001] DBG Calling lokit::documentLoad(file:///user/docs/zlsR1DoDPyj5BMNO/NewSpreadsheet.ods, "Language=en").| kit/Kit.cpp:1520
kit-07780-07791 06:28:02.965783 [lokit_001] TRC Document::GlobalCallback ERROR [{
    "classification": "error",
    "cmd": "load",
    "kind": "io",
    "code": "770",
    "message": ""
}```
````

---

<div class="post-metadata">

**Author:** ![Newcss](https://help.nextcloud.com/letter_avatar/newcss/32/6_22734026db12803ebb3e059622ac3534.png) [@Newcss](https://help.nextcloud.com/u/Newcss)\
**Post date:** [July 16, 2018, 11:01am UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/20 "2018-07-16T11:01:05Z")

</div>

If in the name of the document there are Russian symbols or in the name there is a gap, then receive a mistake  
“type detection failed”| kit/Kit.cpp:1527

---

<div class="post-metadata">

**Author:** ![ybabel](https://help.nextcloud.com/letter_avatar/ybabel/32/6_22734026db12803ebb3e059622ac3534.png) [@ybabel](https://help.nextcloud.com/u/ybabel)\
**Post date:** [January 27, 2019, 2:21pm UTC](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031/21 "2019-01-27T14:21:52Z")

</div>

it worked for me too.

[Next page](https://help.nextcloud.com/t/failure-please-ensure-the-file-type-is-supported-and-not-corrupted/8031.md?page=2)
