Feature #3816

allow pasting screenshots like it's done in Jira

Added by Alexey Skor 11 months ago. Updated 8 days ago.

Status:New Start:2009-09-03
Priority:Normal Due date:
Assigned to:Jean-Philippe Lang % Done:

0%

Category:-
Target version:-
Resolution:

Description

Jira has one terrific feature, which is VERY convenient.
when I edit a bug report, I can click "paste" button and the screenshot currently in system copy/paste buffer will be copied to the Jira web-form.
could you guys please implement the same for redmine? I really appreciate this. this would save time when editing bug reports.

redmine_screenshot_paste.zip (32.8 KB) Jean-Philippe Lang, 2009-11-28 17:55

simageuploadapplet.jar (52.6 KB) Andrew Chaika, 2009-11-29 12:12

redmine_screenshot_paste-2.zip (34.9 KB) Jean-Philippe Lang, 2009-11-29 22:20

_screenshot.rhtml - redmine_screenshot_paste on demand (1.8 KB) Jack Kurzecki, 2010-01-11 11:49

_screenshot.rhtml - redmine_screenshot_paste on demand for version 1.1.0 (1.8 KB) Jack Kurzecki, 2010-03-05 10:48

redmine_attach_screenshot_v.0.0.3.zip (17 KB) Victor Doulepov, 2010-05-07 12:16

History

Updated by Stuart Mathews 8 months ago

I think that you are absolutly right Alexey, I run a team where we get bugs each day and we are always coming short when it comes to having good descriptions of the bugs - especially if they are on a specific screen or page - we need a way to copy/past screenshots!

Anyone else with me on this?

Updated by Kamil . 8 months ago

+1

Updated by James Bernard 8 months ago

+1

This would be awesome.
I run a team where we like using screenshots for better understanding between us and the current way for doing that in Redmine is too heavy.

Updated by Jean-Philippe Lang 8 months ago

Here is a quickly written plugin that let users paste one screenshot on the issue form.
The screenshot is saved as a png file (screenshot.png) attached to the issue.

It uses an applet from http://www.redmountainsw.com/wordpress/archives/applet-for-submitting-screenshot.

Tested with Firefox 3 (OK), Safari 3 (OK), IE6 (doesn't seem to work).

Requires latest trunk (tested with r3106). Just unzip in vendor/plugins and restart.
Feedback is welcome.

Updated by Andrew Chaika 8 months ago

Jean-Philippe Lang wrote:

Here is a quickly written plugin that let users paste one screenshot on the issue form. ... Feedback is welcome.

I have tested this plugin on IE8 and Chrome 3, it works well. But one remark - attachment name is always 'screenshot.png', when I add a second screenshot (in comment) I get 2 attachments with same names. It will be better to use unique names, for example 'screenshot_<num>.png'. And maybe plugin could automatically add to issue description/comment body.
A drag and drop functionality when uploading existing images or documents will be useful too and this can be done with java applet too.

Updated by Andrew Chaika 8 months ago

I have modified (s)imageuploadapplet, now it support drag and drop, paste on click, and can paste clipboard content by javascript command (you can call "imageuploadapplet.getImageFromClipboad();" when showing div with applet and if screenshot already exist in clipboard it will be pasted - one click saved :)).

Updated by Jean-Philippe Lang 8 months ago

Nice work!

Here is a new version of the plugin that includes your modified applet.
Clipboard is pasted when showing the applet, and name+description can now be entered.

Updated by Alexey Skor 7 months ago

is it possible to integrate this feature into standard Redmine build?

Updated by Jack Kurzecki 7 months ago

If you are serving Redmine in SubURI, this plugin won't load.

The fix is to change line 3 of "path/to/redmine/vendor/plugins/redmine_screenshot_paste/app/views/issues/_screenshot.rhtml" to:

<applet archive="<%= Redmine::Utils.relative_url_root %>/plugin_assets/redmine_screenshot_paste/simageuploadapplet.jar" 

(This assumes you added prefix to "path/to/redmine/config/environment.rb" as per HowTo_Install_Redmine_in_a_sub-URI)

This is a great plugin. Thanks Jean-Philippe and Andrew for making this available.

Updated by Jack Kurzecki 7 months ago

The attached file is a modification to load the Java applet on demand rather than every time a new issue page is opened, which was giving a warning about unverified digital signature.

It also checks for Redmine::Utils.relative_url_root and availability of Java.

Updated by Amil Waduwawara 6 months ago

I'm running Redmine v0.9.0 RC and installed the plug-in (just unzipped redmine_screenshot_paste-2.zip)

Restarting Redmine gives "Drag or paste from clipboard" link upon pressing update button and applet gets the clipboard content pasted. But nothing special happens when pressing Submit button after entering "Name" and "Description".

I suspect ... "uploaded_screenshot"=>{"name"=>"screenshot", "content"=>"", "description"=>"error page"}, ... from below log extract. Do you see any clue?

Rest of the Redmine stuff works fine.

Log extract:

Processing IssuesController#edit (for www.xxx.yyy.zzz at 2010-01-28 17:09:47) [POST]
  Parameters: {"time_entry"=>{"comments"=>"", 
                              "activity_id"=>"", 
                              "hours"=>""}, 
               "commit"=>"Submit", 
               "notes"=>"", 
               "action"=>"edit", 
               "authenticity_token"=>"lSC6zELEOP8qIg5fw/y+oAjlmsM2BhJNkmB6JquyEks=", 
               "id"=>"1478", 
               "issue"=>{"start_date"=>"", 
                         "estimated_hours"=>"", 
                         "priority_id"=>"4", 
                         "lock_version"=>"2", 
                         "fixed_version_id"=>"33", 
                         "done_ratio"=>"0", 
                         "assigned_to_id"=>"3", 
                         "subject"=>"Redmine improvements", 
                         "tracker_id"=>"4", 
                         "due_date"=>"", 
                         "status_id"=>"1", 
                         "description"=>"This tracks improvements to Redmine"}, 
               "controller"=>"issues", 
               "uploaded_screenshot"=>{"name"=>"screenshot", 
                                       "content"=>"", 
                                       "description"=>"error page"}, 
               "attachments"=>{"1"=>{"description"=>""}}}
Redirected to http://mysite/issues/1478
Completed in 157ms (DB: 85) | 302 Found [http://mysite/issues/1478/edit]

Updated by Evgeny Mukhin 5 months ago

I'm using BitNami virtual machine image. I unzipped the plugin to redmine/vendor/plugins/ folder, changed "_screenshot.rhtml" as described above and added line 'Redmine::Utils::relative_url_root = "/redmine"' to the bottom of "redmine/config/environment.rb"

I get next error:

load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/Main.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main
load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/Main.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main
load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/Main.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main
load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/Main.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main
load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/Main.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main

Updated by Jack Kurzecki 5 months ago

Evgeny Mukhin wrote:

I'm using BitNami virtual machine image. I unzipped the plugin to redmine/vendor/plugins/ folder, changed "_screenshot.rhtml" as described above and added line 'Redmine::Utils::relative_url_root = "/redmine"' to the bottom of "redmine/config/environment.rb"

I get next error:

load: class imageuploadapplet.Main not found. java.lang.ClassNotFoundException: imageuploadapplet.Main at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/Main.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more

This is the error I was getting when the .jar file was not found before I updated _screenshot.rhtml

I'm not sure about the BitNami stack, but you do not need to modify redmine/config/environment.rb if you are serving Redmine in something like http://redmine.yourhost.com
This is only required if you are serving Redmine in something like http://yourhost.com/redmine (as I am) and it must match your path.

Updated by Evgeny Mukhin 5 months ago

Jack Kurzecki wrote:

This is the error I was getting when the .jar file was not found before I updated _screenshot.rhtml

I'm not sure about the BitNami stack, but you do not need to modify redmine/config/environment.rb if you are serving Redmine in something like http://redmine.yourhost.com This is only required if you are serving Redmine in something like http://yourhost.com/redmine (as I am) and it must match your path.

As like you I access Redmine by http://192.168.111.129/redmine/ so i guess i have to modify named file.
Interesting part of this file looks like
<applet archive="<%= Redmine::Utils.relative_url_root %>/plugin_assets/redmine_screenshot_paste/simageuploadapplet.jar"'

I found simageuploadapplet.jar file there: redmine/public/plugin_assets/redmine_screenshot_paste/simageuploadapplet.jar

I dont have a foggest idea why it is trying to find Main.class in the path http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/
there's no such path in the project.

Updated by Jack Kurzecki 5 months ago

  • Assigned to set to Jean-Philippe Lang

After a recent update to "Redmine 0.9.3.devel.3525" this pluggin stopped working. I'm getting the same "nothing is happening" issue as note-12 above.


This is log after creating a new issue with screenshot added using this plugin:


Processing IssuesController#new (for 192.168.1.100 at 2010-03-04 17:46:07) [POST]
    Parameters: {
        "commit"=>"Create", 
        "project_id"=>"pr1", 
        "action"=>"new", 
        "authenticity_token"=>"gvY0GfE...CROPPED...=", 
        "issue"=>{
            "start_date"=>"2010-03-04", 
            "estimated_hours"=>"", 
            "priority_id"=>"4", 
            "done_ratio"=>"0", 
            "assigned_to_id"=>"3", 
            "subject"=>"test screenshot copy", 
            "category_id"=>"6", 
            "tracker_id"=>"3", 
            "due_date"=>"", 
            "status_id"=>"2", 
            "description"=>"test screenshot copy" 
        }, 
        "controller"=>"issues", 
        "attachments"=>{
            "1"=>{
                "description"=>"" 
            }
        }, 
        "uploaded_screenshot"=>{
            "name"=>"screenshot", 
            "content"=>"iVBORw0KG...CROPPED...", 
            "description"=>"" 
        }
    }
Sending email notification to: me@myhost
Redirected to http://myhost/redmine/issues/123
Completed in 109ms (DB: 61) | 302 Found [http://myhost/projects/pr1/issues/new]

Processing IssuesController#show (for 192.168.1.100 at 2010-03-04 17:46:08) [GET]
    Parameters: {
        "action"=>"show", 
        "id"=>"123", 
        "controller"=>"issues" 
    }
Rendering template within layouts/base
Rendering issues/show.rhtml
Completed in 172ms (View: 141, 
DB: 0) | 200 OK [http://myhost/issues/123]


This is after I try to update the issue with another screenshot (again the picture is showing on the form, but doesn't get stored):


Processing IssuesController#update (for 192.168.1.100 at 2010-03-04 17:46:28) [PUT]
    Parameters: {
        "time_entry"=>{
            "comments"=>"", 
            "activity_id"=>"10", 
            "hours"=>"" 
        }, 
        "commit"=>"Submit", 
        "notes"=>"", 
        "action"=>"update", 
        "_method"=>"put", 
        "authenticity_token"=>"gvY0GfE...CROPPED...", 
        "id"=>"123", 
        "issue"=>{
            "start_date"=>"2010-03-04", 
            "estimated_hours"=>"", 
            "priority_id"=>"4", 
            "lock_version"=>"0", 
            "done_ratio"=>"0", 
            "assigned_to_id"=>"3", 
            "subject"=>"test screenshot copy", 
            "category_id"=>"6", 
            "tracker_id"=>"3", 
            "due_date"=>"", 
            "status_id"=>"2", 
            "description"=>"test screenshot copy" 
        }, 
        "controller"=>"issues", 
        "uploaded_screenshot"=>{
            "name"=>"screenshot", 
            "content"=>"iVBORw0KGgoAAAANSUhEUgAABa...CROPPED...=", 
            "description"=>"test" 
        }, 
        "attachments"=>{
            "1"=>{
                "description"=>"" 
            }
        }
    }
Redirected to http://myhost/redmine/issues/123
Completed in 218ms (DB: 31) | 302 Found [http://myhost/issues/123/edit]

Processing IssuesController#show (for 192.168.1.100 at 2010-03-04 17:46:28) [GET]
    Parameters: {
        "action"=>"show", 
        "id"=>"123", 
        "controller"=>"issues" 
    }
Rendering template within layouts/base
Rendering issues/show.rhtml
Completed in 313ms (View: 281, 
DB: 0) | 200 OK [http://myhost/issues/123]


I looked at the production logs from when the screenshot attaching worked (Jan, Feb) and nothing has changed in the request.

Jean-Philippe,
is there any chance you could take a look at an update to this plugin?
It is extremely useful in my organization. It would be great if it made it into core.
I'm running Redmine as a mongrel cluster proxied by Apache on Windows 2003.

Updated by Andrew Chaika 5 months ago

This plugin will no longer work after r3523 changes.

Updated by Jean-Philippe Lang 5 months ago

You can get the new version here: PluginScreenshotPaste.

Updated by Jack Kurzecki 5 months ago

Thank you Jean-Philippe!

I was just in the middle of reverting back to r3522 when you posted the updated version and the original plugin worked as Andrew suggested.

Now I again went back to r3525 and using your updated plugin I was getting the error about .jar file not being found. I'm hosting Redmine in http://myhost/redmine and adding <%= Redmine::Utils.relative_url_root %> in front of the path fixed the issue. (I know that this is not the appropriate way of doing this, but its a quick fix).

If anyone is interested, I modified _screenshot.rhtml to load the applet on demand and to work when Redmine is not at the root of the webserver.

Thanks again Jean-Philippe and Andrew!

Updated by Evgeny Mukhin 5 months ago

alexey skor wrote:

is it possible to integrate this feature into standard Redmine build?

I'd be brilliant. I cant make it work and I'm not sure it costs my time. Is there any chance the plugin will be incuded in say demo ?

Updated by pa riera 4 months ago

For production reasons I cannot migrate to the new version of redmine, so the plugin do not work (I^m using redmine 0.8.x)
Possible to make it work for this old version ???

Updated by Rafi Greenberg 4 months ago

I am unable to get this plugin working properly with 0.9.3. I have tried every combination. It is accepting the paste from the clipboard, but then nothing is actually attached to the ticket.

Any help?

Updated by Alexander Zhovnuvaty 4 months ago

Rafi Greenberg wrote:

I am unable to get this plugin working properly with 0.9.3. I have tried every combination. It is accepting the paste from the clipboard, but then nothing is actually attached to the ticket.

Any help?

Neither am I. I tried 1.0.2 plugin version with Redmine 0.9.3.stable (PostgreSQL). Was not able to paste screenshot from clipboard via IE7, IE8 and FireFox 3.6.3.

Updated by Max Meier 3 months ago

I tried this plugin with Redmine 0.9.3.stable.3625. When I restart Redmine, I get an error and redmine doesn't start:

** Starting Mongrel listening at 0.0.0.0:3010
** Starting Rails with production environment...
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/aliasing.rb:33:in `alias_method': undefined method `attach_files' for class `Class' (NameError)
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/aliasing.rb:33:in `alias_method_chain'
        from /var/lib/redmine.stable/vendor/plugins/redmine_screenshot_paste/init.rb:42:in `included'
        from /var/lib/redmine.stable/vendor/plugins/redmine_screenshot_paste/init.rb:40:in `class_eval'
        from /var/lib/redmine.stable/vendor/plugins/redmine_screenshot_paste/init.rb:40:in `included'
        from /var/lib/redmine.stable/vendor/plugins/redmine_screenshot_paste/init.rb:66:in `include'
        from /var/lib/redmine.stable/vendor/plugins/redmine_screenshot_paste/init.rb:66:in `send'
        from /var/lib/redmine.stable/vendor/plugins/redmine_screenshot_paste/init.rb:66
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in `call'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in `evaluate_method'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in `call'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `each'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `send'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in `run_callbacks'
        from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in `send'
        from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in `prepare_dispatcher'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in `process'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
        from /var/lib/redmine/config/environment.rb:20
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:147:in `rails'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:113:in `cloaker_'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `call'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `listener'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `call'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `initialize'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
        from /usr/bin/mongrel_rails:19:in `load'
        from /usr/bin/mongrel_rails:19

Updated by Eraldo Girardi 3 months ago

Hello,
I'm running the 0.9.trunk and have the same log as http://www.redmine.org/issues/3816#note-16
I'm trying to debug in NetBeans and I found this on line 49 in the init.rb plugin file:

screenshot = attachments['screenshot']

The result of that statement is nil, so the screenshot save always fail.
I hope anyone can understand this as I'm really new to ruby.

Updated by Victor Doulepov 3 months ago

Some time ago we did a similar job internally for our tracker, but allowing more than one screenshot at a time and showing thumbnails (it's a bit technically different from the original solution by Jean-Philippe).
Now it is cleared for public domain, so feel free to try (attached). Should work on the 0.9.x family (verified up to 0.9.4). Requires RMagick to show screenshot thumbnails when adding/editing an issue. Known to conflict with Local Avatars .

Credits:
Authors: Konstantin Zaitcev (also at Redmine), Sergei Vasilyev, Alexandr Poplavsky
Work sponsored by Axmor Software

Updated by Eraldo Girardi 3 months ago

Victor Doulepov wrote:

Some time ago we did a similar job internally for our tracker, but allowing more than one screenshot at a time and showing thumbnails (it's a bit technically different from the original solution by Jean-Philippe). Now it is cleared for public domain, so feel free to try (attached). Should work on the 0.9.x family (verified up to 0.9.4). Requires RMagick to show screenshot thumbnails when adding/editing an issue. Known to conflict with Local Avatars .

Credits: Authors: Konstantin Zaitcev (also at Redmine), Sergei Vasilyev, Alexandr Poplavsky Work sponsored by Axmor Software

I tried it but I get this in my log:

7-mag-2010 12.35.34 org.apache.catalina.core.ApplicationContext log
GRAVE: unable to create shared application instance
org.jruby.rack.RackInitializationException: undefined method `attach_files' for class `ApplicationController'
    from C:/Programmi/Apache Software Foundation/Tomcat 5.5/webapps/redmine/WEB-INF/vendor/plugins/redmine_attach_screenshot/lib/application_patch.rb:9:in `included'
    from C:/Programmi/Apache Software Foundation/Tomcat 5.5/webapps/redmine/WEB-INF/vendor/plugins/redmine_attach_screenshot/lib/application_patch.rb:8:in `class_eval'
......

Maybe this can be useful: http://www.redmine.org/boards/3/topics/11643?r=12986#message-12986
I hope you can fix. This is very useful for me (my users..).
Thank you

Updated by Eraldo Girardi 3 months ago

Victor Doulepov wrote:

Some time ago we did a similar job internally for our tracker, but allowing more than one screenshot at a time and showing thumbnails (it's a bit technically different from the original solution by Jean-Philippe). Now it is cleared for public domain, so feel free to try (attached). Should work on the 0.9.x family (verified up to 0.9.4). Requires RMagick to show screenshot thumbnails when adding/editing an issue. Known to conflict with Local Avatars .

Credits: Authors: Konstantin Zaitcev (also at Redmine), Sergei Vasilyev, Alexandr Poplavsky Work sponsored by Axmor Software

I tried it but I get this in my log:

7-mag-2010 12.35.34 org.apache.catalina.core.ApplicationContext log
GRAVE: unable to create shared application instance
org.jruby.rack.RackInitializationException: undefined method `attach_files' for class `ApplicationController'
    from C:/Programmi/Apache Software Foundation/Tomcat 5.5/webapps/redmine/WEB-INF/vendor/plugins/redmine_attach_screenshot/lib/application_patch.rb:9:in `included'
    from C:/Programmi/Apache Software Foundation/Tomcat 5.5/webapps/redmine/WEB-INF/vendor/plugins/redmine_attach_screenshot/lib/application_patch.rb:8:in `class_eval'
......

Maybe this can help: http://www.redmine.org/boards/3/topics/11643?r=12986#message-12986
I hope you can fix. This is very useful for me (my users..).
Thank you

Updated by Victor Doulepov 3 months ago

Eraldo Girardi wrote:

I tried it but I get this in my log: [...]

Maybe this can help: http://www.redmine.org/boards/3/topics/11643?r=12986#message-12986 I hope you can fix. This is very useful for me (my users..). Thank you

You're using 0.9.trunk, right? Looks like the attachment methods there are different from what's in 0.9.4. I think we'll be able to provide an update with the next stable release (we do live on them, not on trunk).

Updated by Eraldo Girardi 3 months ago

Victor Doulepov wrote:

You're using 0.9.trunk, right? Looks like the attachment methods there are different from what's in 0.9.4. I think we'll be able to provide an update with the next stable release (we do live on them, not on trunk).

Hi Victor,
I'm sorry for double post and for to miss my redmine version..
You are right, I'm using the latest 3735 trunk.
So I'll wait for the next stable release.

Thank you!

Updated by Max Meier 3 months ago

Hi,

I tried attaching a screenshot via Alt+Print and the button "Copy from clipboard". The image is visible in the applrt window, but when I attach it to the issue, I get the following in my log:

Processing AttachScreenshotController#index (for 10.10.10.41 at 2010-05-12 10:18:47) [POST]
  Parameters: {"action"=>"index", "controller"=>"attach_screenshot", "key"=>"f8757dd4a026656989181eaea2626f5e5ed3e3bc", "attachments"=>#<File:/tmp/RackMultipart20100512-25166-1uylxzl-0>}

Magick::ImageMagickError (no decode delegate for this image format `/var/lib/redmine.stable/tmp/4_101847screenshot.png' @ constitute.c/ReadImage/531):
  vendor/plugins/redmine_attach_screenshot/app/controllers/attach_screenshot_controller.rb:18:in `read'
  vendor/plugins/redmine_attach_screenshot/app/controllers/attach_screenshot_controller.rb:18:in `index'

Rendering /var/lib/redmine.stable/public/500.html (500 Internal Server Error)

I am using redmine 0.9.3.stable-3625 and imagemagick-6.5.8.8

Any help would be appreciated.

Updated by Victor Doulepov 3 months ago

Max Meier wrote:

Hi,

I tried attaching a screenshot via Alt+Print and the button "Copy from clipboard". The image is visible in the applrt window, but when I attach it to the issue, I get the following in my log: [...]

I am using redmine 0.9.3.stable-3625 and imagemagick-6.5.8.8

Any help would be appreciated.

Hi Max,
try following the instructions here ...
PNG support is essential for the plugin - I'm sorry that was missed in the original posting.

Updated by Premysl Vohnout 3 months ago

When I try to attach screenshot I get 500 internal server error and in production log is

/!\ FAILSAFE /!\  Fri May 14 17:28:30 +0200 2010
  Status: 500 Internal Server Error
  bad content body
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:698:in `read_multipart'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:667:in `loop'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:667:in `read_multipart'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:590:in `parse_multipart_form_parameters'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:520:in `parse_formatted_request_parameters'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:450:in `request_parameters'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:401:in `parameters'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:30:in `_unmemoized_request_method'
    /usr/share/redmine/vendor/rails/activesupport/lib/active_support/memoizable.rb:57:in `request_method'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:40:in `method'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:437:in `extract_request_environment'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:390:in `recognize'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:183:in `handle_request'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:112:in `dispatch_unlocked'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:125:in `dispatch'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `synchronize'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `dispatch'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:134:in `dispatch_cgi'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:41:in `dispatch'
    /usr/lib/ruby/1.8/phusion_passenger/railz/request_handler.rb:50:in `process_request'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /usr/lib/phusion_passenger/passenger-spawn-server:61

Using redmine-0.9.3-3~bpo50+1

Updated by Markus Peter 2 months ago

Hello,

I had the same error

load: class imageuploadapplet.Main not found

with plugin version 1.1.0 on FireFox, with redmine as default site (not in subdirectory).

Adding a codebase attribute to the applet tag like this:

codebase="/plugin_assets/redmine_screenshot_paste/" 

fixed the problem, and the applet loaded correctly.

Updated by Sheng Wang 2 months ago

I test this plugin in Windows XP, IE6 and Firefox both work well.
But in Linux, Firefox can't display the applet.
Who can tell me why?
Thanks.

Updated by Arne De Herdt about 1 month ago

I've installed the plugin on our redmine installation, and the new entry appears in the issue's view, but the applet itself is causing problems.

The applet is installed in the vendor folder as instructed, but it's producing errors. When looking in the production log, I'm getting the following:

Processing ApplicationController#index (for 192.168.112.108 at 2010-06-11 17:08:46) [GET]

ActionController::RoutingError (No route matches "/projects/misc/issues/imageuploadapplet/Main.class" with {:method=>:get}):
  passenger (2.2.11) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  passenger (2.2.11) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/utils.rb:184:in `safe_fork'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:163:in `start'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:213:in `start'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /opt/redmine/public/404.html (404 Not Found)

Would it be solved if i just add the following to routes.rb:

map.connect '/projects/misc/issues/imageuploadapplet/Main.class', :controller => 'index', :action => 'index'

Updated by Ezequiel Naftali about 1 month ago

Hi, Where is the codebase located?

codebase="/plugin_assets/redmine_screenshot_paste/"

Thanks

Markus Peter wrote:

Hello,

I had the same error [...] with plugin version 1.1.0 on FireFox, with redmine as default site (not in subdirectory).

Adding a codebase attribute to the applet tag like this: [...]

fixed the problem, and the applet loaded correctly.

Updated by Markus Peter about 1 month ago

Ezequiel Naftali wrote:

Hi, Where is the codebase located?

codebase="/plugin_assets/redmine_screenshot_paste/"

in /app/views/issues/_screenshot.rhtml you can add it as a attribute to the applet tag.

Updated by Carlo Hamalainen about 1 month ago

I have Redmine 0.9.3 running under the BitNami stack on a legacy Windows Server 2003 system.

I tried redmine_attach_screenshot_v.0.0.3.zip. I couldn't save the image and got a 500 internal server error. In the production log I saw this:

Processing AttachScreenshotController#index (for 192.168.100.1 at 2010-06-18 09:03:58) [POST]
  Parameters: {"action"=>"index", "controller"=>"attach_screenshot", "key"=>"0bf909de2d6c9c88f49883f202df6f45976d6455", "attachments"=>#<File:C:/WINDOWS/Temp/RackMultipart20100618-8172-1coq76s-0>}

ArgumentError (invalid value for Integer: "090358"):
  vendor/plugins/redmine_attach_screenshot_v.0.0.3/redmine_attach_screenshot/app/controllers/attach_screenshot_controller.rb:36:in `sprintf'
  vendor/plugins/redmine_attach_screenshot_v.0.0.3/redmine_attach_screenshot/app/controllers/attach_screenshot_controller.rb:36:in `make_tmpname'
  vendor/plugins/redmine_attach_screenshot_v.0.0.3/redmine_attach_screenshot/app/controllers/attach_screenshot_controller.rb:13:in `index'

Rendering C:/Program Files/BitNami Redmine Stack/apps/redmine/public/500.html (500 Internal Server Error)

So the fix isn't too hard. Change line 36 of attach_screenshot_controller.rb from

    sprintf('%d_%d%s', User.current.id, date, name)

to this:

    sprintf('%d_%s%s', User.current.id, date, name)

Great plugin! Thanks for making it public.

Updated by Steven Meiracker about 1 month ago

Hi All,
I am using the Turnkey Redmine which I have updated to 0.9.4
I have tried to install the screenshot plugin but get same error as above:
load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://10.1.1.22/projects/surpass/issues/imageuploadapplet/Main.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main

I am running the website as / so it shouldn't be a path issue but I have had no luck getting it working.
I am new linux so I apologise if I have missed something simple.
Thanks :)

Updated by Aniruddha Shankar 8 days ago

Problem still persists in version 0.9.6. I think the one common thread between me and the poster just above me is that both our redmine installs are hosted at http://base.domain/<somename>

Java Plug-in 1.6.0_15
Using JRE version 1.6.0_15-b03 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Sirji.SATORI
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://dev.XXXXXX.com/pm/projects/launch/issues/imageuploadapplet/Main.class
    at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main

Also available in: Atom PDF