alexbevi / redmine_dropbox_attachments

Use Dropbox as the storage backend for your Redmine installation
23 stars 10 forks source link

Error while download uploaded file in module "File" with version #14

Open levabd opened 11 years ago

levabd commented 11 years ago

Once you have resolved #13, everything works, except the download (remove) attachment to the module "files" and the latest version (without the version everything is fine.) In the database this files are identified as container_type == "Version" (not "Project"). When I download (remove) this file, I gоt an error 500.

PS: This defect is not critical, just trying to help in testing.

log output:

Started GET "/attachments/download/23/%d0%a4%d0%be%d1%82%d0%be%d0%b3%d0%b0%d0%bb%d0%b5%d1%80%d0%b5%d1%8f_%d0%b2%d0%bd%d1%83%d1%82%d1%80.png" for 77.87.43.232 at 2013-04-20 05:03:23 +0000 Processing by AttachmentsController#download as HTML Parameters: {"id"=>"23", "filename"=>"Фотогалерея_внутр.png"} Current user: levabd (id=3) Completed 500 Internal Server Error in 1022ms

Dropbox::API::Error::NotFound (Dropbox::API::Error::NotFound): dropbox-api (0.3.2) lib/dropbox-api/connection/requests.rb:19:in request' dropbox-api (0.3.2) lib/dropbox-api/connection/requests.rb:43:inget' dropbox-api (0.3.2) lib/dropbox-api/client/raw.rb:27:in request' (eval):3:inmetadata' dropbox-api (0.3.2) lib/dropbox-api/client.rb:21:in find' plugins/redmine_dropbox_attachments/lib/redmine_dropbox/attachments_controller_patch.rb:30:inrescue in redirect_to_dropbox' plugins/redmine_dropbox_attachments/lib/redmine_dropbox/attachments_controller_patch.rb:26:in redirect_to_dropbox' plugins/redmine_dropbox_attachments/lib/redmine_dropbox/attachments_controller_patch.rb:83:inprepare_dropbox_redirect' activesupport (3.2.13) lib/active_support/callbacks.rb:484:in _run__439007100__process_action__1040475855__callbacks' activesupport (3.2.13) lib/active_support/callbacks.rb:405:inrun_callback' activesupport (3.2.13) lib/active_support/callbacks.rb:385:in _run_process_action_callbacks' activesupport (3.2.13) lib/active_support/callbacks.rb:81:inrun_callbacks' actionpack (3.2.13) lib/abstract_controller/callbacks.rb:17:in process_action' actionpack (3.2.13) lib/action_controller/metal/rescue.rb:29:inprocess_action' actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:30:in block in process_action' activesupport (3.2.13) lib/active_support/notifications.rb:123:inblock in instrument' activesupport (3.2.13) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (3.2.13) lib/active_support/notifications.rb:123:ininstrument' actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:29:in process_action' actionpack (3.2.13) lib/action_controller/metal/params_wrapper.rb:207:inprocess_action' activerecord (3.2.13) lib/active_record/railties/controller_runtime.rb:18:in process_action' actionpack (3.2.13) lib/abstract_controller/base.rb:121:inprocess' actionpack (3.2.13) lib/abstract_controller/rendering.rb:45:in process' actionpack (3.2.13) lib/action_controller/metal.rb:203:indispatch' actionpack (3.2.13) lib/action_controller/metal/rack_delegation.rb:14:in dispatch' actionpack (3.2.13) lib/action_controller/metal.rb:246:inblock in action' actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:in call' actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:indispatch' actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:36:in call' journey (1.0.4) lib/journey/router.rb:68:inblock in call' journey (1.0.4) lib/journey/router.rb:56:in each' journey (1.0.4) lib/journey/router.rb:56:incall' Dropbox::API::Error::NotFound (Dropbox::API::Error::NotFound): dropbox-api (0.3.2) lib/dropbox-api/connection/requests.rb:19:in request' dropbox-api (0.3.2) lib/dropbox-api/connection/requests.rb:43:inget' dropbox-api (0.3.2) lib/dropbox-api/client/raw.rb:27:in request' (eval):3:inmetadata' dropbox-api (0.3.2) lib/dropbox-api/client.rb:21:in find' plugins/redmine_dropbox_attachments/lib/redmine_dropbox/attachments_controller_patch.rb:30:inrescue in redirect_to_dropbox' plugins/redmine_dropbox_attachments/lib/redmine_dropbox/attachments_controller_patch.rb:26:in redirect_to_dropbox' plugins/redmine_dropbox_attachments/lib/redmine_dropbox/attachments_controller_patch.rb:83:inprepare_dropbox_redirect' activesupport (3.2.13) lib/active_support/callbacks.rb:484:in `_run439007100process_action1040475855callbacks' activesupport (3.2.13) lib/active_support/callbacks.rb:405:in`run_callback' activesupport (3.2.13) lib/active_support/callbacks.rb:385:in _run_process_action_callbacks' activesupport (3.2.13) lib/active_support/callbacks.rb:81:inrun_callbacks' actionpack (3.2.13) lib/abstract_controller/callbacks.rb:17:in process_action' actionpack (3.2.13) lib/action_controller/metal/rescue.rb:29:inprocess_action' actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:30:in block in process_action' activesupport (3.2.13) lib/active_support/notifications.rb:123:inblock in instrument' activesupport (3.2.13) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (3.2.13) lib/active_support/notifications.rb:123:ininstrument' actionpack (3.2.13) lib/action_controller/metal/instrumentation.rb:29:in process_action' actionpack (3.2.13) lib/action_controller/metal/params_wrapper.rb:207:inprocess_action' activerecord (3.2.13) lib/active_record/railties/controller_runtime.rb:18:in process_action' actionpack (3.2.13) lib/abstract_controller/base.rb:121:inprocess' actionpack (3.2.13) lib/abstract_controller/rendering.rb:45:in process' actionpack (3.2.13) lib/action_controller/metal.rb:203:indispatch' actionpack (3.2.13) lib/action_controller/metal/rack_delegation.rb:14:in dispatch' actionpack (3.2.13) lib/action_controller/metal.rb:246:inblock in action' actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:in call' actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:73:indispatch' actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:36:in call' journey (1.0.4) lib/journey/router.rb:68:inblock in call' journey (1.0.4) lib/journey/router.rb:56:in each' journey (1.0.4) lib/journey/router.rb:56:incall' actionpack (3.2.13) lib/action_dispatch/routing/route_set.rb:612:in call' rack-openid (1.3.1) lib/rack/openid.rb:98:incall' actionpack (3.2.13) lib/action_dispatch/middleware/best_standards_support.rb:17:in call' rack (1.4.5) lib/rack/etag.rb:23:incall' rack (1.4.5) lib/rack/conditionalget.rb:25:in call' actionpack (3.2.13) lib/action_dispatch/middleware/head.rb:14:incall' actionpack (3.2.13) lib/action_dispatch/middleware/params_parser.rb:21:in call' actionpack (3.2.13) lib/action_dispatch/middleware/flash.rb:242:incall' rack (1.4.5) lib/rack/session/abstract/id.rb:210:in context' rack (1.4.5) lib/rack/session/abstract/id.rb:205:incall' actionpack (3.2.13) lib/action_dispatch/middleware/cookies.rb:341:in call' activerecord (3.2.13) lib/active_record/query_cache.rb:64:incall' activerecord (3.2.13) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in call' actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:28:inblock in call' activesupport (3.2.13) lib/active_support/callbacks.rb:405:in _run__696712025__call__673365728__callbacks' activesupport (3.2.13) lib/active_support/callbacks.rb:405:in__run_callback' activesupport (3.2.13) lib/active_support/callbacks.rb:385:in _run_call_callbacks' activesupport (3.2.13) lib/active_support/callbacks.rb:81:inrun_callbacks' actionpack (3.2.13) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (3.2.13) lib/action_dispatch/middleware/remote_ip.rb:31:incall' actionpack (3.2.13) lib/action_dispatch/middleware/debug_exceptions.rb:16:in call' actionpack (3.2.13) lib/action_dispatch/middleware/show_exceptions.rb:56:incall' railties (3.2.13) lib/rails/rack/logger.rb:32:in call_app' railties (3.2.13) lib/rails/rack/logger.rb:16:inblock in call' activesupport (3.2.13) lib/active_support/tagged_logging.rb:22:in tagged' railties (3.2.13) lib/rails/rack/logger.rb:16:incall' actionpack (3.2.13) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.5) lib/rack/methodoverride.rb:21:incall' rack (1.4.5) lib/rack/runtime.rb:17:in call' activesupport (3.2.13) lib/active_support/cache/strategy/local_cache.rb:72:incall' rack (1.4.5) lib/rack/lock.rb:15:in call' actionpack (3.2.13) lib/action_dispatch/middleware/static.rb:63:incall' rack-cache (1.2) lib/rack/cache/context.rb:136:in forward' rack-cache (1.2) lib/rack/cache/context.rb:245:infetch' rack-cache (1.2) lib/rack/cache/context.rb:185:in lookup' rack-cache (1.2) lib/rack/cache/context.rb:66:incall!' rack-cache (1.2) lib/rack/cache/context.rb:51:in call' railties (3.2.13) lib/rails/engine.rb:479:incall' railties (3.2.13) lib/rails/application.rb:223:in call' railties (3.2.13) lib/rails/railtie/configurable.rb:30:inmethod_missing' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/rack/request_handler.rb:96:in process_request' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_request_handler.rb:513:inaccept_and_process_next_request' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_request_handler.rb:274:in main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/rack/application_spawner.rb:206:instart_request_handler' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/rack/application_spawner.rb:171:in block in handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/utils.rb:479:insafe_fork' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/rack/application_spawner.rb:166:in handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:357:inserver_main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:206:in start_synchronously' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:180:instart' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/rack/application_spawner.rb:129:in start' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:253:inblock (2 levels) in spawn_rack_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:132:in lookup_or_add' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:246:inblock in spawn_rack_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'

:10:in`synchronize' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:244:in`spawn_rack_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:275:in`handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/utils.rb:479:in `safe_fork' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/rack/application_spawner.rb:166:in`handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:206:in`start_synchronously' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:180:in `start' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/rack/application_spawner.rb:129:in`start' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:132:in`lookup_or_add' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:82:in`block in synchronize' internal:prelude:10:in `synchronize' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server_collection.rb:79:in`synchronize' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:137:in`spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:357:in`server_main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/helper-scripts/passenger-spawn-server:99:in`
'>
alexbevi commented 11 years ago

thanks @levabd. I'll have a look at this when I get around to the next round of updates :)