Failed to get access to local media. Error code was undefined

Hello,

I’m stuck on this issue, where local media cannot access.

I try to put this in html file https://pastebin.com/TraeAsLC
and run directly from disk and its working fine and when i try to run the same example code to server it gives “not able to access local media”.

I have the same issue with basic_example

Any idea on this? please help.

INFO:  Requested access to local media
erizo:27 DEBUG:  Calling getUserMedia with config {video: {…}, audio: true, fake: undefined, screen: undefined, extensionId: undefined, …}
erizo:27 INFO:  User has granted access to local media.
erizo:27 DEBUG:  Event: access-accepted
erizo:27 ERROR:  Failed to get access to local media. Error code was undefined.
erizo:27 DEBUG:  Event: access-denied

same issue in this example: https://github.com/lynckia/licode-demos

Im running my client app in https

here is my react code:
https://pastebin.com/HeCHtAGU