Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
During a WCF call the user puts the device into Airplane Mode or loses data connection.
When connection is restored the call is attempted again and an InvalidOperationException occurs saying that another operation is in progress. This continues until the app is restarted.
Xcode 5.1.1 (5085)
ERROR: PrintReport exception: another operation is in progress
2014-08-18 13:45:51.393 XactimateiOS[12170:15d1b] ERROR: at System.ServiceModel.MonoInternal.ClientRuntimeChannel.BeginProcess (System.Reflection.MethodBase method, System.String operationName, System.Object parameters, System.AsyncCallback callback, System.Object asyncState) [0x00021] in /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs:452
at System.ServiceModel.ClientBase`1+ChannelBase`1[IMobileWebServiceV2,IMobileWebServiceV2].BeginInvoke (System.String methodName, System.Object args, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0
at MobileWebServiceV2Client+MobileWebServiceV2ClientChannel.BeginPrintReport (System.String auth, System.String deviceId, System.String xid, System.String projectCode, System.String profileCode, System.String xnAddr, Online.Server.Busi.Report report, System.String culture, Int32 instanceId, System.AsyncCallback callback, System.Object asyncState) [0x00043] in /Users/i50415/Code/xactimate.mobile/MobileShared/MobileWebServiceV2.cs:5604
at MobileWebServiceV2Client.IMobileWebServiceV2.BeginPrintReport (System.String auth, System.String deviceId, System.String xid, System.String projectCode, System.String profileCode, System.String xnAddr, Online.Server.Busi.Report report, System.String culture, Int32 instanceId, System.AsyncCallback callback, System.Object asyncState) [0x0001a] in /Users/i50415/Code/xactimate.mobile/MobileShared/MobileWebServiceV2.cs:3352
at MobileShared.XactCloud+<PrintReportAsync>c__AnonStorey1C.<>m__0 (System.String token, System.AsyncCallback callback) [0x00058] in /Users/i50415/Code/xactimate.mobile/MobileShared/XactCloud.cs:1297
at MobileShared.XactCloud+<RunAsyncPattern>c__AnonStorey26.<>m__1 (Boolean success, System.String token) [0x00015] in /Users/i50415/Code/xactimate.mobile/MobileShared/XactCloud.cs:1877
at MobileShared.XactCloud.GetAuthTokenAsync (System.Action`2 onComplete) [0x00052] in /Users/i50415/Code/xactimate.mobile/MobileShared/XactCloud.cs:463
at MobileShared.XactCloud.RunAsyncPattern (System.String methodName, Boolean getAuthToken, System.Action`2 beginner, System.AsyncCallback ender, System.Action`1 onComplete, Boolean checkIfLoggedIn, MobileShared.ExtrasHolder stateData, Boolean checkConnection, Int32 timeOutSecounds) [0x00107] in /Users/i50415/Code/xactimate.mobile/MobileShared/XactCloud.cs:1873
2014-08-18 13:45:51.394 XactimateiOS[12170:15d1b] ERROR: Printing the report failed, Please try again later.
This has also been tried with the current beta channel at time of writing.
What happens when you put the device into aircraft mode? Do you wait until you get the timeout exception or try to abort it somehow?
I tried this with a simple WCF service which does a Thread.Sleep(5000) and tried to put the device into aircraft mode during that period, but all that happens is that I get a TimeoutException after the normal timeout period. When I try to run it again while in aircraft mode, I get an "Endpoint not found" error. Putting it back online and trying to rerun works just fine.
Some additional notes. We use the Begin/End method for invoking the WCF service from the proxy stub. Not the Async calls.
Currently every call to WCF uses the same binding and endpoint instance. I have tried using new instances after network is restored with little to no change in the results.
Did the test with the simple service involve having the server perform Cookie based authentication? I'm still fairly convinced the addition of the cookie header is what caused the manifestation of the issue. I'm working with the services team here to see about a version with the cookie to try and go back to verify this.
Fixed; mono/master 37d2e36.
We need to "finally" protect the "EndInvoke" call in ClientRuntimeChannel.EndProcess() because it may throw an exception, which would otherwise prevent the 'context' from being reset.
According to comment #8 this has been fixed a long time ago.