CottageLabs / willow-hyrax

Willow on Hyrax
0 stars 0 forks source link

Error after uploading file and clicking on save in dataset edit #2

Closed anusharanganathan closed 7 years ago

anusharanganathan commented 7 years ago

Error: undefined method `user_key' for nil:NilClass

Stack trace

/home/ubuntu/.bundle/ruby/2.3.0/hyrax-dd1c46b7a200/app/actors/hyrax/actors/file_set_actor.rb:58:in `create_metadata'
/home/ubuntu/.bundle/ruby/2.3.0/hyrax-dd1c46b7a200/app/jobs/attach_files_to_work_job.rb:13:in `block in perform'
/home/ubuntu/.bundle/ruby/2.3.0/hyrax-dd1c46b7a200/app/jobs/attach_files_to_work_job.rb:10:in `each'
/home/ubuntu/.bundle/ruby/2.3.0/hyrax-dd1c46b7a200/app/jobs/attach_files_to_work_job.rb:10:in `perform'
activejob (5.1.2) lib/active_job/execution.rb:37:in `block in perform_now'
activesupport (5.1.2) lib/active_support/callbacks.rb:108:in `block in run_callbacks'
i18n (0.8.6) lib/i18n.rb:257:in `with_locale'
activejob (5.1.2) lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'
activesupport (5.1.2) lib/active_support/callbacks.rb:117:in `instance_exec'
activesupport (5.1.2) lib/active_support/callbacks.rb:117:in `block in run_callbacks'
activejob (5.1.2) lib/active_job/logging.rb:24:in `block (4 levels) in <module:Logging>'
activesupport (5.1.2) lib/active_support/notifications.rb:166:in `block in instrument'
activesupport (5.1.2) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (5.1.2) lib/active_support/notifications.rb:166:in `instrument'
activejob (5.1.2) lib/active_job/logging.rb:23:in `block (3 levels) in <module:Logging>'
activejob (5.1.2) lib/active_job/logging.rb:44:in `block in tag_logger'
activesupport (5.1.2) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.1.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.1.2) lib/active_support/tagged_logging.rb:69:in `tagged'
activejob (5.1.2) lib/active_job/logging.rb:44:in `tag_logger'
activejob (5.1.2) lib/active_job/logging.rb:20:in `block (2 levels) in <module:Logging>'
activesupport (5.1.2) lib/active_support/callbacks.rb:117:in `instance_exec'
activesupport (5.1.2) lib/active_support/callbacks.rb:117:in `block in run_callbacks'
activesupport (5.1.2) lib/active_support/callbacks.rb:135:in `run_callbacks'
activejob (5.1.2) lib/active_job/execution.rb:33:in `perform_now'
activejob (5.1.2) lib/active_job/execution.rb:22:in `block in execute'
activesupport (5.1.2) lib/active_support/callbacks.rb:108:in `block in run_callbacks'
activejob (5.1.2) lib/active_job/railtie.rb:26:in `block (4 levels) in <class:Railtie>'
activesupport (5.1.2) lib/active_support/execution_wrapper.rb:85:in `wrap'
activesupport (5.1.2) lib/active_support/reloader.rb:68:in `block in wrap'
activesupport (5.1.2) lib/active_support/execution_wrapper.rb:81:in `wrap'
activesupport (5.1.2) lib/active_support/reloader.rb:67:in `wrap'
activejob (5.1.2) lib/active_job/railtie.rb:25:in `block (3 levels) in <class:Railtie>'
activesupport (5.1.2) lib/active_support/callbacks.rb:117:in `instance_exec'
activesupport (5.1.2) lib/active_support/callbacks.rb:117:in `block in run_callbacks'
activesupport (5.1.2) lib/active_support/callbacks.rb:135:in `run_callbacks'
activejob (5.1.2) lib/active_job/execution.rb:20:in `execute'
activejob (5.1.2) lib/active_job/queue_adapters/inline_adapter.rb:13:in `enqueue'
activejob (5.1.2) lib/active_job/enqueuing.rb:51:in `block in enqueue'
activesupport (5.1.2) lib/active_support/callbacks.rb:108:in `block in run_callbacks'
activejob (5.1.2) lib/active_job/logging.rb:15:in `block (3 levels) in <module:Logging>'
activejob (5.1.2) lib/active_job/logging.rb:44:in `block in tag_logger'
activesupport (5.1.2) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.1.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.1.2) lib/active_support/tagged_logging.rb:69:in `tagged'
activejob (5.1.2) lib/active_job/logging.rb:44:in `tag_logger'
activejob (5.1.2) lib/active_job/logging.rb:14:in `block (2 levels) in <module:Logging>'
activesupport (5.1.2) lib/active_support/callbacks.rb:117:in `instance_exec'
activesupport (5.1.2) lib/active_support/callbacks.rb:117:in `block in run_callbacks'
activesupport (5.1.2) lib/active_support/callbacks.rb:135:in `run_callbacks'
activejob (5.1.2) lib/active_job/enqueuing.rb:47:in `enqueue'
activejob (5.1.2) lib/active_job/enqueuing.rb:18:in `perform_later'
/home/ubuntu/.bundle/ruby/2.3.0/hyrax-dd1c46b7a200/app/actors/hyrax/actors/create_with_files_actor.rb:42:in `attach_files'
/home/ubuntu/.bundle/ruby/2.3.0/hyrax-dd1c46b7a200/app/actors/hyrax/actors/create_with_files_actor.rb:18:in `update'
/home/ubuntu/.bundle/ruby/2.3.0/hyrax-dd1c46b7a200/app/actors/hyrax/actors/create_with_remote_files_actor.rb:16:in `update'
/home/ubuntu/.bundle/ruby/2.3.0/hyrax-dd1c46b7a200/app/actors/hyrax/actors/optimistic_lock_validator.rb:13:in `update'
/home/ubuntu/.bundle/ruby/2.3.0/hyrax-dd1c46b7a200/app/actors/hyrax/actors/transactional_request.rb:19:in `block in update'
activerecord (5.1.2) lib/active_record/connection_adapters/abstract/database_statements.rb:225:in `block in transaction'
activerecord (5.1.2) lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'
/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
activerecord (5.1.2) lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'
activerecord (5.1.2) lib/active_record/connection_adapters/abstract/database_statements.rb:225:in `transaction'
activerecord (5.1.2) lib/active_record/transactions.rb:210:in `transaction'
/home/ubuntu/.bundle/ruby/2.3.0/hyrax-dd1c46b7a200/app/actors/hyrax/actors/transactional_request.rb:18:in `update'
/home/ubuntu/.bundle/ruby/2.3.0/hyrax-dd1c46b7a200/app/controllers/concerns/hyrax/works_controller_behavior.rb:100:in `update'
actionpack (5.1.2) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
actionpack (5.1.2) lib/abstract_controller/base.rb:186:in `process_action'
actionpack (5.1.2) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (5.1.2) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (5.1.2) lib/active_support/callbacks.rb:131:in `run_callbacks'
actionpack (5.1.2) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (5.1.2) lib/action_controller/metal/rescue.rb:20:in `process_action'
actionpack (5.1.2) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
activesupport (5.1.2) lib/active_support/notifications.rb:166:in `block in instrument'
activesupport (5.1.2) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (5.1.2) lib/active_support/notifications.rb:166:in `instrument'
actionpack (5.1.2) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (5.1.2) lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
activerecord (5.1.2) lib/active_record/railties/controller_runtime.rb:22:in `process_action'
actionpack (5.1.2) lib/abstract_controller/base.rb:124:in `process'
actionview (5.1.2) lib/action_view/rendering.rb:30:in `process'
actionpack (5.1.2) lib/action_controller/metal.rb:189:in `dispatch'
actionpack (5.1.2) lib/action_controller/metal.rb:253:in `dispatch'
actionpack (5.1.2) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
actionpack (5.1.2) lib/action_dispatch/routing/route_set.rb:31:in `serve'
actionpack (5.1.2) lib/action_dispatch/journey/router.rb:46:in `block in serve'
actionpack (5.1.2) lib/action_dispatch/journey/router.rb:33:in `each'
actionpack (5.1.2) lib/action_dispatch/journey/router.rb:33:in `serve'
actionpack (5.1.2) lib/action_dispatch/routing/route_set.rb:832:in `call'
warden (1.2.7) lib/warden/manager.rb:36:in `block in call'
warden (1.2.7) lib/warden/manager.rb:35:in `catch'
warden (1.2.7) lib/warden/manager.rb:35:in `call'
rack (2.0.3) lib/rack/etag.rb:25:in `call'
rack (2.0.3) lib/rack/conditional_get.rb:38:in `call'
rack (2.0.3) lib/rack/head.rb:12:in `call'
rack (2.0.3) lib/rack/session/abstract/id.rb:232:in `context'
rack (2.0.3) lib/rack/session/abstract/id.rb:226:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/cookies.rb:613:in `call'
active-fedora (11.4.0) lib/active_fedora/ldp_cache.rb:26:in `call'
flipflop (2.3.1) lib/flipflop/feature_cache.rb:12:in `call'
activerecord (5.1.2) lib/active_record/migration.rb:556:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
activesupport (5.1.2) lib/active_support/callbacks.rb:97:in `run_callbacks'
actionpack (5.1.2) lib/action_dispatch/middleware/callbacks.rb:24:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.5.1) lib/web_console/middleware.rb:20:in `block in call'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch'
web-console (3.5.1) lib/web_console/middleware.rb:18:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.1.2) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.1.2) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.1.2) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.1.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.1.2) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.1.2) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/request_id.rb:25:in `call'
rack (2.0.3) lib/rack/method_override.rb:22:in `call'
rack (2.0.3) lib/rack/runtime.rb:22:in `call'
activesupport (5.1.2) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.2) lib/action_dispatch/middleware/static.rb:125:in `call'
rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
railties (5.1.2) lib/rails/engine.rb:522:in `call'
puma (3.9.1) lib/puma/configuration.rb:224:in `call'
puma (3.9.1) lib/puma/server.rb:602:in `handle_request'
puma (3.9.1) lib/puma/server.rb:435:in `process_client'
puma (3.9.1) lib/puma/server.rb:299:in `block in run'
puma (3.9.1) lib/puma/thread_pool.rb:120:in `block in spawn_thread'

Request Parameters:

{"utf8"=>"✓",
 "_method"=>"patch",
 "authenticity_token"=>"nSlgDdId7PAm9XML3TLhF9LTBKqMsX7/caH6e8+YIeD7yzQaahSorGFHdTAFgMkCyFTIULtkJ2MJDHJUMmaI7A==",
 "dataset"=>
  {"title"=>["Test dataset", ""],
   "creator_nested_attributes"=>
    {"0"=>
      {"first_name"=>["Ribhu"],
       "last_name"=>["Helllo world"],
       "orcid"=>["0001-0001-0001-0001"],
       "affiliation"=>["something"],
       "role"=>["Producer"],
       "_destroy"=>"false",
       "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#persong76648580"},
     "1"=>
      {"first_name"=>["Foo"],
       "last_name"=>["Bar"],
       "orcid"=>["0000-0000-0000-0000"],
       "affiliation"=>["Author affiliation"],
       "role"=>["Editor"],
       "_destroy"=>"false",
       "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#persong75925820"},
     "2"=>
      {"first_name"=>["Raja"],
       "last_name"=>["Nandakumar"],
       "orcid"=>["1111-1111"],
       "affiliation"=>["RAL"],
       "role"=>["Researcher"],
       "_destroy"=>"false",
       "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#persong69933329754600"},
     "3"=>{"first_name"=>[""], "last_name"=>[""], "orcid"=>[""], "affiliation"=>[""], "role"=>[""], "_destroy"=>"false"}},
   "publisher"=>["Willow", ""],
   "date_attributes"=>
    {"0"=>{"description"=>["http://purl.org/dc/terms/issued"], "date"=>["2017-01-01"], "_destroy"=>"false", "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#dateg73098860"},
     "1"=>{"description"=>["http://bibframe.org/vocab/providerDate"], "date"=>["2018-01-01"], "_destroy"=>"false", "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#dateg73664900"},
     "2"=>{"description"=>[""], "date"=>[""], "_destroy"=>"false"}},
   "resource_type"=>["Dataset", ""],
   "description"=>["Abtsract forthe test dataset is just a sentence long.", ""],
   "keyword"=>["Test", "Upgrade", "Hyrax", "Dataset", "Work", ""],
   "language"=>["English", ""],
   "source"=>["http://source.example.com/source", ""],
   "doi"=>"0000-0000-0000-0000",
   "other_title_attributes"=>
    {"0"=>{"title_type"=>["Subtitle"], "title"=>["Subtitle for dataset"], "_destroy"=>"false", "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#titleg72726500"},
     "1"=>{"title_type"=>["AlternativeTitle"], "title"=>["Another title"], "_destroy"=>"false", "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#titleg70917740"},
     "2"=>{"title_type"=>[""], "title"=>[""], "_destroy"=>"false", "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#titleg70283946391880"},
     "3"=>{"title_type"=>[""], "title"=>[""], "_destroy"=>"false"}},
   "rights_nested_attributes"=>
    {"0"=>{"webpage"=>[""], "definition"=>[""], "start_date"=>[""], "_destroy"=>"false", "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#rightsg70283940354000"},
     "1"=>
      {"webpage"=>["http://creativecommons.org/licenses/by/3.0/"],
       "definition"=>["A definition of the rights"],
       "start_date"=>["26/07/2017"],
       "_destroy"=>"false",
       "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#rightsg74579440"},
     "2"=>{"webpage"=>[""], "definition"=>[""], "start_date"=>[""], "_destroy"=>"false"}},
   "subject_nested_attributes"=>
    {"0"=>{"label"=>["Subject 1"], "_destroy"=>"false", "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#subjectg77236940"},
     "1"=>{"label"=>["Subject 3"], "_destroy"=>"false", "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#subjectg69933326533760"},
     "2"=>{"label"=>["Subject 2"], "_destroy"=>"false", "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#subjectg77473880"},
     "3"=>{"label"=>[""], "_destroy"=>"false"}},
   "relation_attributes"=>
    {"0"=>
      {"label"=>["A second relation label"],
       "url"=>["http://example.com/relation2"],
       "relationship_name"=>["Is part of"],
       "_destroy"=>"false",
       "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#relationg78020420"},
     "1"=>
      {"label"=>["A relation label"],
       "url"=>["http://example.com/relation"],
       "relationship_name"=>["Is part of"],
       "_destroy"=>"false",
       "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#relationg76843140"},
     "2"=>{"label"=>[""], "url"=>[""], "relationship_name"=>[""], "_destroy"=>"false", "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#relationg70283942946720"},
     "3"=>
      {"label"=>["A third relation"],
       "url"=>["http://example.com/relation3"],
       "relationship_name"=>["Is version of"],
       "_destroy"=>"false",
       "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#relationg30612640"},
     "4"=>{"label"=>[""], "url"=>[""], "relationship_name"=>[""], "_destroy"=>"false"}},
   "admin_metadata_attributes"=>
    {"0"=>{"question"=>["A second admin question needing an answer"], "response"=>[""], "_destroy"=>"false", "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#admin_metadatag75835340"},
     "1"=>
      {"question"=>["An admin question needing an answer"],
       "response"=>["Response to admin question"],
       "_destroy"=>"false",
       "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#admin_metadatag76046280"},
     "2"=>{"question"=>["test admin question 3"], "response"=>["test admin answer 3"], "_destroy"=>"false", "id"=>"http://127.0.0.1:8984/rest/dev/ft/84/8q/60/ft848q60n#admin_metadatag71553260"},
     "3"=>{"question"=>[""], "response"=>[""], "_destroy"=>"false"}},
   "admin_set_id"=>"admin_set/default",
   "member_of_collection_ids"=>[""],
   "visibility"=>"open",
   "visibility_during_embargo"=>"restricted",
   "embargo_release_date"=>"2017-08-01",
   "visibility_after_embargo"=>"open",
   "visibility_during_lease"=>"open",
   "lease_expiration_date"=>"2017-08-01",
   "visibility_after_lease"=>"restricted",
   "version"=>"W/\"7088cb03457ac4b4a8972950da63a8f1ff1b9f3b\""},
 "uploaded_files"=>["6"],
 "find_child_work"=>"",
 "new_user_name_skel"=>"",
 "new_user_permission_skel"=>"none",
 "new_group_name_skel"=>"Select a group",
 "new_group_permission_skel"=>"none",
 "agreement"=>"1",
 "locale"=>"en",
 "id"=>"ft848q60n"}
anusharanganathan commented 7 years ago

Not able to reproduce