Link to home
Start Free TrialLog in
Avatar of Ciaran Fogarty
Ciaran FogartyFlag for Ireland

asked on

SharePoint 2013: nativehr0x80070002ativehrnativestackativestack error when documents are uploaded to a document library and workflow does not move to relevant folder

Hi Experts,

I am frequently experiencing an error in my SharePoint 2013 on premise environment when users try to upload a document to a document library. When a user uploads a document, the person is asked to fill out two fields (both are lookups). Afterward, the workflow should send the document to a 'To Be Approved' folder. However, this is not happening for 'some' documents so they get stuck. Not every document is failing to move. A developer created a custom Visual Studio workflow so the solution is deployed as a .WSP to the farm. I do not have access to the source code. The attached .PNG file shows the error that is logged in a custom list called 'Logs' in SharePoint. However, I obtained the ULS logs for that time and I have added that below. The build information is Windows Server 2012 R2 (Build 9600​) with SharePoint 2013 v.15.0.4727.1000​​​​​​. Any help / guidance is much appreciated. Further, how can one see the source code in the .WSP file.

Note: Below, I have changed the user's staff id to 'user id' and I have re-named the .pdf file.

ULS Log:
ttidLogWssCellStgConcise [Url: Incoming Documents/test123.pdf][User: i:0#.w|user id (NonCobaltOriginated)][StreamSizes: Request=0 bytes, Response=0 bytes][TotalRequestTime: 16msec][PartitionID: Default][Request: PutChanges **FFU Pri=0 Result=Success][cbOld=0][cbNew=111464][cLR:0][MD:0=AutoGenerated.OOF.No.NoOtherUsers.FutureOpen.Recently.DocumentIsActive.Content.Wired.None.Normal][cBCQ=0][cbCQ=0][cBRB=0][cbRB=0][cbREB=0][cBHBW=4][cbHBW=113262][cbHBEW=257280][cBHBDel=0][Mngd]
Avatar of Piotr Strycharz
Piotr Strycharz
Flag of Poland image

Please provide more log lines (at least 10, but up to several dozens lines are associated with the single request).

Source code can be easily viewed with IlSpy utility; you should unpack WSP first and look for DLL file from it.
Avatar of Ciaran Fogarty

ASKER

Thanks Piotr for the link to the decompiler.

ULS logs as requested:

Category      Level      Message      Correlation
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      0ea9989e-69f4-60dd-3cd2-37c3bd6ceb92
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      0fa9989e-3918-60dd-b238-b87b259172f7
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      0fa9989e-3919-60dd-b238-b5e50595e626
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      13a9989e-4930-60dd-904a-ee7397e4122f
Personal Site Instantiation      Medium      Call to PersonalSiteInstantiationState::Init for user id with IsUserSelf(): True, IsProfileAdmin: False, resulted in m_bCanUseStorage: True, m_bCanUseMicrobloggingAndFollowing: True, m_bCanPersonalize: True, m_bCanFollowTagsAndUsers: True, [MySiteHost Found?=True CompatLevel=15 Licensed?=True URL=https://site:123] StackTrace:   at Microsoft.Office.Server.UserProfiles.UserProfile.PersonalSiteInstantiationContext.Init(UserProfileManager objManager, UserProfile userProfile, SPSite mySiteHost)     at Microsoft.Office.Server.UserProfiles.UserProfile.PersonalSiteInstantiationContext..ctor(UserProfileManager objManager, UserProfile userProfile)     at Microsoft.Office.Server.UserProfiles.UserProfile.InitPersonalSiteInstantiationContext()     at Microsoft.SharePoint.Portal.WebControls.FeedWebPartBase.SetUpInitialData(Boolean isSiteFeed, String siteId)     at Microsoft.SharePoint.Portal.WebControls.SiteFeedWebPart.OnPreRender(Object sender, EventArgs e)     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)     at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)      13a9989e-4930-60dd-904a-ee7397e4122f
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      13a9989e-797f-60dd-3cd2-39a239b246de
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      13a9989e-d9e8-60dd-904a-e9b0f66e2653
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      14a9989e-79a3-60dd-3cd2-352df5aacbaf
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      14a9989e-e9e5-60dd-3cd2-357e515a92ab
Claims Authentication      Medium      STS Call Claims Windows: Successfully requested sign-in claim identity for user 'user id'.      24e0640e-e044-4ca4-a079-606ea8f61b18
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      16a9989e-e956-60dd-904a-e16b116ba479
Client File Access      Medium      ttidLogWssCellStgConcise [Url: Incoming Documents/test123.pdf][User: i:0#.w|user id (NonCobaltOriginated)][StreamSizes: Request=0 bytes, Response=0 bytes][TotalRequestTime: 0msec][PartitionID: Default][Request: PutChanges **FFU Pri=0 Result=Success][cbOld=0][cbNew=9876][cLR:0][MD:0=AutoGenerated.OOF.No.NoOtherUsers.FutureOpen.Recently.DocumentIsActive.Content.Wired.None.Normal][cBCQ=0][cbCQ=0][cBRB=0][cbRB=0][cbREB=0][cBHBW=1][cbHBW=11093][cbHBEW=64320][cBHBDel=0][Mngd]      16a9989e-e956-60dd-904a-e16b116ba479
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      16a9989e-c989-60dd-3cd2-312bd874ff7d
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      16a9989e-b9df-60dd-3cd2-3b2b66673241
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      16a9989e-f9ff-60dd-3cd2-386abae2e30b
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      17a9989e-b905-60dd-904a-eaa1bb3ce6e5
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      17a9989e-a937-60dd-3cd2-349f36bc8775
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      17a9989e-a937-60dd-3cd2-3f496047a26e
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      17a9989e-29c3-60dd-904a-e440db0272a3
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      18a9989e-296e-60dd-3cd2-3374c57eb98f
Authentication Authorization      Medium      Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284      19a9989e-b950-60dd-3cd2-314401fef7ed
Claims Authentication      Medium      STS Call Claims Windows: Successfully requested sign-in claim identity for user 'user id'.      ae46d655-bcef-43b5-b64f-8cebee03a25e
Still, it seems that you logs do not contain error you spotted (there is no 0x80070002 string in there). In general the 0x80070002 is FILE_NOT_FOUND error. Example (in Powershell):

PS C:\> $site = Get-SPSite http://site
PS C:\> $site.OpenWeb([Guid]::NewGuid())
Exception calling "OpenWeb" with "1" argument(s): "<nativehr>0x80070002</nativehr><nativestack></nativestack>"
At line:1 char:1
+ $site.OpenWeb([Guid]::NewGuid())
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : FileNotFoundException

Open in new window


The error is too general to be able to deduce from it. You need to search more logs.
I also got this from the logs which confirms your point. That ILSpy tool is good but I'm not sure that 100% of the code is there? Anyway, I may have to add code after de-compiling to get it back working as per functional requirement or look at developing an alternative using Nintex (could be budget constraints there). What do you think Piotr?

System.IO.FileNotFoundException: <nativehr>0x80070002</nativehr><nativestack></nativestack>, StackTrace:  
 at Microsoft.SharePoint.SPWeb.GetFileOrFolderProperties(String strUrl, ListDocsFlags listDocsFlags, Boolean throwException, SPBasePermissions& permMask)    
 at Microsoft.SharePoint.SPFile.PropertiesCore(Boolean throwException)    
 at Microsoft.SharePoint.SPFile.get_CheckOutType()    
 at SPSite.IncomingDocumentsER.IncomingDocumentsER.<>c__DisplayClass2.<ItemUpdated>b__0()    
 at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3()    
 at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)    
 at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)    
 at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)    
 at SPSite.IncomingDocumentsER.IncomingDocumentsER.ItemUpdated(SPItemEventProperties properties)    
 at Microsoft.SharePoint.SPEventManager.RunItemEventReceiver(SPItemEventReceiver receiver, SPUserCodeInfo userCodeInfo, SPItemEventProperties properties, SPEventContext context, String receiverData)    
 at Microsoft.SharePoint.SPEventManager.RunItemEventReceiverHelper(Object receiver, SPUserCodeInfo userCodeInfo, Object properties, SPEventContext context, String receiverData)    
 at Microsoft.SharePoint.SPEventManager.<>c__DisplayClassa`1.<InvokeEventReceiver>b__7()    
 at Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param)    
 at Microsoft.SharePoint.SPEventManager.InvokeEventReceiver[ReceiverType](SPUserToken userToken, Guid tranLockerId, RunEventReceiver runEventReceiver, Object receivers, Int32 n, Object properties, SPEventReceiverOperationsType operationsType, Boolean& canceled, String& error)    
 at Microsoft.SharePoint.SPEventManager.InvokeEventReceivers[ReceiverType](SPRemoteEventReceiverCallType remoteCallType, SPUserToken userToken, Guid tranLockerId, RunEventReceiver runEventReceiver, RunRemoteEventReceiver runRemoteEventReceiver, Object receivers, Object properties, Boolean checkCancel, SPEventReceiverOperationsType operationsType)    
 at Microsoft.SharePoint.SPEventManager.InvokeEventReceivers[ReceiverType](SPRemoteEventReceiverCallType remoteCallType, Byte[] userTokenBytes, Guid tranLockerId, RunEventReceiver runEventReceiver, RunRemoteEventReceiver runRemoteEventReceiver, Object receivers, Object properties, Boolean checkCancel, SPEventReceiverOperationsType operationsType)    
 at Microsoft.SharePoint.SPEventManager.HandleEventCallback[ReceiverType,PropertiesType](Object callbackData)    
 at Microsoft.SharePoint.Utilities.SPThreadPool.WaitCallbackWrapper(Object state)    
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)    
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)    
 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()    
 at System.Threading.ThreadPoolWorkQueue.Dispatch()
ASKER CERTIFIED SOLUTION
Avatar of Piotr Strycharz
Piotr Strycharz
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Piotr, thanks for your helpful reply. Unfortunately, I cannot share the code. As far as I am aware, version history was not considered because it is just a 'drop-off' library. The document is moved immediately after the two SharePoint metadata columns are filled in.  However, you have given me direction and I can now plan the next steps. I am grateful for your assistance. Agree, code must be corrected. SP Designer and library approvals are viable alternatives. I'm happy to mark your latest reply as a recommended solution.