# Invalid file type “application/octet-stream”. Use a file that matches of of the following mime types: “text/csv”, “text/plain”

**URL:** <https://forum.mautic.org/t/invalid-file-type-application-octet-stream-use-a-file-that-matches-of-of-the-following-mime-types-text-csv-text-plain/15561>\
**Category:** Product Support\
**Created:** [August 7, 2020, 11:57pm UTC](https://forum.mautic.org/t/invalid-file-type-application-octet-stream-use-a-file-that-matches-of-of-the-following-mime-types-text-csv-text-plain/15561 "2020-08-07T23:57:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [August 7, 2020, 11:57pm UTC](https://forum.mautic.org/t/invalid-file-type-application-octet-stream-use-a-file-that-matches-of-of-the-following-mime-types-text-csv-text-plain/15561/1 "2020-08-07T23:57:07Z")

</div>

**Your software**  
My Mautic version is:3.0.2  
My PHP version is:7.3

**Your problem**  
My problem is: When importing csv files the following error occurs : invalid file type “application/octet-stream”. Use a file that matches of of the following mime types: “text/csv”, “text/plain”.

These errors are showing in the log: None

Steps I have tried to fix the problem: Cleared cache, google brought me to an old mautic post with no solution! Drank an energy drink, went swimming, rebooted server, tried again. same problem

[IMG\_5934|482x499](https://forum.mautic.org/uploads/short-url/sgH7d8Xu1BpfgtKJpN185eL4oh.jpeg)

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [August 8, 2020, 12:17am UTC](https://forum.mautic.org/t/invalid-file-type-application-octet-stream-use-a-file-that-matches-of-of-the-following-mime-types-text-csv-text-plain/15561/2 "2020-08-08T00:17:41Z")

</div>

Import failed. Reason: There was a database error: The EntityManager is closed… The import was set to delayed state and will be imported later.  
This error occurs after uploaded another file and setting to import in background and using CLI to start import.

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [August 8, 2020, 2:12pm UTC](https://forum.mautic.org/t/invalid-file-type-application-octet-stream-use-a-file-that-matches-of-of-the-following-mime-types-text-csv-text-plain/15561/3 "2020-08-08T14:12:59Z")

</div>

[2020-08-08 00:14:19] mautic.WARNING: Command `mautic:import` exited with status code 1

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [August 8, 2020, 2:33pm UTC](https://forum.mautic.org/t/invalid-file-type-application-octet-stream-use-a-file-that-matches-of-of-the-following-mime-types-text-csv-text-plain/15561/4 "2020-08-08T14:33:19Z")

</div>

[08-Aug-2020 07:38:57] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1504 said into stderr: “#1 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\RotatingFileHandler-\>write(Array)”  
[08-Aug-2020 07:38:57] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1504 said into stderr: “#2 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler-\>handle(Array)”  
[08-Aug-2020 07:38:57] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1504 said into stderr: “#3 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolo…”  
[08-Aug-2020 07:38:57] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1504 said into stderr: “NOTICE: PHP message: PHP Fatal error: Uncaught UnexpectedValueException: The stream or file “/var/www/vhosts/mautic-install.com/howdy.mautic-install.com/app/…/var/logs/mautic\_prod-2020-08-08.php” could not be opened: failed to open stream: Permission denied in /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:108”  
[08-Aug-2020 07:38:57] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1504 said into stderr: “Stack trace:”  
[08-Aug-2020 07:38:57] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1504 said into stderr: “#0 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(119): Monolog\Handler\StreamHandler-\>write(Array)”  
[08-Aug-2020 07:38:57] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1504 said into stderr: “#1 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\RotatingFileHandler-\>write(Array)”  
[08-Aug-2020 07:38:57] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1504 said into stderr: “#2 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler-\>handle(Array)”  
[08-Aug-2020 07:38:57] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1504 said into stderr: “#3 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolo…”  
[08-Aug-2020 07:38:58] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1523 said into stderr: “NOTICE: PHP message: PHP Fatal error: Uncaught UnexpectedValueException: The stream or file “/var/www/vhosts/mautic-install.com/howdy.mautic-install.com/app/…/var/logs/mautic\_prod-2020-08-08.php” could not be opened: failed to open stream: Permission denied in /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:108”  
[08-Aug-2020 07:38:58] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1523 said into stderr: “Stack trace:”  
[08-Aug-2020 07:38:58] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1523 said into stderr: “#0 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(119): Monolog\Handler\StreamHandler-\>write(Array)”  
[08-Aug-2020 07:38:58] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1523 said into stderr: “#1 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\RotatingFileHandler-\>write(Array)”  
[08-Aug-2020 07:38:58] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1523 said into stderr: “#2 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler-\>handle(Array)”  
[08-Aug-2020 07:38:58] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1523 said into stderr: “#3 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolo…”  
[08-Aug-2020 07:38:58] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1523 said into stderr: “NOTICE: PHP message: PHP Fatal error: Uncaught UnexpectedValueException: The stream or file “/var/www/vhosts/mautic-install.com/howdy.mautic-install.com/app/…/var/logs/mautic\_prod-2020-08-08.php” could not be opened: failed to open stream: Permission denied in /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:108”  
[08-Aug-2020 07:38:58] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1523 said into stderr: “Stack trace:”  
[08-Aug-2020 07:38:58] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1523 said into stderr: “#0 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(119): Monolog\Handler\StreamHandler-\>write(Array)”  
[08-Aug-2020 07:38:58] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1523 said into stderr: “#1 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\RotatingFileHandler-\>write(Array)”  
[08-Aug-2020 07:38:58] WARNING: [pool [howdy.mautic-install.com](http://howdy.mautic-install.com)] child 1523 said into stderr: "#2 /var/www/vhosts/mautic-install.com/howdy.mautic-install.com/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [August 11, 2020, 2:07pm UTC](https://forum.mautic.org/t/invalid-file-type-application-octet-stream-use-a-file-that-matches-of-of-the-following-mime-types-text-csv-text-plain/15561/5 "2020-08-11T14:07:25Z")

</div>

58400/200213 [========\>-------------------] 29%Import failed. Reason: There was a database error: The EntityManager is closed… The import was set to delayed state and will be imported later.
