Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. Attach file triggers internal error

Attach file triggers internal error

Added by Jan Busk over 6 years ago

Hi! 

I've installed OpenProject via the docker container. When I try to attach a file to a work package all seems to work fine. OP says "uploading file" and then the error message "Internal error" show up.

Any help would be most appreciated!

/Jan B

System:

Docker image running on Ubuntu 16.04

web_stdout.log error msgs

App 497 output: Started POST "/api/v3/work_packages/51/attachments" for xxx.xxx.xxx.xxx at 2018-11-29 06:30:16 +0000 
App 497 output:   Grape rescuing from error: API::Errors::InternalError 
App 497 output:  
App 497 output:   Original error: #<NoMethodError: undefined method message' for #<#<Class:0x0000564443d7b288>:0x000056443b0827a0>>  App 497 output:   App 497 output:   Stacktrace:  App 497 output:   App 497 output:     /usr/src/app/lib/api/v3/attachments/attachments\_by\_container\_api.rb:105:inlog_attachment_saving_error' 
App 497 output:     /usr/src/app/lib/api/v3/attachments/attachments_by_container_api.rb:95:in rescue in with\_handled\_create\_errors'  App 497 output:     /usr/src/app/lib/api/v3/attachments/attachments\_by\_container\_api.rb:90:inwith_handled_create_errors' 
App 497 output:     /usr/src/app/lib/api/v3/attachments/attachments_by_container_api.rb:84:in build\_and_attach'  App 497 output:     /usr/src/app/lib/api/v3/attachments/attachments\_by\_container\_api.rb:74:inparse_and_create' 
App 497 output:     /usr/src/app/lib/api/v3/attachments/attachments_by_container_api.rb:128:in block in create'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/endpoint.rb:57:incall' 
App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/endpoint.rb:57:in block (2 levels) in generate\_api\_method'  App 497 output:     /usr/local/bundle/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:ininstrument' 
App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/endpoint.rb:56:in block in generate\_api\_method'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/endpoint.rb:262:inblock in run' 
App 497 output:     /usr/local/bundle/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in instrument'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/endpoint.rb:243:inrun' 
App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/endpoint.rb:313:in block in build_stack'  App 497 output:     /usr/local/bundle/gems/newrelic\_rpm-4.5.0.337/lib/new\_relic/agent/instrumentation/middleware_tracing.rb:92:incall' 
App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/middleware/base.rb:31:in call!'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/middleware/base.rb:24:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/middleware/base.rb:31:incall!' 
App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/middleware/base.rb:24:in call'  App 497 output:     /usr/local/bundle/gems/newrelic\_rpm-4.5.0.337/lib/new\_relic/agent/instrumentation/middleware_tracing.rb:92:incall' 
App 497 output:     /usr/local/bundle/gems/warden-1.2.7/lib/warden/manager.rb:36:in block in call'  App 497 output:     /usr/local/bundle/gems/warden-1.2.7/lib/warden/manager.rb:35:incatch' 
App 497 output:     /usr/local/bundle/gems/warden-1.2.7/lib/warden/manager.rb:35:in call'  App 497 output:     /usr/local/bundle/gems/newrelic\_rpm-4.5.0.337/lib/new\_relic/agent/instrumentation/middleware_tracing.rb:92:incall' 
App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/middleware/error.rb:38:in block in call!'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/middleware/error.rb:37:incatch' 
App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/middleware/error.rb:37:in call!'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/middleware/base.rb:24:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/head.rb:12:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/endpoint.rb:227:incall!' 
App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/endpoint.rb:221:in call'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/router/route.rb:72:inexec' 
App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/router.rb:121:in process_route'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/router.rb:74:inblock in identity' 
App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/router.rb:93:in transaction'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/router.rb:72:inidentity' 
App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/router.rb:57:in block in call'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/router.rb:137:inwith_optimization' 
App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/router.rb:56:in call'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/api.rb:119:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/grape.rb:115:in call\_with\_new_relic'  App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/api.rb:45:incall!' 
App 497 output:     /usr/local/bundle/gems/grape-1.1.0/lib/grape/api.rb:40:in call'  App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action_dispatch/routing/mapper.rb:17:inblock in class:Constraints' 
App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action_dispatch/routing/mapper.rb:46:in serve'  App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action_dispatch/journey/router.rb:50:inblock in serve' 
App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action_dispatch/journey/router.rb:33:in each'  App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action_dispatch/journey/router.rb:33:inserve' 
App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:844:in call'  App 497 output:     /usr/local/bundle/gems/newrelic\_rpm-4.5.0.337/lib/new\_relic/agent/instrumentation/middleware_tracing.rb:92:incall' 
App 497 output:     /usr/local/bundle/bundler/gems/omniauth-40c6f5f751d2/lib/omniauth/builder.rb:63:in call'  App 497 output:     /usr/local/bundle/gems/newrelic\_rpm-4.5.0.337/lib/new\_relic/agent/instrumentation/middleware_tracing.rb:92:incall' 
App 497 output:     /usr/local/bundle/bundler/gems/omniauth-40c6f5f751d2/lib/omniauth/strategy.rb:189:in call!'  App 497 output:     /usr/local/bundle/bundler/gems/omniauth-40c6f5f751d2/lib/omniauth/strategy.rb:167:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/bundler/gems/omniauth-40c6f5f751d2/lib/omniauth/builder.rb:63:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/newrelic\_rpm-4.5.0.337/lib/new\_relic/rack/agent\_hooks.rb:30:intraced_call' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/newrelic\_rpm-4.5.0.337/lib/new\_relic/rack/browser\_monitoring.rb:32:intraced_call' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/bundler/gems/omniauth-40c6f5f751d2/lib/omniauth/builder.rb:63:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/src/app/app/middleware/reset\_current\_user.rb:47:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/tempfile_reaper.rb:15:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-attack-5.2.0/lib/rack/attack.rb:172:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/etag.rb:25:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/deflater.rb:34:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/conditional_get.rb:38:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/head.rb:12:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:232:incontext' 
App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:226:in call'  App 497 output:     /usr/local/bundle/gems/newrelic\_rpm-4.5.0.337/lib/new\_relic/agent/instrumentation/middleware_tracing.rb:92:incall' 
App 497 output:     /usr/local/bundle/gems/ac 
App 497 output: tionpack-5.1.6/lib/action_dispatch/middleware/cookies.rb:613:in call'  App 497 output:     /usr/local/bundle/gems/newrelic\_rpm-4.5.0.337/lib/new\_relic/agent/instrumentation/middleware_tracing.rb:92:incall' 
App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action_dispatch/middleware/callbacks.rb:26:in block in call'  App 497 output:     /usr/local/bundle/gems/activesupport-5.1.6/lib/active\_support/callbacks.rb:97:inrun_callbacks' 
App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action_dispatch/middleware/callbacks.rb:24:in call'  App 497 output:     /usr/local/bundle/gems/newrelic\_rpm-4.5.0.337/lib/new\_relic/agent/instrumentation/middleware_tracing.rb:92:incall' 
App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action_dispatch/middleware/debug_exceptions.rb:59:in call'  App 497 output:     /usr/local/bundle/gems/newrelic\_rpm-4.5.0.337/lib/new\_relic/agent/instrumentation/middleware_tracing.rb:92:incall' 
App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action_dispatch/middleware/show_exceptions.rb:31:in call'  App 497 output:     /usr/local/bundle/gems/newrelic\_rpm-4.5.0.337/lib/new\_relic/agent/instrumentation/middleware_tracing.rb:92:incall' 
App 497 output:     /usr/local/bundle/gems/railties-5.1.6/lib/rails/rack/logger.rb:36:in call_app'  App 497 output:     /usr/local/bundle/gems/railties-5.1.6/lib/rails/rack/logger.rb:24:inblock in call' 
App 497 output:     /usr/local/bundle/gems/activesupport-5.1.6/lib/active_support/tagged_logging.rb:69:in block in tagged'  App 497 output:     /usr/local/bundle/gems/activesupport-5.1.6/lib/active\_support/tagged\_logging.rb:26:intagged' 
App 497 output:     /usr/local/bundle/gems/activesupport-5.1.6/lib/active_support/tagged_logging.rb:69:in tagged'  App 497 output:     /usr/local/bundle/gems/railties-5.1.6/lib/rails/rack/logger.rb:24:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action\_dispatch/middleware/remote\_ip.rb:79:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/request\_store-1.4.1/lib/request\_store/middleware.rb:19:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action\_dispatch/middleware/request\_id.rb:25:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/method_override.rb:22:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/runtime.rb:22:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/activesupport-5.1.6/lib/active\_support/cache/strategy/local\_cache_middleware.rb:27:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action_dispatch/middleware/executor.rb:12:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/actionpack-5.1.6/lib/action_dispatch/middleware/static.rb:125:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/sendfile.rb:111:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/secure\_headers-5.0.5/lib/secure\_headers/middleware.rb:13:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/railties-5.1.6/lib/rails/engine.rb:522:incall' 
App 497 output:     /usr/local/bundle/gems/railties-5.1.6/lib/rails/railtie.rb:185:in public_send'  App 497 output:     /usr/local/bundle/gems/railties-5.1.6/lib/rails/railtie.rb:185:inmethod_missing' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-protection-2.0.1/lib/rack/protection/frame_options.rb:31:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-protection-2.0.1/lib/rack/protection/json_csrf.rb:26:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/urlmap.rb:68:inblock in call' 
App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in each'  App 497 output:     /usr/local/bundle/gems/rack-2.0.5/lib/rack/urlmap.rb:53:incall' 
App 497 output:     /usr/local/bundle/gems/newrelic_rpm-4.5.0.337/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in call'  App 497 output:     /usr/local/bundle/gems/passenger-5.3.3/src/ruby\_supportlib/phusion\_passenger/rack/thread\_handler\_extension.rb:97:inprocess_request' 
App 497 output:     /usr/local/bundle/gems/passenger-5.3.3/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:157:in accept\_and\_process\_next\_request'  App 497 output:     /usr/local/bundle/gems/passenger-5.3.3/src/ruby\_supportlib/phusion\_passenger/request\_handler/thread\_handler.rb:110:inmain_loop' 
App 497 output:     /usr/local/bundle/gems/passenger-5.3.3/src/ruby_supportlib/phusion_passenger/request_handler.rb:415:in block (3 levels) in start\_threads'  App 497 output:     /usr/local/bundle/gems/passenger-5.3.3/src/ruby\_supportlib/phusion\_passenger/utils.rb:113:inblock in create_thread_and_abort_on_exception' 
[ N 2018-11-29 06:32:23.4891 404/T3 age/Cor/CoreMain.cpp:1028 ]: Checking whether to disconnect long-running connections for process 2117, application /usr/src/app (production)


Replies (3)

rtRE: Attach file triggers internal error - Added by Oliver Günther over 6 years ago

Dear Jan,

the actual error is shadowed by a syntax error in the exception handling. I assume the underyling error could have something to do with insufficient permission by the system to write into the attachment storage path.

Did you modify the ATTACHMENTS_STORAGE_PATH or change permissions? What kind of installation are you using?

Could you apply the following patch to improve the error message?

https://github.com/opf/openproject/commit/a290203bdd.patch

Download the patch and check whether it applies: From your OpenProject root folder:

⟩ curl -o patchfile https://github.com/opf/openproject/commit/a290203bdd.patch

Check whether the patch applies cleanly

⟩ git apply --check patchfile

If nothing is output, it applies cleanly. Then, actually apply the patch:

⟩ git apply patchfile

You will then need to restart your server with (packaged installation) service openproject restart or systemctl restart openproject depending on your distribution. In a manual installation, restart your application server respectively.

To reverse the patch again, run

git apply -R <patchfile>

Best,

Oliver

RE: Attach file triggers internal error - Added by Jan Busk over 6 years ago

Thanks for coming back to me Oliver!
I run the openproject docker container on an ubuntu 16.04 machine. I haven't done any permission changes or changes to configuration.yml.  I  will try to apply the patch inside the docker container. 

As far as I know all changes inside the container will be temporary and disappear when the docker container is stopped.

Anyways I'll try to apply the patch and come back with the result.

RE: Attach file triggers internal error - Added by Jan Busk over 6 years ago

Being new to docker it took me a while (googling and head scratching) before I manged to tty to the docker container. Applying the patch went flawless but I could not restart the openproject service since it does not exist. Restarting the container will reset all changes so I'm kind of lost here.

Referring to the installation guide for the docker install, I guess that starting the container with 

"docker run -d -p 8080:80 --name openproject -e SECRET_KEY_BASE=secret \ 
-v /var/lib/openproject/pgdata:/var/lib/postgresql/9.6/main \ 
-v /var/lib/openproject/logs:/var/log/supervisor \ 
-v /var/lib/openproject/static:/var/db/openproject \ 
openproject/community:8"

would mean that attachments would be stored on the local machine at /var/lib/openproject/static? I have checked that it has rw access for all users.

  • (1 - 3/3)
Loading...