# New Error When Opening MES **Category:** [Epicor ERP 10](https://www.epiusers.help/c/e10/5) **Created:** 2017-02-10 20:34 UTC **Views:** 5667 **Replies:** 17 **URL:** https://www.epiusers.help/t/new-error-when-opening-mes/37246 --- ## Post #1 by @Chris_Conn Here's a new one for me when opening MES. It happened twice in a row, then twice it didn't occur, then it happened again. Any thoughts?: ```cs Application Error Exception caught in: System.ServiceModel Error Detail ============ Message: This OperationContextScope is being disposed out of order. Program: System.ServiceModel.dll Method: PopContext Client Stack Trace ================== at System.ServiceModel.OperationContextScope.PopContext() at Epicor.ServiceModel.Channels.ImplBase`1.HandleContractFinally(String methodName, String returnTypeStr) at Ice.Proxy.BO.GenXDataImpl.GetList(String whereClause, Int32 pageSize, Int32 absolutePage, Boolean& morePages) at Ice.Lib.Framework.GenXObject.GetList(SearchOptions opts, Boolean& MorePages ``` Followed by: ```cs Application Error Exception caught in: Ice.Lib.EpiClientLib Error Detail ============ Message: Object reference not set to an instance of an object. Program: Ice.Lib.EpiClientLib.dll Method: customLayersUpToDate Client Stack Trace ================== at Ice.Lib.Customization.CustomLayeringManager.customLayersUpToDate(DataSet dsCLI, Boolean overrideCheck) ``` Followed by: ```cs Application Error Exception caught in: System.Data Error Detail ============ Message: Cannot find table 0. Program: System.Data.dll Method: get_Item Client Stack Trace ================== at System.Data.DataTableCollection.get_Item(Int32 index) at Ice.Lib.Framework.GenXObject.GetLayerVersionsDataSet(String uiNameKey, String userID) at Ice.Lib.Framework.FormFunctions.GetGenXLayerVersionsByKeys(Object sender, String fromNameKey, String userID) ``` then upon closing: ```cs Application Error Exception caught in: Ice.Lib.EpiClientLib Error Detail ============ Message: Object reference not set to an instance of an object. Program: Ice.Lib.EpiClientLib.dll Method: preCheckForLayers Client Stack Trace ================== at Ice.Lib.Customization.CustomLayeringManager.preCheckForLayers(DataTable dtVersions) at Ice.Lib.Customization.CustomLayeringManager.customLayersUpToDate(DataSet dsCLI, Boolean overrideCheck) ``` and: ```cs Application Error Exception caught in: Ice.Lib.EpiClientLib Error Detail ============ Message: Invalid request -- object Sender must be Core.Session or implement ILaunch Program: Ice.Lib.EpiClientLib.dll Method: GetSessionFromSender Client Stack Trace ================== at Ice.Lib.Framework.FormFunctions.GetSessionFromSender(Object sender) at Ice.Lib.Framework.FormFunctions.ReadDataSet(Object Sender, DataSet ds, String FileName, String Type, XmlReadMode mode, String& FilePath) at Ice.Lib.Customization.CustomLayeringManager.LoadCustomizationPersonalization(String custLayerInfoName, String custFileName ``` and: ```cs Application Error Exception caught in: Ice.Lib.EpiClientLib Error Detail ============ Message: Object reference not set to an instance of an object. Program: Ice.Lib.EpiClientLib.dll Method: getCompositeCustomizeDataSet Client Stack Trace ================== at Ice.Lib.Framework.EpiUIUtils.getCompositeCustomizeDataSet(String formNameKey, Boolean& customize, Boolean& respin, Boolean& cancel) ``` ```cs Application Error Exception caught in: Ice.Lib.EpiClientLib Error Detail ============ Message: Object reference not set to an instance of an object. Program: Ice.Lib.EpiClientLib.dll Method: Execute Client Stack Trace ================== at Ice.Lib.Framework.EpiUIUtils.Execute(DataSet ``` ```cs Application Error Exception caught in: Ice.Lib.EpiClientLib Error Detail ============ Message: Object reference not set to an instance of an object. Program: Ice.Lib.EpiClientLib.dll Method: BindNConfigureControls Client Stack Trace ================== at Ice.Lib.Framework.EpiUIUtils.BindNConfigureControls() at Ice.Lib.Framework.EpiUIUtils.Execute(DataSet dsMenuItem, Boolean& respin) ``` --- ## Post #2 by @josecgomez Is this a customized screen? (Does it happen on base?) --- ## Post #3 by @Chris_Conn Not sure yet. If I open with MESC and choose either base or custom it does NOT occur. If I open just MES it does (or can) occur. I have made a customization to the base MES form but I don't think I've quite figure out how to default it yet so I assume it is just the base. --- ## Post #4 by @josecgomez It could just be bad cache.... clear your cache --- ## Post #5 by @Chris_Conn Of course I cant get the issue to happen now for the life of me. How do I clear the Epicor cache? :bow: Does this apply? Just delete c:\programdata\epicor? https://epiusers.help/t/clearing-the-client-cache-on-mes/31877 --- ## Post #6 by @josecgomez That or open Epicor (Regular Menu) and go to Actions (or is it options? tools? something...) -> Clear Cache --- ## Post #7 by @Chris_Conn @josecgomez It's base form, cache clearing both manual and via menu didn't help! Argghh!! Big dog and pony show in front of CEO Tuesday! @aidacra @Bart_Elia Where is the grovel emoji :clap: --- ## Post #8 by @josecgomez Is it happening in other computers? I've never seen that before... What are you groveling? --- ## Post #9 by @Chris_Conn Grovelling for some help :blush: It is also happening on another PC. Too bad I cant reset my own app pool.... --- ## Post #10 by @josecgomez man you need to get some power... your co-workers over there are like gollum --- ## Post #11 by @Chris_Conn My boss will get a kick out of that meme - wonder how the CEO will take it? :skull_crossbones: For what it's worth - I have a strange sense that this has something to do with the System Report Monitor. --- ## Post #12 by @gpayne Have you tried clearing the entire programdata directory. I have a batch file for users that they will run it kills all old dlls that may interfere with a new change. It is rd /S /Q c:\ProgramData\Epicor --- ## Post #13 by @Chris_Conn Greg, Thanks for the advice. I did try wiping that whole dir with no effect. The problem has (at least temporarily) stopped. I am not sure if the reset the app pool or if something else has changed. --- ## Post #14 by @Chris_Conn Resetting the app pool also did not solve the issue. :( --- ## Post #15 by @Jos_Greeve Hi Chris, i had an issue similar to this one, in my case it had to do with the shift select, i had an issue where my shift was from 0.00 till 24.00 when selecting this shift, the issue did occur, adjusting the shift to 0.01 till 23.59 did solve this issue. regards, Jos --- ## Post #16 by @Chris_Conn If I get the pop up messages at login that say: Downloading from Database then: Caching layouts I get NO errors. The errors occur when I don't see those messages --- ## Post #17 by @Machzy Hey Chris, did you ever get this resolved? --- ## Post #18 by @Chris_Conn Hi Mach, sorry, I dont recall what we ever determined the issue to be (in reality, I dont think we discovered the cause, and the problem just went away at some point) --- **Canonical:** https://www.epiusers.help/t/new-error-when-opening-mes/37246 **Original content:** https://www.epiusers.help/t/new-error-when-opening-mes/37246