File Sources not creating file and no error logged. How to troubleshoot?

We have a document creation platform that outputs to a shared location. M-Files previously has been able to pull in files and when it cannot, it generates an error in the Event Viewer. However in the last week, it seems to no longer pull in files from the File Source.

I can see when I watch the status of the import it gets to "Creating Documents" which is indicative that it recognizes it has files to import, and then ends. No files are created and the originals remain despite being set to delete upon creation (expected). We import a PDF paired with an XML file. I have cleaned out the folder and only put in a single PDF/XML pair to test, but it still fails to import with no error logged.

Also, there is no duplicate files in the vault as I have searched with an account with full vault access. 

Is there anywhere else I can go to turn on additional logging so I can troubleshoot this error?

  • Can't help you with logging, but I have seen similar behavior if documents move straight into a workflow in M-Files with automatic transition to states with actions or conditions that cannot be performed due to missing properties and such. Even when the error happens a couple of steps down the workflow it blocks the process all the way back to the import function because objects do not get checked in in workflow states where automatic transition happens immediately. If you have that type of workflow it helps to place a brief pause in the first transition after the import state. This way your documents get imported and remain in that first state if it cannot move on to one of the following states for some reason.

  • Hi bright-ideas.dk, how do you get a brief pause? If you use a workflow transition then it's one day at the least

  • I did manage to get it working again. Just a reboot of the server. Since we are in the process of a mass migration, a reboot might have done it some good after our first round of imports.

  • It is possible to place a script in the transition trigger checking the Last Modified timestamp against current time. If the difference is more than X minutes, then allow state transition.

    In a default configuration the server will check every hour. You can reduce this to e.g. 30 minutes or even less, but it adds a lot of work on the server. Sometimes the server needs 30 minutes just to check all of the automatic transitions in a vault. If you set the interval too short, it will keep the server busy around the clock.

  • Sadly, this problem has returned in M-Files 21.9.10629.5. My File Sources are no longer importing again with no errors. It seems the server sees the files, tries to import, but nothing happens. It will say "Creating New Documents" and then end the process. The documents are not created, not deleted from source and no errors are written anywhere that I can find. (Usually they are in Event Viewer)


  • That is exactly what happens if some sort of automated handling is configured to take place immediately after import (workflow, event handler etc.) or if the imported object is placed in a class where required properties have not been given proper values. The process cannot complete, the object cannot be created, and nothing gets written in the logs. So the best way forward is to go through your configuration and check processing of those new objects all the way up to the point where the first actual check in happens if the process is successful. As mentioned above it has helped a lot to place a short pause immediately after import. This will allow objects to get checked in before the next steps in processing commence, and with that in place your import will be able to run. If objects then do not move on from the break point you have much better chances to figure out what goes wrong.

  • While I agree, when missing properties, there is a message logged in the event viewer with the error. In this case there is no message.

    Once again I rebooted the server last night. I touched nothing after the reboot nd the files imported properly, so it seems to be something deeper that is getting hung up in the system.

    I also noticed a problem when trying to edit the Advanced Vault Settings for a minor change. While experiencing this behaviour I was also unable to save any changes in AVS. I would get an error of "System Broadcast Message Channel is not Open"

    Reboot also resolved that. So not sure if maybe this is part of a larger bug?