I have to comment out the line of CI_ENVIRONMENT constant or set it to production. If I don\'t do that, I get the error. I tried to add setTimeout at 1sec. Nothing worked.