Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"The file could not be found" error not saying what the problem is #220

Closed
gestature opened this issue Nov 19, 2020 · 1 comment
Closed

Comments

@gestature
Copy link

Hello,

When I submit a file in "File to inject" for a model creation in Datainjection plugin, I get the red popup saying "The file could not be found" (in english but the site is in french, buts that's certainly not related to my issue).

I didn't know what to do. I found a #60 which was already fixed in my recent release. So... I start to encode this issue and I write this sentence : "If I choose a csv, xlsx or txt file it says the same." but I realize I never tried CSV files, only XLSX, thinking this perfect tool will read my xlsx... So I try a csv file and it works!

In my opinion there are two problems (a third problem is the person in between the screen and the keyboard... okay):

  • it is not said anywhere near the file selection button that it requires a CSV file (even if we have to choose a separator char...)
  • the error message is lazy. It should at least talk about usual file import problems (extension, size, content)

I'm very happy to see that, like always, talking about the problem is half (or more) the solution! Thank you

GLPI 9.5.2 (/glpi => /var/www/html/glpi)
Installation mode: TARBALL
datainjection Name: Data injection Version: 2.8.1 State: Enabled

Operating system: Linux srvglpi 4.19.0-12-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18) x86_64
PHP 7.3.19-1~deb10u1 apache2handler (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apc, apcu, bz2,
calendar, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, http, iconv, intl, json, ldap, libxml,
mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, posix, propro, raphf, readline, session, shmop, sockets, sodium, standard,
sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib)
Setup: max_execution_time="600" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files"
upload_max_filesize="20M"
Software: Apache/2.4.38 (Debian) (Apache/2.4.38 (Debian) Server at srvglpi.localhost Port 80)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0
Server Software: Debian 10
Server Version: 10.3.25-MariaDB-0+deb10u1
Server SQL Mode:
Parameters: glpi@localhost/glpi
Host info: Localhost via UNIX socket

PHP version is at least 7.2.0 - Perfect!PHP version is at least 7.2.0 - Perfect!
Sessions support is available - Perfect!Sessions support is available - Perfect!
Allocated memory > 64 Mio - Perfect!Allocated memory > 64 Mio - Perfect!
mysqli extension is installedmysqli extension is installed
ctype extension is installedctype extension is installed
fileinfo extension is installedfileinfo extension is installed
json extension is installedjson extension is installed
mbstring extension is installedmbstring extension is installed
iconv extension is installediconv extension is installed
zlib extension is installedzlib extension is installed
curl extension is installedcurl extension is installed
gd extension is installedgd extension is installed
simplexml extension is installedsimplexml extension is installed
intl extension is installedintl extension is installed
ldap extension is installedldap extension is installed
apcu extension is installedapcu extension is installed
Zend OPcache extension is installedZend OPcache extension is installed
xmlrpc extension is installedxmlrpc extension is installed
CAS extension is installedCAS extension is installed
exif extension is installedexif extension is installed
zip extension is installedzip extension is installed
bz2 extension is installedbz2 extension is installed
sodium extension is installedsodium extension is installed
Database version seems correct (10.3.25) - Perfect!Database version seems correct (10.3.25) - Perfect!
Access to timezone database (mysql) is not allowed.Access to timezone database (mysql) is not allowed.
The log file has been created successfully.The log file has been created successfully.
Write access to /var/www/html/glpi/config has been validated.Write access to /var/www/html/glpi/config has been validated.
Write access to /var/www/html/glpi/files has been validated.Write access to /var/www/html/glpi/files has been validated.
Write access to /var/www/html/glpi/files/_dumps has been validated.Write access to /var/www/html/glpi/files/_dumps has been validated.
Write access to /var/www/html/glpi/files/_sessions has been validated.Write access to /var/www/html/glpi/files/_sessions has been validated.
Write access to /var/www/html/glpi/files/_cron has been validated.Write access to /var/www/html/glpi/files/_cron has been validated.
Write access to /var/www/html/glpi/files/_graphs has been validated.Write access to /var/www/html/glpi/files/_graphs has been validated.
Write access to /var/www/html/glpi/files/_lock has been validated.Write access to /var/www/html/glpi/files/_lock has been validated.
Write access to /var/www/html/glpi/files/_plugins has been validated.Write access to /var/www/html/glpi/files/_plugins has been validated.
Write access to /var/www/html/glpi/files/_tmp has been validated.Write access to /var/www/html/glpi/files/_tmp has been validated.
Write access to /var/www/html/glpi/files/_cache has been validated.Write access to /var/www/html/glpi/files/_cache has been validated.
Write access to /var/www/html/glpi/files/_rss has been validated.Write access to /var/www/html/glpi/files/_rss has been validated.
Write access to /var/www/html/glpi/files/_uploads has been validated.Write access to /var/www/html/glpi/files/_uploads has been validated.
Write access to /var/www/html/glpi/files/_pictures has been validated.Write access to /var/www/html/glpi/files/_pictures has been validated.
Write access to /var/www/html/glpi/marketplace has been validated.Write access to /var/www/html/glpi/marketplace has been validated.
Web access to the files directory should not be allowed Check the .htaccess file and the web server configuration.Web access to the files directory should not be allowed
Check the .htaccess file and the web server configuration.

@richlv
Copy link

richlv commented Feb 2, 2024

Ouch. I was trying to upload a file with .txt, and was getting this confusing - incorrect - error message.
Simply renaming to .csv suddenly made the file "appear".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants