Top Menu

Jump to content
Home
    • Projects
    • Work packages
    • News
    • Getting started
    • Introduction video

      Welcome to OpenProject Community

      Get an overview

      Get a quick overview of project management and team collaboration with OpenProject.
      You can restart this video from the help menu

    • Help and support
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Professional 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?
      Create a new account

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
  • Roadmap
  • Work packages
  • Calendars
  • Team planners
  • Boards
  • Forums
  • Wiki
    • Table of contents
      • Expanded. Click to collapseCollapsed. Click to showDeveloper
        • Hierarchy leafAccessibility Checklist
        • Hierarchy leafCode Review Guidelines
        • Expanded. Click to collapseCollapsed. Click to showContribution
          • Hierarchy leafGit Workflow
          • Hierarchy leafTranslations
        • Expanded. Click to collapseCollapsed. Click to showDeveloping Plugins
          • Hierarchy leafDeveloping an OmniAuth Authentication Plugin
        • Hierarchy leafRelease Process
        • Hierarchy leafReport a bug
        • Hierarchy leafSecurity
        • Hierarchy leafSetting up an OpenLDAP server for testing
        • Hierarchy leafTheme Features
      • Hierarchy leafDownload
      • Expanded. Click to collapseCollapsed. Click to showFeature tour
        • Hierarchy leafRelease Notes OpenProject 30
        • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 30 - Overview
          • Hierarchy leafGlossary
          • Hierarchy leafRelease Notes - Accessibility
          • Hierarchy leafRelease Notes - Accessibility changes
          • Hierarchy leafRelease Notes - Add work package queries as menu items to sidebar
          • Hierarchy leafRelease Notes - Copy projects based on Templates
          • Hierarchy leafRelease Notes - Design changes
          • Hierarchy leafRelease Notes - Fixed Bugs
          • Hierarchy leafRelease Notes - Keyboard Shortcuts
          • Hierarchy leafRelease Notes - Project settings
          • Hierarchy leafRelease Notes - Ruby&Rails Update
          • Hierarchy leafRelease Notes - Security
          • Hierarchy leafRelease Notes - Timelines
          • Hierarchy leafRelease Notes - Work packages
      • Hierarchy leafHowto create animated gifs
      • Hierarchy leafMigration Squashing
      • Hierarchy leafMod security
      • Hierarchy leafNew work package page
      • Hierarchy leafOP3 to OP4 Debian upgrade
      • Hierarchy leafOP4 Ubuntu1404 Stable with MySQL in production
      • Hierarchy leafOpenProject 40 Development Setup
      • Expanded. Click to collapseCollapsed. Click to showOpenProject Foundation
        • Hierarchy leafBoards
        • Hierarchy leafMembers
        • Hierarchy leafOPF-Meetings
        • Hierarchy leafStatutes
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes
        • Hierarchy leafOpenProject released on Bitnami
      • Expanded. Click to collapseCollapsed. Click to showRelease Notes OpenProject 40 - Overview
        • Hierarchy leafRelease Notes OpenProject 40 - Accessibility improvements
        • Hierarchy leafRelease Notes OpenProject 40 - Column header functions in work package table
        • Hierarchy leafRelease Notes OpenProject 40 - Improved Design
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated query title on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - Integrated toolbar on work package page
        • Hierarchy leafRelease Notes OpenProject 40 - OmniAuth integration for OpenProject
        • Hierarchy leafRelease Notes OpenProject 40 - Work package details pane
      • Expanded. Click to collapseCollapsed. Click to showSecurity and privacy
        • Hierarchy leafFAQ
      • Expanded. Click to collapseCollapsed. Click to showSupport
        • Expanded. Click to collapseCollapsed. Click to showDownload and Installation
          • Hierarchy leafInstallation MacOS
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 3 0
            • Hierarchy leafDebian Stable with MySQL in production
            • Hierarchy leafInstallation Ubuntu
            • Hierarchy leafInstallation Windows
            • Hierarchy leafInstallation on Centos 65 x64 with Apache and PostgreSQL 93
          • Expanded. Click to collapseCollapsed. Click to showInstallation OpenProject 40
            • Hierarchy leafOP4 Debian Stable with MySQL in production
          • Expanded. Click to collapseCollapsed. Click to showMigration paths
            • Hierarchy leafFrom Chilliproject to OpenProject
            • Hierarchy leafMigration 15 to 30
            • Hierarchy leafMigration 24 to 30
            • Hierarchy leafMigration Redmine 2x › OpenProject 30
            • Hierarchy leafOpenProject 3 Migration
          • Hierarchy leafOpenProject 40
        • Expanded. Click to collapseCollapsed. Click to showNews
          • Hierarchy leafNew OpenProject Translations Plugin
          • Hierarchy leafNew Plugin on OpenProjectorg Local Avatars
          • Hierarchy leafNew design for OpenProject
          • Hierarchy leafNews Accessibility workshop for OpenProject
          • Hierarchy leafNews Glossary for OpenProject
          • Hierarchy leafNews Heartbleed fixed
          • Hierarchy leafNews Icon Fonts
          • Hierarchy leafNews OpenProject 30 Release
          • Hierarchy leafNews Release GitHub Integration Plugin
          • Hierarchy leafNews Success Story Deutsche Telekom
          • Hierarchy leafNews Timelines
          • Hierarchy leafOpenProject 3013 released
          • Hierarchy leafOpenProject 3017 released
          • Hierarchy leafOpenProject 40 released
          • Hierarchy leafOpenProject 40 will be coming soon
          • Hierarchy leafOpenProject 405 released
          • Hierarchy leafOpenProject and pkgrio
          • Hierarchy leafOpenProject news moved to a new blog
          • Hierarchy leafOpenProjectBitnami
          • Hierarchy leafPackager version with plugins released ("Community edition")
          • Hierarchy leafRegistration OpenProject-Foundation
          • Hierarchy leafRelease OpenProject AuthPlugins
          • Hierarchy leafUpdates on OpenProject
          • Hierarchy leafWe need your feedback for the the new fullscreen view for work packages
        • Hierarchy leafOpenProject Plug-Ins
      • Hierarchy leafWiki
You are here:
  • Forums
  • Development

Content

Document upload failed on fresh install OP7

Added by Stéphane V about 5 years ago

Hello,

Trying to add an attachement to an existing work package in the demo project in production resulted in an error message “An internal error has occured.” with a nice red background.

I was not able to upload a document on an opeproject 7 instance.

I saw that the document plugin was removed (and therefore not activated in adminstration panel anymore)..? but the field “drop here your attachement” is present…

So my question is : is the attachement feaure maintained and, indeed yes, is there a trick to make it work (again) ?

Many thanks,


Replies (9)

RE: Document upload failed on fresh install OP7 - Added by Oliver Günther about 5 years ago

Hi Stéphane,

both the documents plugin and attachments are actively supported in OpenProject. You are likely having a permission issue that prohibits OpenProject / the Rails worker to write to the attachment path.

1. Is there a relevant log entry in /var/log/openproject/production.log ?

2. What is the output of openproject config:get ATTACHMENTS_STORAGE_PATH and openproject run ls -alh $(openproject config:get ATTACHMENTS_STORAGE_PATH)

Best,
Oliver

RE: Document upload failed on fresh install OP7 - Added by Stéphane V about 5 years ago

Thank for helping. I cannot use the command your have provided because the command “openproject” is not available (it is a fork of openproject-ce 7 from github with manual install) The attachements were working perfectly in OP6, but since the upgrade to OP7, it is not wokring anymore… :-( (I just kept the database and the apache config. The rest of the source code is a fresh git clone)

Here is the information that I found :

  • From /var/log/openporject_access.log (apache) : 10.42.17.56 - - [18/Jul/2017:09:07:45 +0200] “POST /api/v3/work_packages/2/attachments HTTP/1.1” 500 578
  • From /var/log/openproject_error.log (apache) : empty
  • From the debugger console in Firefox : 500 Internal Server Error : urn:openproject-org:api:v3:errors:InternalServerError
  • From ~/openproject-ce/log/production.log : empty
  • ls -als | grep files : 4 drwxr-xr-x 2 openproject openproject 4096 Jul 17 13:21 files

Can it be a simple issue as : user www-data cannot write into openproject files ?

EDIT : I tried this without succeess :

usermod -a -G www-data openproject
chgrp www-data /home/openproject/openproject-ce/files
chmod g+rwxs /home/openproject/openproject-ce/files

RE: Document upload failed on fresh install OP7 - Added by Oliver Günther about 5 years ago

Hi Stéphane,

what branch are you running on? stable/7 should be the one you’re using if you want to run the latest stable version.

Can you raise the log output in config/environments/production.rb and restart the web server?

config.log_level = :debug

Best,
Oliver

RE: Document upload failed on fresh install OP7 - Added by Stéphane V about 5 years ago

Yes, it is the branch stable/7. The information page shows “OpenProject 7.2.0 (Mysql2)” last change on 14/07/2017

I increased the debug level as proposed :

Now, we indeed have an error in log/production.log

I, [2017-07-19T10:18:05.156220 #28699] INFO — : Started POST “/api/v3/work_packages/2/attachments” for 10.42.17.56 at 2017-07-19 10:18:05 +0200
D, [2017-07-19T10:18:05.158816 #28699] DEBUG — : (0.1ms) SELECT MAX (`settings`.`updated_on`) FROM `settings`
D, [2017-07-19T10:18:05.160113 #28699] DEBUG — : User Load (0.1ms) SELECT `users`.* FROM `users` WHERE `users`.`type` IN (‘User’, ‘AnonymousUser’, ‘DeletedUser’, ‘SystemUser’) AND `users`.`id` = 1 LIMIT 1
D, [2017-07-19T10:18:05.161117 #28699] DEBUG — : WorkPackage Load (0.1ms) SELECT `work_packages`.* FROM `work_packages` WHERE `work_packages`.`id` = 2 LIMIT 1
D, [2017-07-19T10:18:05.162252 #28699] DEBUG — : Project Load (0.1ms) SELECT `projects`.* FROM `projects` WHERE `projects`.`id` = 1 LIMIT 1
D, [2017-07-19T10:18:05.163399 #28699] DEBUG — : (0.1ms) SELECT `enabled_modules`.`name` FROM `enabled_modules` WHERE `enabled_modules`.`project_id` = 1
D, [2017-07-19T10:18:05.164573 #28699] DEBUG — : Project Load (0.1ms) SELECT DISTINCT `projects`.* FROM `projects` INNER JOIN `enabled_modules` ON `projects`.`id` = `enabled_modules`.`project_id` AND `enabled_modules`.`name` IN (‘work_package_tracking’) AND `projects`.`status` = 1 WHERE `projects`.`status` = 1

E, [2017-07-19T10:18:05.167800 #28699] ERROR — : Grape rescuing from error: API::Errors::InternalError

Original error: #<ArgumentError: parser io argument must be a String or respond to readpartial() or read().

Stacktrace:

/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.1/lib/multi_json/adapters/oj.rb:15:in `load’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.1/lib/multi_json/adapters/oj.rb:15:in `load’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.1/lib/multi_json/adapter.rb:21:in `load’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.1/lib/multi_json.rb:122:in `load’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/representable-3.0.4/lib/representable/json.rb:38:in `from_json’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/roar-1.1.0/lib/roar/json.rb:21:in `from_json’
/home/openproject/openproject-ce/lib/api/v3/attachments/attachments_by_work_package_api.rb:41:in `parse_metadata’
/home/openproject/openproject-ce/lib/api/v3/attachments/attachments_by_work_package_api.rb:64:in `block (2 levels) in class:AttachmentsByWorkPackageAPI’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:59:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:59:in `block (2 levels) in generate_api_method’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/notifications.rb:166:in `instrument’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:58:in `block in generate_api_method’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:262:in `block in run’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/notifications.rb:166:in `instrument’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:240:in `run’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:313:in `block in build_stack’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/base.rb:31:in `call!’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/base.rb:24:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/base.rb:31:in `call!’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/base.rb:24:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/warden-1.2.7/lib/warden/manager.rb:36:in `block in call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/warden-1.2.7/lib/warden/manager.rb:35:in `catch’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/warden-1.2.7/lib/warden/manager.rb:35:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/error.rb:34:in `block in call!’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/error.rb:33:in `catch’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/error.rb:33:in `call!’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/middleware/base.rb:24:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/head.rb:12:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:224:in `call!’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/endpoint.rb:218:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router/route.rb:72:in `exec’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:119:in `process_route’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:74:in `block in identity’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:93:in `transaction’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:72:in `identity’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:57:in `block in call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:135:in `with_optimization’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/router.rb:56:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/api.rb:119:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/api.rb:45:in `call!’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/grape-0.19.2/lib/grape/api.rb:40:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/routing/mapper.rb:17:in `block in class:Constraints’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/routing/mapper.rb:46:in `serve’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/journey/router.rb:39:in `block in serve’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/journey/router.rb:26:in `each’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/journey/router.rb:26:in `serve’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/routing/route_set.rb:725:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/bundler/gems/omniauth-40c6f5f751d2/lib/omniauth/builder.rb:63:in `call’
/home/openproject/openproject-ce/app/middleware/reset_current_user.rb:47:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/tempfile_reaper.rb:15:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-attack-5.0.1/lib/rack/attack.rb:147:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/etag.rb:25:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/deflater.rb:34:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/conditional_get.rb:38:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/head.rb:12:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:232:in `context’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:226:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/cookies.rb:613:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:97:in `run_callbacks’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:750:in `_run_call_callbacks’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:90:in `run_callbacks’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/callbacks.rb:36:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/remote_ip.rb:79:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/rack/logger.rb:36:in `call_app’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/rack/logger.rb:24:in `block in call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/tagged_logging.rb:69:in `block in tagged’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/tagged_logging.rb:26:in `tagged’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/tagged_logging.rb:69:in `tagged’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/rack/logger.rb:24:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/request_store-1.3.2/lib/request_store/middleware.rb:9:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/request_id.rb:24:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/activesupport-5.0.3/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/executor.rb:12:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/engine.rb:522:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/railtie.rb:193:in `public_send’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/railties-5.0.3/lib/rails/railtie.rb:193:in `method_missing’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/frame_options.rb:31:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-protection-2.0.0/lib/rack/protection/json_csrf.rb:26:in `call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:68:in `block in call’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `each’
/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `call’
/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request’
/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:160:in `accept_and_process_next_request’
/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop’
/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads’
/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception’

Additional information :

ls -als |grep files
4 drwxr-xr-x 2 openproject openproject 4096 Jul 17 13:21 files

grep -nr “attachments_storage” ~/openproject-ce
[…]
./config/configuration.yml:187: attachments_storage_path: /home/openproject/openproject-ce/files
[…]
./lib/open_project/configuration.rb:40: ‘attachments_storage’ => ‘file’,
[…]

—> maybe also an issue between “files” or “file” ?
—> How can we verify the actual value of the attachments_storage_path global variable ?

RAILS_ENV=production ./bin/rails console
ENV
=> {“RBENV_VERSION”=>“2.4.1”, “XDG_SESSION_ID”=>“742”, “NODENV_SHELL”=>“su”, “TERM”=>“xterm”, “SHELL”=>“/bin/sh”, “USER”=>“openproject”, “LS_COLORS”=>“rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.axa=00;36:.oga=00;36:.spx=00;36:.xspf=00;36:”, “RBENV_ROOT”=>“/home/openproject/.rbenv”, “TMOUT”=>“3600”, “RBENV_HOOK_PATH”=>“/home/openproject/.rbenv/rbenv.d:/usr/local/etc/rbenv.d:/etc/rbenv.d:/usr/lib/rbenv/hooks”, “PATH”=>“/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/bin:/home/openproject/.rbenv/versions/2.4.1/bin:/home/openproject/.rbenv/libexec:/home/openproject/.rbenv/plugins/ruby-build/bin:/home/openproject/.nodenv/shims:/home/openproject/.nodenv/bin:/home/openproject/.rbenv/shims:/home/openproject/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games”, “MAIL”=>“/var/mail/openproject”, “PWD”=>“/home/openproject/openproject-ce”, “LANG”=>“en_US.UTF-8”, “RBENV_SHELL”=>“su”, “HOME”=>“/home/openproject”, “SHLVL”=>“1”, “LANGUAGE”=>“en_US:en”, “RAILS_ENV”=>“production”, “RBENV_DIR”=>“/home/openproject/openproject-ce/bin”, “LOGNAME”=>“openproject”, “RUBYLIB”=>“/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib:/home/openproject/.rbenv/rbenv.d/exec/gem-rehash”, “BUNDLE_GEMFILE”=>“/home/openproject/openproject-ce/Gemfile”, “BUNDLER_ORIG_PATH”=>“/home/openproject/.rbenv/versions/2.4.1/bin:/home/openproject/.rbenv/libexec:/home/openproject/.rbenv/plugins/ruby-build/bin:/home/openproject/.nodenv/shims:/home/openproject/.nodenv/bin:/home/openproject/.rbenv/shims:/home/openproject/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games”, “GEM_PATH”=>“”, “GEM_HOME”=>“/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0”, “BUNDLE_BIN_PATH”=>“/home/openproject/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/exe/bundle”, “BUNDLER_VERSION”=>“1.15.1”, “RUBYOPT”=>“-rbundler/setup”, “MANPATH”=>“/home/openproject/openproject-ce/vendor/bundle/ruby/2.4.0/gems/unicorn-5.3.0/man”, “LINES”=>“52”, “COLUMNS”=>“189”}

—> There is no attachements_storage_path in ruby ENV ? (maybe a fallback on a default value then ?)

RE: Document upload failed on fresh install OP7 - Added by Stéphane V about 5 years ago

Additional information from Admin panel :

RE: Document upload failed on fresh install OP7 - Added by Oliver Günther about 5 years ago

You have installed the dev branch of OpenProject. (Version 7.2.0., yet unreleased). There was a bug breaking attachments some while ago, so if you seriously want to run the dev branch, keep it updated.

I highly recommend against running the dev branch in production however.

RE: Document upload failed on fresh install OP7 - Added by Stéphane V about 5 years ago

Yes, it seems I messed up by merging the dev branch from github (which is the default branch) in my production brach.. Sad !

How can I solve this ?

  • Pull the stable/7 branch —> not working… it says already up to date… but the upload attchement is still not working :-(
  • Pull again the dev branch, if this bug has been resolved

—> Can anyone try the attachement of pdf files in 7.2.0 to tell me if it is working ??

RE: Document upload failed on fresh install OP7 - Added by Oliver Günther about 5 years ago

Yes, it seems I messed up by merging the dev branch from github (which is the default branch) in my production brach.. Sad !

You are mixing up your responses here, you mentioned earlier that you’re using a manual installation on a fork from openproject-ce (this message). That repository uses stable/7 as the default branch.

Our core repository used for developing uses the dev branch as the default branch. This is caused by several integrations with GitHub such as CodeClimate that
can only compare changes to this default branch, so we’re basically forced to use dev if we want to use them.

Either way, in a manual installation, be very careful where you pull from.

  • If you only did pull from dev, but did not run migrations, you could simply git reset --hard origin/stable/7 (where origin is the remote of openproject-ce).
  • If you did run the migrations, wait for 7.2. to come out to switch to the stable branch

On our 7.2. development/edge instances, attachments work fine, so I suspect the error is somewhere in your fork - either it is not updated to the dev branch, or some other issue.

RE: Document upload failed on fresh install OP7 - Added by Stéphane V about 5 years ago

I indeed pulled the dev branch in my stable branch. Sad .

Pulling the latest commit of the dev branch solved this topic (.e. attachements are now working).

I will of course pull the stable/7 branch in the future for production servers (I’ll wait until the release of 7.2.0 to switch back to stable branch).

Many thanks for helping !

Openproject rocks ! :-)

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