Unable to Record and Replay Test Steps

I am unable to Record and Replay Test steps in web as only ‘Open Browser’ and ‘Close Browser’ steps are being added in the Recorded Actions. I am getting an error as ‘unknown error: DevToolsActivePort file doesnot exists.’ Please find the attached screen shot of the error. I tried to resolve the issue by adding the below scripts but still facing the same issue. Please help me resolve the issue