Import not working in V3
Expected Behavior (or desired behavior if a feature request)
Being able to import a csv file
Actual Behavior
Rather than failing with an error, it's been just hanging indefinitely at the initial step of uploading the file (I'm not clear how to turn on debug mode)
Please confirm you have done the following before posting your bug report:
- [ ] I have enabled debug mode
- [X] I have read checked the Common Issues page
Please provide answers to these questions before posting your bug report:
- Version of Snipe-IT you're running v3.0.0-dev-3
- What OS and web server you're running Snipe-IT on Fedora 24 Linux
- What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) Manual
- If you're getting an error in your browser, include that error No Error
- What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error Import
- If a stacktrace is provided in the error, include that too. None
- Any errors that appear in your browser's error console. None
- Confirm whether the error is reproduceable on the demo. Not tried
- Include any additional information you can find in
app/storage/logsand your webserver's logs. - Include what you've done so far in the installation, and if you got any error messages along the way. Rebooted and tried multiple times. Have done an import before
- Indicate whether or not you've manually edited any data directly in the database NO
OK we tried the command line import and that worked. So it looks like it might be the upload process stalling. BTW the output to the screen during the command line process is great! cd --snipeit install dir-- php artisan:import --path to csv file--
Can you check that your storage/private_uploads/imports/assets directory is writable?
If this is a recent version of v3, there should be an error shown if the the directory isn't writable. I think.
I checked the dir storage/private_uploads/imports/assets and it was (and the whole path) was 755 and owned by apache. Within that directory I found said upload files (set to 644) and also owned by apache. So it looks to be writing to the directory just fine. I did check the the files were really cvs files and they were.
OK actually the files were the old files I mentioned as we had previously imported.
So what's the status of this?
We were able to do the import through the command line but not through the web interface. I checked that the dirs have the proper permissions. So I'm not sure what the problem is. However we can do it through the CMI so we are ok.
Hello,
we are experiencing a similar issue. Uploading files through UI does not work (bar fills 100% and stays like this) without finding something in the logs of SnipeIT or Nginx.
Folders are there and accessible. If we upload manually to this folder it is shown in UI and cmd processing of imports is working as well.
Therefore only the upload is not working and the browser gives the following:

Thanks Stefan
Can you check the javascript console? It's usually in the developer tools menu of your browser.
Hello,
I checked in Chrome and Firefox but the Console stays empty (JS Errors and Warnings to be logged).
Otherwise I would have posted it here, or do you mean something else?
Thanks Stefan
We never got it working through the browser.
The only reason that upload should fail is if the directory (storage/private_uploads/imports/assets) isn't writable.
we made it part of our process to do it on the Command Line which I'm totally comfortable with anyways. My dir has the correct ownership and permissions so I don't know what else it could be.
Hello,
@pnelsonsr thanks for the feedbacks.
@snipe I can definitely say that our folders are owned by the web server user and can be written by him as after copying the file into the folder, we use the UI to process the import and the .txt files generated during this process are stored there properly.
Thanks Stefan
Similar issue experienced on our end. Using the UI to import now hangs at 0%. Previously, (evening before) , I was able to import the same or similar files csv files , however, now all files hang. I cleared out the assets folder and cycled both docker containers (snipeit and mysql), however, same result. Are there any other file locations/storage, etc that can be cleared out try and push forward? using v3.4
Confirming we also have the originally reported and later confirmed issue. You can not upload a CSV via the web UI, it never goes past 0%. This is using the example csv from the documentation site. No idea where there are any sort of error logs with this software that may explain why this is failing, happy to look if there is such a thing. This is with v3.3 but I see above 3.4 also reported. Seems this is a persistent issue? Has it been fixed in a new release with no update to this thread? I'd update and try but I've been searching for a couple weeks how to actually update the software when it was installed with the install.sh method and no one seems to know...
No idea where there are any sort of error logs with this software that may explain why this is failing
https://snipe-it.readme.io/docs/getting-help#step-3-check-your-app-and-server-logs
Seems this is a persistent issue? Has it been fixed in a new release with no update to this thread?
When the upload never gets past 0%, it's almost always a permissions error on your end, not a software issue on ours.
Thanks for that info. There seems to be some points of deficiency here. There is nothing in the log file, so whatever is going wrong is failing to generate an error (or fail out at all given it sits at 0% indefinitely). That would seem to be a behavior that could be improved. Because there is no error, there is nothing to go on to fix this problem. Also worth noting that app_debug is set true and still no errors are generated.
Given this instance was created with the install.sh as mentioned, if there is a permissions problem that would indicate a deficiency in the installer. Other web products I've used do a health check that would check among other things permissions and show you the things that are in need of action. Is there a function like this with Snipe that I've overlooked?
As others have stated in response to mention of the assets directory permissions previously, the permissions are set as expected, which is the webserver (www-data) has write access. If there is some other permission issue, again we have no way to tell what it is due to lack of error/log on the issue. I set the directory to rwx for all and still no luck, permissions don't get much wider than that. Any advice is appreciated.
Oddly, the assets directory had a great number of csv and txt files in it, but most were 0 bytes in size. Again most, not all, so it's still unclear why some files would be uploading and others not, even just minutes apart. And, if some did upload ok, why did it still stick at 0% and not import anything? I deleted all the files and tried another import. Still sticks at 0%, and now nothing is being written at all, not even 0 bytes. Still nothing in the laravel.log either (other than authentication notes).
With respect, this very much seems like a software issue so far. While somewhat off topic, I'm also more than happy to update to 3.6 to see if that changes anything if you can provide some guidance how to do that. Thanks!
What about browser errors? That's an Ajax uploader, so if your APP_URL is not exactly the same as the URL you use to get to the app, the Ajax won't fire correctly.
AH HA! So there is either a flaw somewhere, or a note missing, or I just plain goofed because I didn't know there was another setting... Any way you slice it, it would be great if the software would check for this issue and/ or report the failure better. The problem was the site is set up for https. The app_url in the .env file was set to http://. This caused the upload to be silently blocked due to mixed active content issues in the security of the site. As soon as I changed the .env to https it uploads fine. Important safety tip!
It's also worth noting (admittedly for those gunshy about clicking buttons or looking around) that the import does not actually import, it only uploads. You then have to click the process button next to the uploaded file in the import screen. I'd offer a couple thoughts on this:
- The button for "Select Import File" should maybe say "Upload".
- The button for "Process" should maybe say "Import"
- Once a file has been imported, perhaps it should be deleted automatically, or if not a "Delete" button should be added next to the Import button for the file. I think these things would make the UI more clear, and the clean up is probably important. Although importing (process) the file a second time doesn't seem to be an issue, this upload screen could become cluttered in some settings. If this was being left as a type of log, perhaps logging to a real import log would be better?
Thanks for the assist, hope this helps others/ is useful feedback :)
