Cannot attach screenshot due to missing permissions

Hi!

We have recently installed YouTrack 4.2.1. We have problems attaching an image to a task. The log contains the following line:

jetbrains.mps.webr.rpc.rest.runtime.ForbiddenException: You have no access to attach files. Add Attachment permission is required

But this does not change even if we assign the administrator role to every user.

Furthermore, upgrading to YouTrack 4.2.4 fails with a ClassCastException!

Any help is appreciated!

Markus
0
15 comments
Hello Markus,

Please, provide us with the screenshot of the Permissions View of the group, that tries to attach a screenshot to an issue, and with the name of the project these issues are belonged to.

Also, please share with us youtrack logs, to allow us investigate your upgrade problem (user_home/.youtrack/logs)

Thank you.
0
Avatar
Permanently deleted user
Hello Andrey,

thank you for the quick reply. In the meantime, I managed to upgrade to YouTrack 4.2.4. I just tried twice and no error occurred.

Find a screenshot of the roles of the project: "Q". Every team member is in this group.

Please note that we're running TeamCity and YouTrack in one Tomcat instance.

Let me know if you need further information.

rolesView.png
0
Markus,

Thank you for details.

Please, provide us with YouTrack logs. If you run YouTrack under Tomcat, then logs are located in Tomcat's log directory.
You can attach logs here or send it to us to youtrack-feedback@jetbrains.com

Thank you.
0
Avatar
Permanently deleted user
Hello Andrey,

should I provide the complete log file (~7MB)? Are there any confidential values in the log?

I will provide a snippet of the log right here which contains the failing request.

Markus

logsnippet.txt (5.5KB)
0
Hi Markus,

Yes, it'll be great if you can attach complete log file. Log includes values like YouTrack usernames.
Please, clarify, step by step how do you attach a file to an issue.

Thank you.
0
Avatar
Permanently deleted user
Hello Markus,

Could you, please, clarify from where are you trying to attach screenshot? From full screen issue, issues list or from another page?
0
Avatar
Permanently deleted user
Hi Andrey, Mikhail,

I've attached the logfile from today (I just replaced our URL in the log). I've also attached two screenshots which show how we attach a screenshot: From a full-screen-issue, we choose Attach->Screenshot (StartAttach.png). Then the screenshot is taken and a new window opens. We can crop (and highlight and so on) the screenshot in the window. Clicking on "Attach" in the new window closes the window and leads to the error message in my second screenshot (errormessage.png).

Markus

StartAttach.png

errormessage.png

youtrack.log (2.2MB)
0
Avatar
Permanently deleted user
Hi!

Please note that attaching a file works!

Markus

startAttachfile.png

worked.png
0
Avatar
Permanently deleted user
Hello!
Please, check your baseURL.
Goto Administration -> Settings, for baseURL field click "Guess URL". You URL should be like: XXX\youtrack
0
Avatar
Permanently deleted user
Hi!

The base URL seems to be right. The URL is identical to the URL in the browser address line. Also, 'guessing' the URL did not change to adress.

Markus

settings.png
0
Avatar
Permanently deleted user
Could you please, attach log from java console.
To enable java console:
Goto: Control Panel -> Java -> Advanced tab, Java console section and select "Show console".
Then try to create screenshot, copy log message from java console and send it to us.
0
Avatar
Permanently deleted user
Hi Mikhail,

I get the following error when doing a screenshot in my local java console:

INFO [5412775] [Thread[Thread-16,4,http://URL_TO_OUR_SERVER:81/youtrack/issue/-threadGroup]] No proxy detected
java.io.IOException: Server returned HTTP response code: 403 for URL: http://URL_TO_OUR_SERVER:81/youtrack/rest/issue/74-121/attachment/?name=screenshot
java.io.IOException: Server returned HTTP response code: 403 for URL: http://URL_TO_OUR_SERVER:81/youtrack/rest/issue/74-121/attachment/?name=screenshot
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
 at java.lang.reflect.Constructor.newInstance(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
 at jetbrains.charisma.jetshot.light.b.A(Unknown Source)
 at jetbrains.charisma.jetshot.light.b.A(Unknown Source)
 at jetbrains.charisma.jetshot.light.b.A(Unknown Source)
 at jetbrains.charisma.jetshot.light.b.A(Unknown Source)
 at jetbrains.charisma.jetshot.light.b$1.run(Unknown Source)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://URL_TO_OUR_SERVER:81/youtrack/rest/issue/74-121/attachment/?name=screenshot
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
 at java.net.HttpURLConnection.getResponseCode(Unknown Source)
 ... 5 more

INFO [5412775] [Thread[AWT-EventQueue-2,4,http://URL_TO_OUR_SERVER:81/youtrack/issue/-threadGroup]] click to [cantAttachButtonId] with js [javascript:document.getElementById('id_l.I.as.cantAttach').click();]

Markus
0
Avatar
Permanently deleted user
Hi!

We found another issue, which may cause the image upload problem. Accessing the server with the Internet Explorer through the URL
http://OUR_SERVER:81/youtrack
leads to the message: This page cannot be displayed. Accessing the URL
http://OUR_SERVER:81/youtrack/dashboard
works as expected. Maybe this helps investigating the issue.

Markus
0
Avatar
Permanently deleted user
Markus, could you tell what tomcat version you use?
And also, please, check value for attribute "useHttpOnly".

I suppose your problem is related with this case:
http://stackoverflow.com/questions/8495327/tomcat-7-jsessionid-cookie-is-not-accessible-from-javascript-code
0
Avatar
Permanently deleted user
Hi Mikhail,

We are running Tomcat 7.0 that was shipped with the TeamCiy installation. After I added the line "useHttpOnly=false" to the context.xml configuration file in Tomcat, I could attach a screenshot.

So our issue is finally solved! Thank you very much for your help!

Markus
0

Please sign in to leave a comment.