Foregroundservice using intentservice crash

Crash Log : Context.startForegroundService()
did not then call Service.startForeground(): ServiceRecord{71078e3 u0}
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invoke(Native Method)

I am using ContextCompat.startForegroundService(ActivHealthApplication.getInstance(), serviceIntent); to start my intent service. I am calling startForeground in service’s onHandleIntent after all my validations.

I have checked other questions with the same error. According to them I should be calling startForeground when the service starts, within 5 secs. My validations would take milliseconds as they are local. I am not sure what I am missing out here?

Should I call startForeground even before validations? But that doesnt make any sense.
According to this google group forum, it’s pending at google’s end?

Note:The user’s are facing these crash randomly, though it crashes for them 2 out of 4 sessions

Foregroundservice using intentservice crash