Users who had encountered this error in earlier versions had used different workarounds. Check whether one of the following methods help:
- Adjust your In and Out frames.
- Go to Preferences > Memory and clear the "Reduce Cache size when system is low on memory" option if it is checked.
- Clear the cache and reset your preferences.
For persistent causes of this issue, today's bug fix update should solve it.
See the Adobe blog post for more information: A June 2017 Update to After Effects CC Is Now Available | Creative Cloud blog by Adobe
Please let us know if it works for you!