TFS 2012: Issues with displaying pictures embedded into description

Terkunci TFS 2012: Issues with displaying pictures embedded into description

  • Friday, September 21, 2012 11:01 AM
     
     

    Hello,
    I have TFS 2012 (upgraded from TFS 2010).

    Using Visual Studio 2012 I created work item and inside the description field (type of HTML) I pasted picture. The picture is embedded and displayed as part of text so experience it very nice (similar to Word).

    When I open this work item again everything is displayed correctly on my machine. The problem is when another user tries to open it. The picture is missing.

    After little investigation it seems that HTML stored in description field embeds picture referenced from the server using following URL (which looks very promising):

    http://xxxx:8080/tfs/yyyy/WorkItemTracking/v1.0/AttachFileHandler.ashx?FileNameGUID=e1d94157-889a-411c-aea6-41fafe782548&FileName=tmp990D.png

    But this URL does not work for every user.

    Some users get following error and accessing above URL directly in browser:
    TF51305: Either the file identification number is incorrect, or the file is missing.

    some other users get HTTP error 400 “bad request” (depending on the browser).

    It seems we have nice improvement in TFS 2012 in area of embedded pictures support. I just need to make it work. I need additional troubleshooting guidelines or solutions.

    Best Regards,

    Pawel

All Replies

  • Monday, September 24, 2012 10:07 AM
    Moderator
     
     

    Hi Pawel,

    Thanks for your post.

    What’s the version of your TFS 2012, RC or RTM? 

    Under Tfs_CollecitonName database, query the WorkItemFiles table, ensure the file guid e1d94157-889a-411c-aea6-41fafe782548 existed in the table, and the work item ID is that work item which you created and inserted picture in it.   

    This issue happened on the random machine and occurred with the random users?

    I suggest you restart the TFS Server: on Server machine, click Start and select Run… to open the dialog box, then input iisreset.exe and click OK, wait it run completely.

    If you have any further research of this issue, please share your experience here.  


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

  • Tuesday, September 25, 2012 8:44 AM
    Moderator
     
     

    Hi Pawel, 

    If misunderstood anything, please describe your question in more detail and we will be able to provide the better responses.


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

  • Tuesday, September 25, 2012 2:31 PM
     
     

    Hello,

    Thank you for reply.

    I use TFS 2012 RTM (upgraded from TFS 2010).

    I checked WorkItemFiles table and there are no entries related to my pictures embeded into description.

    Also after several days pictures disappeared also from my machine (they are no longer displayed - at least this is consistent now for all users) - probably they were cached somewhere.

    This means that the issue is now: Why the pictures are not uploaded when embeded into description text?

    Best Regards,
    Pawel

  • Wednesday, September 26, 2012 2:43 AM
    Moderator
     
     

    Hi Pawel, 

    Thanks for your reply.

    If there’s no entries in WorkItemFiles table, I agree with you that the pictures no be uploaded to TFS server. 

    That work item is the default work item type or a customized work item type? If it’s the default work item type, which type it is?

    Have you tried to embed pictures in other types of work item? Or embed picture into the work items which under other Team Projects? Please check if occur the same issue in other work items.

    And you can clean the Cache and restart TFS Server manually:

      •        Clean the Cache folder on client computer. The folder path is: C:\Users\username(Team Explorer user name)\AppData\Local\Microsoft\Team Foundation\4.0\Cache(os: Windows Server 2008 R2)
      • Clean the Cache folder on Server machine. The folder path is: C:\Users\username(Web access user name)\AppData\Local\Microsoft\Team Foundation\4.0\Cache(os: Windows Server 2008 R2)
      • After cleaned, on Server machine, click Start and select Run… to open the dialog box, then input iisreset.exe and click OK, wait it run completely.

       


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

  • Wednesday, September 26, 2012 3:04 PM
     
     

    John,

    Are are the details requested by you:

    All my work items are customized. They are similar to standard agile Task type. I attempt to paste pictures from clipboard into Description field (type of HTML) and into standard History field. It does not work for all work item types in my (only one) project.

    If I add picture as attachement then file is sucesfully uploaded into WorkItemFiles table.

    I cleared all caches as restarted TFS machine - no changes.

    What is interesting the embed picture uses following URL:
    http://xxx:8080/tfs/yyy/WorkItemTracking/v1.0/AttachFileHandler.ashx?FileNameGUID=31089fd5-8f9b-48a1-bfbd-62c809e12df8&FileName=tmp2FEB.png

    This URL returns the picture for sometime and after several hours it return error:
    TF51305: Either the file identification number is incorrect, or the file is missing.

    Best Regards,
    Pawel

  • Thursday, September 27, 2012 3:25 AM
    Moderator
     
     

    Hi Pawel,

    Thanks for your reply.

    As your work item type is customized, can you share your Description field definition xml file here? I need to reproduce this issue on my TFS 2012.  

    And I think this issue requires more troubleshooting. If it is urgent issue, I suggest you to contact a Professional Support Service at http://support.microsoft.com/common/international.aspx?RDPATH=gp;en-us;offerprophone to gain more support on this case.   


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

  • Thursday, September 27, 2012 10:37 AM
     
     

    John,
    My description field is nothing fancy (it was added in TFS 2010 as pure text
    based System.Description as not nice enough):<o:p></o:p>

    <FIELD name="Rich Description" refname="xxx.RichDescription" type="HTML">
      <HELPTEXT>Case description</HELPTEXT>
    </FIELD><o:p></o:p>

    The same issue happens for standard “History” field.<o:p></o:p>

    And here are detail steps to reproduce:
    1. Create new work item in Visual Studio 2012
    2. Navigate do description field and start typing some text.
    3. Capture screen into clipboard using any tool (for example OneNote or
    Alt-PrintScreen)
    4. Paste capture picture from Clipboard into work item description test
    5. Continue typing additional text into description text.
    6. Save work item – at the moment you should have text with embedded picture in
    the description.
    7. Open saved work item on different machine (or on the same after 24 hours)– picture is missing, it is also not uploaded into WorkItemFiles table.<o:p></o:p>

    Best Regards,
    Pawel

  • Friday, September 28, 2012 6:21 AM
    Moderator
     
     

    Hi Pawel,

    Thanks for your post.

    Can you do this test: import a default(with nothing edit) work item type to your team project, then create a new work item using this type and paste a picture(.jpg) in the Description field, then save this work item, check whether the picture information saved in WorkItemFiles table, if the picture display correctly when open this work item again(after 24 hours or open on other client).

    If everything work fine in the default work item type, I think this issue relate to your custom work item type, maybe some other customize field or something caused this issue.

    If the same issue occurred in the default work item type, I think this issue relate to the Work Item Tracking feature in your TFS 2012 Server. Which version of SQL Server configured with your TFS 2012 Sever?

    If you have any further research of this issue, please share your experience here.      


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

  • Friday, September 28, 2012 1:06 PM
     
     

    John,
    I created new TFS project using original MFS for Agile v6 process template. Everything standard - no customizations.

    Tested using User Story work item - exactly the same problem - no upload into WorkItemFiles table.

    I use SQL 2008 R2 with updates:
    Microsoft SQL Server 2008 R2 (SP1) - 10.50.2811.0 (X64)   Apr  6 2012 01:59:29   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)

    What else we can investigate to resolve this?

    Best Regards,
    Pawel

  • Friday, September 28, 2012 6:55 PM
     
     

    John,
    My description field is nothing fancy (it was added in TFS 2010 as pure text
    based System.Description as not nice enough):<o:p></o:p>

    <FIELD name="Rich Description" refname="xxx.RichDescription" type="HTML">
      <HELPTEXT>Case description</HELPTEXT>
    </FIELD><o:p></o:p>

    The same issue happens for standard “History” field.<o:p></o:p>

    And here are detail steps to reproduce:
    1. Create new work item in Visual Studio 2012
    2. Navigate do description field and start typing some text.
    3. Capture screen into clipboard using any tool (for example OneNote or
    Alt-PrintScreen)
    4. Paste capture picture from Clipboard into work item description test
    5. Continue typing additional text into description text.
    6. Save work item – at the moment you should have text with embedded picture in
    the description.
    7. Open saved work item on different machine (or on the same after 24 hours)– picture is missing, it is also not uploaded into WorkItemFiles table.<o:p></o:p>

    Best Regards,
    Pawel

     I have same issue with TFS 2012. After pasting image into description and saving work item - I can't access to image via VS any longer. Although if I try web interface - image is where.

    I've tried to access image via URL provided to embedded image, and that I found out are

    1. If I try to open that URL in IE, I've asked to enter my credentials every time I open new instance of IE, even those credentials are saved in Credintial Manager

    2. If I open image via IE, it looks like it somehow cashed, because after that I can see that image in VS. But only that image.

    3. If I'll close VS after that, and try to open it again - images are again dissapeared from work item

    So it looks like some autorization issue, but I have no idea, how to resolve it.

  • Monday, October 01, 2012 10:10 AM
    Moderator
     
     

    Hi Pawel, 

    Thanks for your reply.

    Have you checked the Event Viewer log, if any error relate to this issue, please share the detailed error log here.

    According this document, TFS 2012 support SQL Server 2008 R2 Enterprise Edition with SP1 CU1(Aug 25, 2011,), please check that in your SQL Server 2008 Enterprise. And please refer to this blog: http://blogs.msdn.com/b/bharry/archive/2012/02/01/make-sure-your-sql-server-enterprise-edition-is-up-to-date.aspx.   


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us

  • Tuesday, October 02, 2012 9:00 AM
     
     

    John,

    Above build of SQL (10.50.2811.0) represents more recent update:
    Cumulative update package 7 for SQL Server 2008 R2 Service Pack 1
    This means I believe I have correct version of SQL.

    I also checked all entries in Event Viewer and everything seems normal (no single error).

    Any other ideas - what could be tested to troubleshoot it?

    Best Regards,
    Pawel

  • Wednesday, October 03, 2012 11:26 PM
    Owner
     
     

    Please take a fiddler trace from the  tfs server when you attempt to open the work item

    http://www.fiddler2.com

    I expect you to see:

      • GET  requests for the picture  file and
      • HTTP 401 
      • GET  requests for the picture  file and
      • The correct behavior is to have HTTP 200

    Please provide these 2 requests and responses

    Thank you

  • Tuesday, October 09, 2012 1:38 PM
     
     

    Hi, Teodora & other from MSFT,

    we are facing the very same issue with our TFS2012 RTM instance (which has been upgraded from clean Beta to RC and from RC to RTM).

    I have captured the two HTTP sessions for you. The only difference between the two requests is in the Authorization (and User-Agent, where on one of the computers is InfoPath.3 installed):

    Diff

    You can find the full Fiddler sessions here: http://preview.havit.cz/MissingImagesBug.zip


    Robert Haken, Microsoft MVP ASP/ASP.NET, HAVIT, s.r.o., www.havit.cz, http://knowledge-base.havit.cz

  • Wednesday, October 10, 2012 5:24 PM
    Owner
     
     

    Can you confirm if this is user related or machine related?

    In other words, please have a user he does not experience the problem log on a user machine that experiences the problem and test using his/hers credentials.

    Thank you

  • Thursday, October 11, 2012 8:48 AM
     
     

    It is user-related.

    I have tried to switch the user on same computer and the second user does not see the picture as the first one still can get it.


    Robert Haken, Microsoft MVP ASP/ASP.NET, HAVIT, s.r.o., www.havit.cz, http://knowledge-base.havit.cz

  • Thursday, October 11, 2012 10:18 AM
     
     

    Hello,
    It seems that more and more environments are affected by this issue. Dear Microsoft friends - please put more focus into it if possible...

    Just to eliminate some confusion:

    This issue is related to broken upload of the pictures from WI editor into TFS database. After saving WI embeded pictures are not present in TFS database - I believe this is root case here. It is NOT related to specific users or machines.

    Unfortunately the pictures are cached somewhere so saving user can retrieve the file for some time (which makes it harder to reproduce and understand) but this is just side effect. Picture cannot be downloaded (retrieved) because it is not uploaded correctly.

    Please focus on broken upload instead of non-deterministic results of download attempts.

    Best Regards,
    Pawel

  • Thursday, October 11, 2012 10:48 AM
     
     

    Hi, All,

    I have reported this issue to Microsoft Connect yesterday. Feel free to add any comments (or repros) there:

    https://connect.microsoft.com/VisualStudio/feedback/details/766722/issues-with-displaying-pictures-embedded-into-work-item-description-via-vs2012#tabs


    Robert Haken, Microsoft MVP ASP/ASP.NET, HAVIT, s.r.o., www.havit.cz, http://knowledge-base.havit.cz

  • Thursday, October 11, 2012 4:23 PM
    Owner
     
     Proposed

    Thank you for reporting the problem to Microsoft Connect. Our Product Team will review it and address it.

    Based on the description provided by you we attempted to replicate the problem in-house.

    Unfortunately, we have not been able to.

    From a support perspective, this is really beyond what we can do here in the forums.

    If the matter is urgent and you cannot determine the answer on your own, please consider opening a support case with us. Visit this link to see the various support options that are available to better meet your needs:  http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone.

    Thank you