Error : Unable to read the imported csv file [Mautic 3.2.5]

Your software
My Mautic version is: 3.2.5
My PHP version is: 7.2.23
My Database type and version is: MariaDB, 10.3.16

Your problem
My problem is: We’ve updated to Mautic 3.2.5 and now I can no longer ‘import’ csv files into contacts.

We’ve tried these things with no fix :

  1. Ran cron jobs as suggested
  2. Removed empty columns, header from csv file
  3. Made sure csv file is utf8

Everything else as of now seems to be operating ok but I do know we need to run the ‘upgrade_v3.php’ again and prompt to remove the backups it made and upgrade script itself from the public access.

But everything should be operating before we do this right?

Thank you!!


**ALL THINGS BELOW ARE MESSAGES FROM OUR HOSTING PROVIDER HELPING US WITH SET UP AND TROUBLESHOOTING : **

Hello Christopher,

I’ve tried the command line upgrade as indicated in Security release for all versions of Mautic prior to 2.16.5 and 3.2.4 , but I got this message:

Are you sure you wish to update Mautic to the latest version? Y
Step    1 [->--------------------------] Loading specified package...

You can only upgrade to Mautic 3 by running 'php upgrade_v3.php' instead of this command.

After that I’ve used the line indicated above with the --ignore-warnings flag but I’m still getting this error:

Getting the amount of available Mautic 2 database migrations... This might take a while!
ERR_MAUTIC_2_MIGRATIONS_IDENTIFICATION_FAILED: We couldn't reliably detect the amount of available database migrations.
ERR_MAUTIC_2_MIGRATIONS_IDENTIFICATION_FAILED: We couldn't reliably detect the amount of available database migrations.. For more details about this message, see http://mau.tc/m3-upgrade-error#err_mautic_2_migrations_identification_failed

I’m not sure what it means by “We couldn’t reliably detect the amount of available database migrations.”. The database seems to be intact.

Hello, Chris.

The Mautic upgrade error logs lists this error:

The file containing the list of deleted files was not found, could not process the deleted file list.

It doesn’t give us much.

Before we go further, I see Nikita applied necessary security upgrades for the current Mautic version 2.x. The new message suggests to migrate to the version 3.x. Do you need to migrate to another version? As this is a migration to another version, things might be broken while we are working on this. If so, we will make a full backup of the Mautic and attempt to upgrade it. Please let us know.

Hello, Christopher.

The update is complete. The update script updated me to the version 3.2.4 and then asked to update to 3.2.5.
I made a backup before each update:

in /home/httpd/html/j4ir9al2.killtv.me:
20M     mautic_db.sql_Jan_25_2021
20M     mautic_db.sql_Jan_25_2021_3.2.4
329M    public_html_Jan_25_2021
837M    public_html_Jan_25_2021_3.2.4

Please recheck. If everything is fine, we will need to run the ‘upgrade_v3.php’ again and prompt to remove the backups it made and upgrade script itself from the public access.

Hi,

I have added this cron line:

/usr/local/bin/php /home/httpd/html/j4ir9al2.killtv.me/public_html/bin/console mautic:import

let us know if you continue to see problems at this point. thanks!

Hi, when u run the cron by hand - what is the message?

Let me ask our host and see.

FROM HOST:

I didn’t get anything when I run the cron task manually:

bash-4.2$ /usr/local/bin/php /home/httpd/html/[j4ir9al2.killtv.me/public_html/bin/console](http://j4ir9al2.killtv.me/public_html/bin/console) mautic:import
bash-4.2$

[root@srv ~]# /usr/local/bin/php /home/httpd/html/[j4ir9al2.killtv.me/public_html/bin/console](http://j4ir9al2.killtv.me/public_html/bin/console) mautic:import
[root@srv ~]# 

If anyone has any solutions or ideas that’d be amazing!

Haven’t been able to import contacts for almost a week now and can’t send anything out to new members… Hopefully this issue helps others since the only discussion on this is from 3 years ago…

Thanks!

run the same command with -vvv at the end to see debug output

EJl,

Thank you for that!

I guess our host fixed the issue…?

Looks like it was a permissions issue?! Hope this helps anyone in the future if they run into similar situation!!

This is what they said :

I’ve updated permissions for your Mautic installation and now uploaded files can be imported without issues, could you please check again, as I’m able to import your CSV file.

1 Like

if you use webhosting for Mautic

Make sure that var/tmp directory is writable by the process (daemon or www-data or apache) and it will work. The issue is that mautic is not able to access the file in var/tmp/import/filename.csv and therefore returning error.