Ciaran Fogarty
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][Use r: i:0#.w|user id (NonCobaltOriginated)][Str eamSizes: Request=0 bytes, Response=0 bytes][TotalRequestTime: 16msec][PartitionID: Default][Request: PutChanges **FFU Pri=0 Result=Success][cbOld=0][c bNew=11146 4][cLR:0][ MD:0=AutoG enerated.O OF.No.NoOt herUsers.F utureOpen. Recently.D ocumentIsA ctive.Cont ent.Wired. None.Norma l][cBCQ=0] [cbCQ=0][c BRB=0][cbR B=0][cbREB =0][cBHBW= 4][cbHBW=1 13262][cbH BEW=257280 ][cBHBDel= 0][Mngd]
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][Use
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-37 c3bd6ceb92
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 0fa9989e-3918-60dd-b238-b8 7b259172f7
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 0fa9989e-3919-60dd-b238-b5 e50595e626
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 13a9989e-4930-60dd-904a-ee 7397e4122f
Personal Site Instantiation Medium Call to PersonalSiteInstantiationS tate::Init for user id with IsUserSelf(): True, IsProfileAdmin: False, resulted in m_bCanUseStorage: True, m_bCanUseMicrobloggingAndF ollowing: True, m_bCanPersonalize: True, m_bCanFollowTagsAndUsers: True, [MySiteHost Found?=True CompatLevel=15 Licensed?=True URL=https://site:123] StackTrace: at Microsoft.Office.Server.Us erProfiles .UserProfi le.Persona lSiteInsta ntiationCo ntext.Init (UserProfi leManager objManager, UserProfile userProfile, SPSite mySiteHost) at Microsoft.Office.Server.Us erProfiles .UserProfi le.Persona lSiteInsta ntiationCo ntext..cto r(UserProf ileManager objManager, UserProfile userProfile) at Microsoft.Office.Server.Us erProfiles .UserProfi le.InitPer sonalSiteI nstantiati onContext( ) at Microsoft.SharePoint.Porta l.WebContr ols.FeedWe bPartBase. SetUpIniti alData(Boo lean isSiteFeed, String siteId) at Microsoft.SharePoint.Porta l.WebContr ols.SiteFe edWebPart. OnPreRende r(Object sender, EventArgs e) at System.Web.UI.Control.PreR enderRecur siveIntern al() at System.Web.UI.Control.PreR enderRecur siveIntern al() at System.Web.UI.Control.PreR enderRecur siveIntern al() at System.Web.UI.Control.PreR enderRecur siveIntern al() at System.Web.UI.Control.PreR enderRecur siveIntern al() at System.Web.UI.Control.PreR enderRecur siveIntern al() at System.Web.UI.Control.PreR enderRecur siveIntern al() at System.Web.UI.Page.Process RequestMai n(Boolean includeStagesBeforeAsyncPo int, Boolean includeStagesAfterAsyncPoi nt) at System.Web.UI.Page.Process Request(Bo olean includeStagesBeforeAsyncPo int, Boolean includeStagesAfterAsyncPoi nt) at System.Web.UI.Page.Process Request() at System.Web.UI.Page.Process Request(Ht tpContext context) at System.Web.HttpApplication .CallHandl erExecutio nStep.Syst em.Web.Htt pApplicati on.IExecut ionStep.Ex ecute() at System.Web.HttpApplication .ExecuteSt ep(IExecut ionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication .PipelineS tepManager .ResumeSte ps(Excepti on error) at System.Web.HttpApplication .BeginProc essRequest Notificati on(HttpCon text context, AsyncCallback cb) at System.Web.HttpRuntime.Pro cessReques tNotificat ionPrivate (IIS7Worke rRequest wr, HttpContext context) at System.Web.Hosting.Pipelin eRuntime.P rocessRequ estNotific ationHelpe r(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.Pipelin eRuntime.P rocessRequ estNotific ation(IntP tr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.UnsafeI ISMethods. MgdIndicat eCompletio n(IntPtr pHandler, RequestNotificationStatus& notificationStatus) at System.Web.Hosting.UnsafeI ISMethods. MgdIndicat eCompletio n(IntPtr pHandler, RequestNotificationStatus& notificationStatus) at System.Web.Hosting.Pipelin eRuntime.P rocessRequ estNotific ationHelpe r(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) at System.Web.Hosting.Pipelin eRuntime.P rocessRequ estNotific ation(IntP tr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) 13a9989e-4930-60dd-904a-ee 7397e4122f
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 13a9989e-797f-60dd-3cd2-39 a239b246de
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 13a9989e-d9e8-60dd-904a-e9 b0f66e2653
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 14a9989e-79a3-60dd-3cd2-35 2df5aacbaf
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 14a9989e-e9e5-60dd-3cd2-35 7e515a92ab
Claims Authentication Medium STS Call Claims Windows: Successfully requested sign-in claim identity for user 'user id'. 24e0640e-e044-4ca4-a079-60 6ea8f61b18
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 16a9989e-e956-60dd-904a-e1 6b116ba479
Client File Access Medium ttidLogWssCellStgConcise [Url: Incoming Documents/test123.pdf][Use r: i:0#.w|user id (NonCobaltOriginated)][Str eamSizes: Request=0 bytes, Response=0 bytes][TotalRequestTime: 0msec][PartitionID: Default][Request: PutChanges **FFU Pri=0 Result=Success][cbOld=0][c bNew=9876] [cLR:0][MD :0=AutoGen erated.OOF .No.NoOthe rUsers.Fut ureOpen.Re cently.Doc umentIsAct ive.Conten t.Wired.No ne.Normal] [cBCQ=0][c bCQ=0][cBR B=0][cbRB= 0][cbREB=0 ][cBHBW=1] [cbHBW=110 93][cbHBEW =64320][cB HBDel=0][M ngd] 16a9989e-e956-60dd-904a-e1 6b116ba479
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 16a9989e-c989-60dd-3cd2-31 2bd874ff7d
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 16a9989e-b9df-60dd-3cd2-3b 2b66673241
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 16a9989e-f9ff-60dd-3cd2-38 6abae2e30b
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 17a9989e-b905-60dd-904a-ea a1bb3ce6e5
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 17a9989e-a937-60dd-3cd2-34 9f36bc8775
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 17a9989e-a937-60dd-3cd2-3f 496047a26e
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 17a9989e-29c3-60dd-904a-e4 40db0272a3
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 18a9989e-296e-60dd-3cd2-33 74c57eb98f
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user id, ClaimsCount=284 19a9989e-b950-60dd-3cd2-31 4401fef7ed
Claims Authentication Medium STS Call Claims Windows: Successfully requested sign-in claim identity for user 'user id'. ae46d655-bcef-43b5-b64f-8c ebee03a25e
ULS logs as requested:
Category Level Message Correlation
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Personal Site Instantiation Medium Call to PersonalSiteInstantiationS
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Claims Authentication Medium STS Call Claims Windows: Successfully requested sign-in claim identity for user 'user id'. 24e0640e-e044-4ca4-a079-60
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Client File Access Medium ttidLogWssCellStgConcise [Url: Incoming Documents/test123.pdf][Use
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Authentication Authorization Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user
Claims Authentication Medium STS Call Claims Windows: Successfully requested sign-in claim identity for user 'user id'. ae46d655-bcef-43b5-b64f-8c
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):
The error is too general to be able to deduce from it. You need to search more logs.
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
The error is too general to be able to deduce from it. You need to search more logs.
ASKER
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.FileNotFoundExce ption: <nativehr>0x80070002</nati vehr><nati vestack></ nativestac k>, StackTrace:
at Microsoft.SharePoint.SPWeb .GetFileOr FolderProp erties(Str ing strUrl, ListDocsFlags listDocsFlags, Boolean throwException, SPBasePermissions& permMask)
at Microsoft.SharePoint.SPFil e.Properti esCore(Boo lean throwException)
at Microsoft.SharePoint.SPFil e.get_Chec kOutType()
at SPSite.IncomingDocumentsER .IncomingD ocumentsER .<>c__Disp layClass2. <ItemUpdat ed>b__0()
at Microsoft.SharePoint.SPSec urity.<>c_ _DisplayCl ass5.<RunW ithElevate dPrivilege s>b__3()
at Microsoft.SharePoint.Utili ties.Secur ityContext .RunAsProc ess(CodeTo RunElevate d secureCode)
at Microsoft.SharePoint.SPSec urity.RunW ithElevate dPrivilege s(WaitCall back secureCode, Object param)
at Microsoft.SharePoint.SPSec urity.RunW ithElevate dPrivilege s(CodeToRu nElevated secureCode)
at SPSite.IncomingDocumentsER .IncomingD ocumentsER .ItemUpdat ed(SPItemE ventProper ties properties)
at Microsoft.SharePoint.SPEve ntManager. RunItemEve ntReceiver (SPItemEve ntReceiver receiver, SPUserCodeInfo userCodeInfo, SPItemEventProperties properties, SPEventContext context, String receiverData)
at Microsoft.SharePoint.SPEve ntManager. RunItemEve ntReceiver Helper(Obj ect receiver, SPUserCodeInfo userCodeInfo, Object properties, SPEventContext context, String receiverData)
at Microsoft.SharePoint.SPEve ntManager. <>c__Displ ayClassa`1 .<InvokeEv entReceive r>b__7()
at Microsoft.SharePoint.SPSec urity.RunA sUser(SPUs erToken userToken, Boolean bResetContext, WaitCallback code, Object param)
at Microsoft.SharePoint.SPEve ntManager. InvokeEven tReceiver[ ReceiverTy pe](SPUser Token userToken, Guid tranLockerId, RunEventReceiver runEventReceiver, Object receivers, Int32 n, Object properties, SPEventReceiverOperationsT ype operationsType, Boolean& canceled, String& error)
at Microsoft.SharePoint.SPEve ntManager. InvokeEven tReceivers [ReceiverT ype](SPRem oteEventRe ceiverCall Type remoteCallType, SPUserToken userToken, Guid tranLockerId, RunEventReceiver runEventReceiver, RunRemoteEventReceiver runRemoteEventReceiver, Object receivers, Object properties, Boolean checkCancel, SPEventReceiverOperationsT ype operationsType)
at Microsoft.SharePoint.SPEve ntManager. InvokeEven tReceivers [ReceiverT ype](SPRem oteEventRe ceiverCall Type remoteCallType, Byte[] userTokenBytes, Guid tranLockerId, RunEventReceiver runEventReceiver, RunRemoteEventReceiver runRemoteEventReceiver, Object receivers, Object properties, Boolean checkCancel, SPEventReceiverOperationsT ype operationsType)
at Microsoft.SharePoint.SPEve ntManager. HandleEven tCallback[ ReceiverTy pe,Propert iesType](O bject callbackData)
at Microsoft.SharePoint.Utili ties.SPThr eadPool.Wa itCallback Wrapper(Ob ject state)
at System.Threading.Execution Context.Ru nInternal( ExecutionC ontext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Execution Context.Ru n(Executio nContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUser WorkItemCa llback.Sys tem.Thread ing.IThrea dPoolWorkI tem.Execut eWorkItem( )
at System.Threading.ThreadPoo lWorkQueue .Dispatch( )
System.IO.FileNotFoundExce
at Microsoft.SharePoint.SPWeb
at Microsoft.SharePoint.SPFil
at Microsoft.SharePoint.SPFil
at SPSite.IncomingDocumentsER
at Microsoft.SharePoint.SPSec
at Microsoft.SharePoint.Utili
at Microsoft.SharePoint.SPSec
at Microsoft.SharePoint.SPSec
at SPSite.IncomingDocumentsER
at Microsoft.SharePoint.SPEve
at Microsoft.SharePoint.SPEve
at Microsoft.SharePoint.SPEve
at Microsoft.SharePoint.SPSec
at Microsoft.SharePoint.SPEve
at Microsoft.SharePoint.SPEve
at Microsoft.SharePoint.SPEve
at Microsoft.SharePoint.SPEve
at Microsoft.SharePoint.Utili
at System.Threading.Execution
at System.Threading.Execution
at System.Threading.QueueUser
at System.Threading.ThreadPoo
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
Source code can be easily viewed with IlSpy utility; you should unpack WSP first and look for DLL file from it.