noshutdown-ru / vault

Is a plugin for project management system Redmine. Allows you to store various passwords/keys in one place for the project.
https://noshutdown.ru/en/redmine-plugins-vault
46 stars 29 forks source link

Backup NoMethodError (undefined method `file' #60

Open redfox1993 opened 4 years ago

redfox1993 commented 4 years ago

Hi there,

Your plugin is great so far, but I got an error when I want to create a backup. I am using Redmine 4.1

Started POST "/vault_settings/backup" for 192.168.50.179 at 2020-01-30 16:19:08 +0000
Processing by VaultSettingsController#backup as HTML
  Parameters: {"authenticity_token"=>"BXrm/ECyiienrnghuc4w7HPyw/nGNfCft/QIP/Eap22DFR99+gzOkeibptcVB4VZVTfGX8FPUaBRrQGnpAhJEA=="}
  Current user: admin (id=1)
Completed 500 Internal Server Error in 28ms (ActiveRecord: 9.0ms)

NoMethodError (undefined method `file' for #<Zip::File:0x00007f7479682aa0>):

plugins/vault/app/controllers/vault_settings_controller.rb:55:in `block in backup'
plugins/vault/app/controllers/vault_settings_controller.rb:54:in `backup'
lib/redmine/sudo_mode.rb:65:in `sudo_mode'
plugins/redmine_dmsf/lib/redmine_dmsf/webdav/custom_middleware.rb:68:in `call'

What can I do? kind regards Red

noshutdown-ru-user commented 4 years ago

Thx for report, will take a look this weekends, looks some bug, pls wait a bit

noshutdown-ru-user commented 4 years ago

This problem can be related to other plugin which is using gem zip. Gem zip and rubyzip have same names for modules. Can you check Gemfiles of plugins is any of them using zip ?

redfox1993 commented 4 years ago

Sorry i dont understand. I am at the beginning to understand ruby.
The error comes up, when I was trying to backup the vault.

I dont think that my other installed plugins used zip but If so, is it not possible to make using the right module in your plugin?

noshutdown-ru-user commented 4 years ago

Can you try this branch https://github.com/noshutdown-ru/vault/tree/development

noshutdown-ru-user commented 4 years ago

Sorry i dont understand. I am at the beginning to understand ruby. The error comes up, when I was trying to backup the vault.

I dont think that my other installed plugins used zip but If so, is it not possible to make using the right module in your plugin?

Can you provide list of installed plugins ?

redfox1993 commented 4 years ago

I have changed the branch to development and pulled it.

Fast-forward .travis.yml | 2 +- Gemfile | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)

then bundle install.

Now I was not able to call my Redmine application. I couldn't find any error logs, so I have pulled back to the master branch and everything was fine again.

the other plugin that uses rubyzip is the dmsf plugin. (maybe? https://github.com/danmunn/redmine_dmsf/pull/110)

noshutdown-ru-user commented 4 years ago

Can you remove this plugin and try with master branch of vault ? Also can you comment this strings in hist plugin https://github.com/danmunn/redmine_dmsf/blob/master/Gemfile#L23-L24 and try our master branch ?

redfox1993 commented 4 years ago

I 've commented the lines but it doesn't work, though. I'm afraid that removing the DMSF Plugin is not an option, cause of WebDAV, documents, full text, etc :(

noshutdown-ru-user commented 4 years ago

We will try to check is it connected to this plugin https://github.com/danmunn/redmine_dmsf or something else.

redfox1993 commented 4 years ago

Hi there, Any progress?

noshutdown-ru-user commented 4 years ago

not yet, sorry

noshutdown-ru-user commented 4 years ago

with old version all work ?

redfox1993 commented 4 years ago

with the old version, I can start my Redmine site. The Development branch causes a crash of my Redmine.

noshutdown-ru-user commented 4 years ago

ok pls don't use now Development