Answered RTM share experience broken ?

  • Friday, August 17, 2012 4:20 PM
     
     

    I tried implementing the share contract for a share source app as I've done before, but when debugging the app the share pane displayed the progress ring and "Getting info from [appname]" message indefinitely. So I tried to run the app without the debugger, this time the message eventually goes away and is replaced by "Something went wrong with share. Try again later". I thought maybe something was wrong in my code, so I downloaded and ran the sample share source and target apps : exact same issue. Likewise if I open, say, the Photo app, select a local photo and bring up the Share charm.

    My app is written in XAML/C#. I went through the migration guide and read about the OS version. The sample apps have the correct version numbers, and of course so does the photo app installed with RTM.

    Is anything missing or is it a bug ?

    Is there something missing ?

All Replies

  • Friday, August 17, 2012 5:40 PM
    Moderator
     
     Answered

    Hello,

    I downloaded the Share Source sample from the web and ran it on RTM. It works just fine every time. I think you might have some installation issues here. If you run the debugger, did you get any exception? This link should help with debugging http://blogs.msdn.com/b/visualstudio/archive/2011/11/01/debugging-contracts-using-windows-simulator.aspx

    -Sagar


  • Saturday, August 18, 2012 12:53 AM
     
     Answered

    You're right, the share feature works fine in the simulator, including for my custom app. It doesn't work when running outside the simulator though. I'm away for a few days but I'll post a video later next week to show the issue.

  • Monday, August 27, 2012 1:06 AM
     
     

    I have the same exact problem. And IE can't share either.

    It appears to work in the simulator, going through the sharing code and invoking the email app, but then the email app comes back and also says "Something went wrong and this app can't share right now".

  • Monday, August 27, 2012 1:47 AM
     
     
    Update: I rebooted (I guess you still have to do that in Win8 :-)   ) and now it works OK most of the time. Sometimes it still hangs and then I have to reboot again.
  • Monday, August 27, 2012 2:37 AM
     
     Proposed
    New update: If you set a breakpoint in your event handler, or there is a problem in it, then it messes up sharing for all apps, and you have to reboot.
    • Proposed As Answer by rthorat Friday, September 21, 2012 7:59 PM
    •  
  • Monday, August 27, 2012 9:28 AM
     
     
    Yep same here, it works again, not sure what causes it to stop working, but like a_ludden I'm guessing it's related to debugging
  • Tuesday, August 28, 2012 2:06 AM
     
     Answered
    I just ran into the same problem. I'm on RTM. The first time I tried to share from my app (before I had implemented it) it gave the stock message about how this app can't share. So I implemented share very simply and then I got this same "Something went wrong..." message. I would only get the message when running without debugging. When debugging I would get an indefinite message saying it was trying to communicate with the app. I could not hit a breakpoint in the event handler. Works fine in the simulator. Haven't tried a reboot yet.
  • Tuesday, August 28, 2012 11:38 PM
     
     Answered

    Had the same problem. I got the indefinite getting info message. I tried to reader, same message for a second or so, followed by "Something went wrong...".

    I restarted my computer, and it was working fine. Now, I have the problem in the simulator but not in the desktop... I restarted the simulator, and sharing was working fine again. This was related to me updating my apps sharing capabilities, and is likely related to a run where things went wrong.

    I guess for future reference, you can always use the simulator when testing and debugging sharing. Then if you get the problem you can restart the simulator only, and not the whole computer.

  • Wednesday, September 19, 2012 4:38 PM
     
     

    Glad to see other people are having the same issue.  There is obviously a bug in Visual Studio related to debugging and the sharing experience.  I have a Connect bug open on this very issue, please go upvote it and mark that you can reproduce.  We need some additional people complaining about this to get Microsoft moving.

    http://connect.microsoft.com/VisualStudio/feedback/details/759477/repeatedly-debugging-a-share-operation-causes-event-handler-to-quit-firing-and-breakpoints-are-not-hit

    Btw, I'm coding in javascript, so apparently this bug is language/platform agnostic.  Makes me think it is a core issue either in Visual Studio 2012 or Windows 8 itself or both.

    Vicky, no clue why you are marking these responses as answered when there is not even a workaround here.  Restarting completely works SOMETIMES.  How is that a valid developer experience anyway?  It's taken me days to debug a simple share operation because I never know when share is going to work and when it isn't.  Btw, it doesn't always work in the simulator. Even when it does, that isn't very helpful if you are trying to share via email since the built-in Mail app doesn't work in the simulator (confirmed with my contacts at Microsoft).

    To add my experience, I have 3 possible debugging targets in my development environment: the Simulator, my local machine and a remote machine (Samsung slate).  With the exact same code, sometimes one will work and the others will not.  There is no rhyme or reason to it.  I've found that once you get the dreaded "getting info" message, you can retry as much as you want and share just won't work.  I've tried uninstalling the app, restarting Visual Studio, etc.  It looks like there is some process that is never completing and that is blocking any further sharing from happening.  This is borne out by sharing often breaking when an exception is encountered in the share operation while debugging.  To make matters worse, the soft dismiss of the share charm makes it very easy to have an incomplete share operation.

    What is the expectation here, that sharing will always complete in every application and there will never be a problem? This is going to be a huge problem once more developers actually start writing apps.  Are we supposed to reboot every time we change a line of code related to sharing?  It's already hard enough to actually share html content if it contains any embedded content such as images.


    • Edited by skills0 Wednesday, September 19, 2012 4:40 PM
    •  
  • Thursday, September 20, 2012 2:05 PM
     
     

    The Mail app works for me in the simulator, I can share with it from my app and the message does go through

  • Thursday, September 20, 2012 2:16 PM
     
     

    Do you mind sharing what type of account you have set up in the host OS? By that I mean Exchange, Gmail, Hotmail, something else?  I don't even get an option for Accounts in the simulator, so it appears to be sharing whatever is set up in the host?  Maybe certain types work and certain types do not.

    Even if I can get Mail working in the simulator, it doesn't solve the underlying issue.  There is still some sort of bug here.

  • Thursday, September 20, 2012 3:29 PM
     
     

    The client is using the Windows Live account I'm logged in with in Windows 8. I haven't set up anything, but I think I've allowed apps to use the account at Windows install.

    Yes sharing is definitely buggy. Until vnext I just restart the simulator, usually works for me.

  • Friday, September 21, 2012 8:02 PM
     
     
    I don't understand how rebooting is an acceptable "solution" for this issue.  As far as I can tell, the same thing can likely happen at runtime (crashing the share operations for the whole OS).  Even if that's not the case, rebooting every time something crashes share is not a development solution I want to live with.
  • Friday, September 21, 2012 11:08 PM
     
     

    I agree skills0. For someone still reading this thread, this might be of particular interest,

    http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/f0a6bf9f-4d14-4812-84f5-ad9d6358a5d2

  • Monday, October 01, 2012 7:00 AM
     
     

    I've also experienced this issue while implementing a simple shared text.  The share charm and interfaces seem to break the system after trying to debug the handler.  One single bad run on the callback for the share charm, breaks the entire share functionality for ALL apps, including the built-in social, photo and news apps.  Once this has happened, the share charm hangs in every single app I have tried until a reboot.

    My question is this:  can you inform us as to which debugging actions and/or delegate errors may run the risk of negatively affecting the share charm service? 

    It started for me after a single breakpoint was triggered inside the datarequested handler, and I'm 90% sure that it happened again when an exception was thrown inside the same handler.

    Thanks in advance.


    • Edited by basenickles Monday, October 01, 2012 7:40 AM trying not to complain
    •  
  • Friday, October 05, 2012 4:39 PM
     
     Proposed

    Where are you guys registering  and unregistering DataRequested event from?, you need to unregister from the event before the charm opens i.e. view lose focus otherwise charm will keep on waiting to complete the callback

    protected override void OnNavigatedFrom(NavigationEventArgs e)
            {
                base.OnNavigatedFrom(e);
                if (dataTransferManager != null)
                {
                    this.dataTransferManager.DataRequested -= DataTransferManagerOnDataRequested;
                }
            }

    • Proposed As Answer by Rohits79HK Friday, October 05, 2012 5:33 PM
    •  
  • Friday, October 05, 2012 6:06 PM
     
     

    not sure where you are getting this.  I don't think the charms opening is a navigation event, at least in a JavaScript app.

    The issue a lot of us are seeing is if an exception occurs during a share, share no longer works anywhere without a restart.  It is entirely possible that there is an orphan callback waiting to complete or something of that nature, but if so it isn't apparent how to cancel it.


    • Edited by skills0 Friday, October 05, 2012 6:07 PM correct sentence
    •  
  • Thursday, October 18, 2012 10:26 PM
     
     
    If you hit this problem, try restarting the Windows Explorer process rather than restarting your computer - still slightly painful but easier than having to reboot the machine. Restarting Explorer works for me every time.
    • Proposed As Answer by Laurence73 Monday, March 18, 2013 2:51 AM
    • Unproposed As Answer by Laurence73 Monday, March 18, 2013 2:51 AM
    •  
  • Monday, October 29, 2012 5:23 PM
     
     

    You are a hero Mike! ;^)

    I was getting seriously tired of rebooting everytime sharing break - but restarting Windows Explorer seems to clean up sharing.