snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Can`t delete imported CSV Files via Web Interface

Open Baluga145 opened this issue 8 years ago • 16 comments

Expected Behavior (or desired behavior if a feature request)

The file should be deleted and don`t shown anymore.


Actual Behavior

I press on the delete button and nothing happens.

2018-01-03 11_39_49-import __ snipe-it opera

Please confirm you have done the following before posting your bug report:


Provide answers to these questions:

  • Is this a fresh install or an upgrade? - Fresh install.
  • Version of Snipe-IT you're running - 5.4.35
  • Version of PHP you're running - 7.1.7
  • Version of MySQL/MariaDB you're running - Mariadb: 10.1.30
  • What OS and web server you're running Snipe-IT on - Windows 2016 Server / Microsoft Web Platform Installer 5.0
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) - manual
  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error - no Error occurs
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error - https://demo.snipeitapp.com/import / I press on the trash bin symbol.
  • If a stacktrace is provided in the error, include that too. - no error occur.
  • Any errors that appear in your browser's error console. - no error occur.
  • Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo. - the Error is not reproducible on the demo.
  • Include any additional information you can find in app/storage/logs and your webserver's logs. - No Errors occur in the log.
  • Include what you've done so far in the installation, and if you got any error messages along the way. - I checked Premissions on the folder and the file under: C:\inetpub\wwwroot\snipe-it\storage\private_uploads\imports. The premission Full control is set for IUSR and IIS_IUSRS. I tried it with different Browser.
  • Indicate whether or not you've manually edited any data directly in the database - I did nothing manually with the data in the database.

best regards Baluga

Baluga145 avatar Jan 03 '18 12:01 Baluga145

Without an error, there's not going to be much I can do to debug this issue. Check the permissions of your storage directory and subdirectories.

snipe avatar Jan 20 '18 04:01 snipe

Excuse me for the circumstances, but today i have found the error in the console.

all.js?id=722d1692756a30dc1ece:10 DELETE http://assets.company.com/api/v1/imports/10 405 (Method Not Allowed) (anonymous) @ all.js?id=722d1692756a30dc1ece:10 s @ all.js?id=722d1692756a30dc1ece:9 vt @ all.js?id=722d1692756a30dc1ece:10 F @ all.js?id=722d1692756a30dc1ece:9 l @ all.js?id=722d1692756a30dc1ece:10 u @ all.js?id=722d1692756a30dc1ece:10 ft @ all.js?id=722d1692756a30dc1ece:10 l @ all.js?id=722d1692756a30dc1ece:10 u @ all.js?id=722d1692756a30dc1ece:10 gt @ all.js?id=722d1692756a30dc1ece:10 l @ all.js?id=722d1692756a30dc1ece:10 u @ all.js?id=722d1692756a30dc1ece:10 pt @ all.js?id=722d1692756a30dc1ece:10 l @ all.js?id=722d1692756a30dc1ece:10 u @ all.js?id=722d1692756a30dc1ece:10 ht @ all.js?id=722d1692756a30dc1ece:9 l @ all.js?id=722d1692756a30dc1ece:10 u @ all.js?id=722d1692756a30dc1ece:10 ct @ all.js?id=722d1692756a30dc1ece:9 l @ all.js?id=722d1692756a30dc1ece:10 u @ all.js?id=722d1692756a30dc1ece:10 mt @ all.js?id=722d1692756a30dc1ece:10 l @ all.js?id=722d1692756a30dc1ece:10 u @ all.js?id=722d1692756a30dc1ece:10 ut @ all.js?id=722d1692756a30dc1ece:9 l @ all.js?id=722d1692756a30dc1ece:10 u @ all.js?id=722d1692756a30dc1ece:10 (anonymous) @ all.js?id=722d1692756a30dc1ece:10 l @ all.js?id=722d1692756a30dc1ece:10 (anonymous) @ all.js?id=722d1692756a30dc1ece:10 s @ all.js?id=722d1692756a30dc1ece:9 e @ all.js?id=722d1692756a30dc1ece:10 z @ all.js?id=722d1692756a30dc1ece:9 z.(anonymous function) @ all.js?id=722d1692756a30dc1ece:10 deleteFile @ all.js?id=722d1692756a30dc1ece:21 i @ all.js?id=722d1692756a30dc1ece:4 click @ VM133:2 e @ all.js?id=722d1692756a30dc1ece:5

best regards Baluga

Baluga145 avatar Jan 25 '18 08:01 Baluga145

I need the error log from the app, not the error log from the browser.

snipe avatar Jan 25 '18 11:01 snipe

When I press on the bin symbol nothing happens. No error occur, neither in the console or in my Logs. My debugbar folder is full with .json files. In my eyes i can exclude a premission problem on the folder.

screenshot

Baluga145 avatar Jan 25 '18 13:01 Baluga145

I too have this same issue.

Nothing appears in snipe-it/storage in the laravel logs. It is like an error didn't even happen.

The fact that the red error box in the GUI is also blank supports the claim that there is nothing being logged.

j-ogas avatar Feb 06 '18 16:02 j-ogas

@j-ogas do those files actually exist in your file system?

snipe avatar Feb 06 '18 17:02 snipe

@snipe Good point. No, the .csv files no longer exist in the directory they were uploaded from.

I was experimenting with the Import function in my test environment and would delete/rename the .csv file after modifying it (for science).

This test environment is using Snipe-IT v4.1.8, MariaDB 10.0.14, PHP 5.6.x

j-ogas avatar Feb 06 '18 20:02 j-ogas

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

stale[bot] avatar May 05 '18 04:05 stale[bot]

can we delete the import files that already been used to avoid unnecessary import? @snipe

markwizer avatar Jul 26 '18 02:07 markwizer

@markwizer i think it`s not a Snipe-it problem. Its a long time ago but i solved the problem in the IIS Manager on the Asset Server. Did you configure SSL correctly ? Go in the IIS Manager -> on your Server -> Sites -> Snipe IT -> SSL Settings .

Baluga145 avatar Jul 26 '18 06:07 Baluga145

is that the only way @Baluga145

markwizer avatar Jul 26 '18 06:07 markwizer

is the delete button there for display purposes? @snipe because it can't delete even if the file is freshly imported

markwizer avatar Jul 26 '18 07:07 markwizer

@markwizer yes, we’re in the habit of putting buttons in our UI just for decoration. That seems like a good investment of our time. 🙄

If you’re having a problem, open a new issue with specifics about what you’re seeing, with all of the info we ask for in new issues. This issue is old and we’ve released several versions since then.

It might be a bug, it might not be, but sarcastic accusations aren’t going to get your issue solved any faster.

snipe avatar Jul 26 '18 08:07 snipe

okay @snipe thanks

markwizer avatar Jul 26 '18 08:07 markwizer

Can I re-open this issue, I have exactly the same problem.

PHP is 7.1.33, with the latest Snipe-It 4.9.2

I'm also using IIS in Windows Server 2008 R2. I already allowed DELETE for PHP FastCGI module handler, but it still report 405 error when I click the delete button

There is no SSL for the website, just HTTP

tamws27 avatar May 18 '20 06:05 tamws27

I found the solution myself, I found that the IIS WebDAV module conflict with Snipe-IT. I end-up follow this page's suggestion (https://stackoverflow.com/questions/4413455/why-does-http-delete-verb-return-405-error-method-not-allowed-for-my-restful-w) to remove the WebDAV handler and WebDAV module at the Snipe-IT WebSite and then I can finally delete the import files

Stack Overflow
Can anyone shed any light on this? I feel like I have wasted the entire day today hunting and searching the internet for any scrap of information about how to do this. I have created a very simpl...

tamws27 avatar May 18 '20 07:05 tamws27