Early Preview: 🚧 These docs are still a work in progress. 🚧 Keep checking back for updates!
ProofKit

Troubleshooting

The fmFetch promise is never resolved / callback function is never called / "timed out" error

This happens if the result of your FileMaker script is unable to get it back to the web viewer for one of many reasons:

  • The SendCallback script is not called at the end of your FileMaker script.
  • The SendCallback script is called when the user is no longer on the layout that contains the webviewer.
    • This most often happens if the user has multiple windows open, or if you are using Perform Script on Server with Callback and the callback resolves in another window, but can also happen if your script simply navigates away and does not return to the webviewer layout before calling SendCallback.
  • The SendCallback script is called with the wrong webviewer name / your webviewer object does not have a name

If the SendCallback script is not called, or called with the wrong webviewer name, FileMaker cannot reach back into the JavaScript code to complete the loop. Make sure that you are not exiting/halting the script early or leaving the layout that contains the webviewer.

The FileMaker script does not run.

Verify this by opening the script debugger before performing the action in your webviewer that should trigger the script; you should see your script begin executing.

If you try to call a script that does not exist in your FileMaker solution, you will see a FileMaker error dialog. If you don't see that dialog, make sure that the Allow JavaScript to perform FileMaker scripts option is enabled in the webviewer configuration; it is disabled by default.

Error: 'window.FileMaker' was not available at the time this function was called.

FileMaker injects neccesary code into the webviewer to enable these interactions, but it is not available immediately when the webviewer first loads. There are many techniques to handle this, but essentially you need to introduce a delay before you use these functions if you run into this error.

On this page