VAF Error - Permission denied: 'extension.NewEnvironment'

I'm having an unusual new error with a VAF workflow extension. When I try to access the configuration status in M-Files admin I receive the following error:

Error: Permission denied: 'extension.NewEnvironment'
   at MFilesErrorHelper.GetAsyncRejectionError (/lib/mfiles/MFilesErrorHelper.js:24:17)
   at Anonymous function (/lib/mfiles/helpers/VaultExtensionMethodCaller.js:85:21)
AsyncCaller.cpp, 362, Permission denied: 'extension.NewEnvironment' (0x80040008)
CoVaultExtensionMethodOperations.cpp, 152, Permission denied: 'extension.NewEnvironment' (0x80040008)
LatestRPC.generated.cpp, 49141, Permission denied: 'extension.NewEnvironment' (0x80040008)
IRPCVaultExtensionMethods.generated.cpp, 482, Permission denied: 'extension.NewEnvironment' (0x80040008)
gRPCClient.cpp, 497, Permission denied: 'extension.NewEnvironment' (0x80040008)
gRPCClient.cpp, 466, Permission denied: 'extension.NewEnvironment' (0x80040008)
gRPCClient.cpp, 99, Permission denied: 'extension.NewEnvironment' (0x80040008)
gRPC.generated.cpp, 33066, Permission denied: 'extension.NewEnvironment' (0x80040008)
RPCVaultExtensionMethods.cpp, 231, Permission denied: 'extension.NewEnvironment' (0x80040008)
RPCVaultExtensionMethods.cpp, 797, Permission denied: 'extension.NewEnvironment' (0x80040008)
RPCVaultExtensionMethods.cpp, 942, Permission denied: 'extension.NewEnvironment' (0x80040008)
MCallInLoop.h, 535, Permission denied: 'extension.NewEnvironment' (0x80040008)
RPCVaultExtensionMethods.cpp, 905, Permission denied: 'extension.NewEnvironment' (0x80040008)
VaultDBSessionEvents.cpp, 1014, Permission denied: 'extension.NewEnvironment' (0x80040008)
VaultScriptSessionTemplates.cpp, 470, Permission denied: 'extension.NewEnvironment' (0x80040008)
VaultScriptSessionTemplates.cpp, 445, Permission denied: 'extension.NewEnvironment' (0x80040008)
VaultScriptSessionTemplates.cpp, 627, Permission denied: 'extension.NewEnvironment' (0x80040008)
CoActiveScriptSite.cpp, 907, Permission denied: 'extension.NewEnvironment' (0x80040008)
CoActiveScriptSite.cpp, 745, Permission denied: 'extension.NewEnvironment' (0x80040008)
VaultExtensionMethod::DocumentWorkflow.MFEventHandlerVaultExtensionMethod, 17, Permission denied: 'extension.NewEnvironment' (0x80040008)
MErrorHelper.cpp, 2347, Permission denied: 'extension.NewEnvironment' (0x80040008)
(M-Files 24.12.14341.6 2025-01-13T02:46:29.674Z)

I get a similar error when attempting to transition to a new workflow state:

<MetadataEditor>, -, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
ScriptErrorHelper.cpp, 96, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
MDispatchExImpl.h, 679, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
MDispatchExImpl.h, 841, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
MetadataCardAction.cpp, 386, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
MetadataCardAction.cpp, 560, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
MetadataEditor.cpp, 2972, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
MetadataModel.cpp, 4540, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
MetadataModel.cpp, 4991, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
ElectronicSignatureUIHelper.cpp, 239, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
MetadataModel.cpp, 12770, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
CoVaultMountingDocumentOperations.cpp, 3333, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
CoVaultMountingDocumentOperations.cpp, 3421, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
DocumentCache.cpp, 11966, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
DocumentCache.cpp, 12077, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
DocumentCache.cpp, 20514, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
IRPCObjectOperations.generated.cpp, 18362, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
gRPCClient.cpp, 497, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
gRPCClient.cpp, 466, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
gRPCClient.cpp, 99, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
gRPC.generated.cpp, 19710, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
RPCDocumentOperations.cpp, 7277, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
MCallInLoop.h, 535, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 4572, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 4062, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 9734, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 10476, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
RPCDocumentOperationsHelper.cpp, 26207, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
RPCDocumentOperationsHelperPrivate.cpp, 2985, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
RPCDocumentOperationsHelperPrivate.cpp, 3202, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
RPCDocumentOperationsHelperPrivate.cpp, 3631, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
RPCDocumentOperationsHelperPrivate.cpp, 4518, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
VaultScriptSessionTemplates.cpp, 280, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
VaultScriptSessionTemplates.cpp, 381, Script execution failed. ((Roll Back, StateAction: 32970-52)) (0x800408BB)
VaultScriptSessionTemplates.cpp, 381, Permission denied: 'extension.NewEnvironment' (0x80040008)
VaultScriptSessionTemplates.cpp, 627, Permission denied: 'extension.NewEnvironment' (0x80040008)
CoActiveScriptSite.cpp, 907, Permission denied: 'extension.NewEnvironment' (0x80040008)
CoActiveScriptSite.cpp, 745, Permission denied: 'extension.NewEnvironment' (0x80040008)
Roll Back, StateAction, 19, Permission denied: 'extension.NewEnvironment' (0x80040008)
MErrorHelper.cpp, 2347, Permission denied: 'extension.NewEnvironment' (0x80040008)
(M-Files 24.12.14341.6 2025-01-13T02:19:58.499Z)

I've tried taking the vault offline and back online, and uninstalling and reinstalling the extension

Any assistance would be greatly appreciated!

Parents
  • When trying to get to the "configurations" / "other applications" portion of M-Files I sometimes receive the error below as well associated with this same extension:

    Error: The remote server machine does not exist or is unavailable: 'extension.NewEnvironment'
       at MFilesErrorHelper.GetAsyncRejectionError (/lib/mfiles/MFilesErrorHelper.js:24:17)
       at Anonymous function (/lib/mfiles/helpers/VaultExtensionMethodCaller.js:85:21)
    AsyncCaller.cpp, 362, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    CoVaultExtensionMethodOperations.cpp, 152, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    LatestRPC.generated.cpp, 49141, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    IRPCVaultExtensionMethods.generated.cpp, 482, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    gRPCClient.cpp, 497, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    gRPCClient.cpp, 466, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    gRPCClient.cpp, 99, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    gRPC.generated.cpp, 33066, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    RPCVaultExtensionMethods.cpp, 231, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    RPCVaultExtensionMethods.cpp, 797, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    RPCVaultExtensionMethods.cpp, 942, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    MCallInLoop.h, 535, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    RPCVaultExtensionMethods.cpp, 905, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    VaultDBSessionEvents.cpp, 1014, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    VaultScriptSessionTemplates.cpp, 470, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    VaultScriptSessionTemplates.cpp, 445, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    VaultScriptSessionTemplates.cpp, 627, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    CoActiveScriptSite.cpp, 907, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    CoActiveScriptSite.cpp, 745, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    VaultExtensionMethod::DocumentWorkflow.MFEventHandlerVaultExtensionMethod, 17, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    MErrorHelper.cpp, 2347, The remote server machine does not exist or is unavailable: 'extension.NewEnvironment' (0x80040008)
    (M-Files 24.12.14341.6 2025-01-13T03:40:28.372Z)

    This error is confusing as it references a "Remote server machine", but extension.newenvironment is something that is a part of the event handlers enabling the extensions - it isn't a part of my code or anything to do with a remote machine.

  • Can also update to confirm that this error persists through uninstalling extension, rebooting M-Files machine (not just restarting vault) and reinstalling the VAF application. I've also ensured that I'm running the latest versions of everything:

    • MFiles.VAF 24.10.720.2
    • MFiles.VAF.Extensions 24.12.75
    • targeting .NET 4.7.2

    I did notice that when uninstalling the application it did not remove the event handler automatically, so I also tried manually uninstalling the event handler and then reinstalling the application.

    I did however manage to chase down an error in the event log (wasn't expecting to find one here!):

    Projects {E4856625-062C-439C-880A-495174BB8A4C}
    DocumentWorkflow 0.3 (Process ID: 3740)
    ----
    StartOperations() failed. Killing the process to prevent multiple calls.
    
    System.ArgumentException: No processors defined.
       at MFiles.VAF.AppTasks.TaskQueueProcessor..ctor(TaskManager manager, String queueId, IEnumerable`1 processors, MFTaskQueueProcessingBehavior behavior, TaskQueueSettings settings, Nullable`1 maxLockWaitTime)
       at MFiles.VAF.AppTasks.TaskManager.RegisterQueue(String queueId, IEnumerable`1 processors, MFTaskQueueProcessingBehavior behavior, TaskQueueSettings settings)
       at MFiles.VAF.AppTasks.TaskQueueResolver.RegisterQueue(TaskManager taskManager, QueueDefinition queue)
       at MFiles.VAF.AppTasks.TaskQueueResolver.RegisterAll(TaskManager taskManager)
       at MFiles.VAF.VaultApplicationBase.InitializeTaskManager()
       at MFiles.VAF.Extensions.ConfigurableVaultApplicationBase`1.InitializeTaskManager()
       at MFiles.VAF.VaultApplicationBase.StartOperations(Vault vaultPersistent)

    I had some lines implementing a task queue, as follows:

            [TaskQueue(Behavior = MFTaskQueueProcessingBehavior.MFProcessingBehaviorSequential)]
            public const string QueueId = "DocumentWorkflow.VaultApplication";
            public const string UploadTaskType = "UploadTaskType";

    When I removed those lines and recompiled everything started working again without a problem. I wasn't actually using the Task Queue yet - I just had it in there as I intended to add queue steps to subsequent processes. It seems like maybe having a task queue defined without having any task processors defined caused this error?

Reply
  • Can also update to confirm that this error persists through uninstalling extension, rebooting M-Files machine (not just restarting vault) and reinstalling the VAF application. I've also ensured that I'm running the latest versions of everything:

    • MFiles.VAF 24.10.720.2
    • MFiles.VAF.Extensions 24.12.75
    • targeting .NET 4.7.2

    I did notice that when uninstalling the application it did not remove the event handler automatically, so I also tried manually uninstalling the event handler and then reinstalling the application.

    I did however manage to chase down an error in the event log (wasn't expecting to find one here!):

    Projects {E4856625-062C-439C-880A-495174BB8A4C}
    DocumentWorkflow 0.3 (Process ID: 3740)
    ----
    StartOperations() failed. Killing the process to prevent multiple calls.
    
    System.ArgumentException: No processors defined.
       at MFiles.VAF.AppTasks.TaskQueueProcessor..ctor(TaskManager manager, String queueId, IEnumerable`1 processors, MFTaskQueueProcessingBehavior behavior, TaskQueueSettings settings, Nullable`1 maxLockWaitTime)
       at MFiles.VAF.AppTasks.TaskManager.RegisterQueue(String queueId, IEnumerable`1 processors, MFTaskQueueProcessingBehavior behavior, TaskQueueSettings settings)
       at MFiles.VAF.AppTasks.TaskQueueResolver.RegisterQueue(TaskManager taskManager, QueueDefinition queue)
       at MFiles.VAF.AppTasks.TaskQueueResolver.RegisterAll(TaskManager taskManager)
       at MFiles.VAF.VaultApplicationBase.InitializeTaskManager()
       at MFiles.VAF.Extensions.ConfigurableVaultApplicationBase`1.InitializeTaskManager()
       at MFiles.VAF.VaultApplicationBase.StartOperations(Vault vaultPersistent)

    I had some lines implementing a task queue, as follows:

            [TaskQueue(Behavior = MFTaskQueueProcessingBehavior.MFProcessingBehaviorSequential)]
            public const string QueueId = "DocumentWorkflow.VaultApplication";
            public const string UploadTaskType = "UploadTaskType";

    When I removed those lines and recompiled everything started working again without a problem. I wasn't actually using the Task Queue yet - I just had it in there as I intended to add queue steps to subsequent processes. It seems like maybe having a task queue defined without having any task processors defined caused this error?

Children
No Data