hongzimao / pensieve

Neural Adaptive Video Streaming with Pensieve (SIGCOMM '17)
http://web.mit.edu/pensieve/
MIT License
516 stars 279 forks source link

no logs found in result folder (possibly CORS issue) #142

Closed ahmadhassandebugs closed 2 years ago

ahmadhassandebugs commented 2 years ago

Hi, Hope you're doing great! I faced an issue when running run_all_traces.py script. The first chunk of the video gets played in chrome, however, the ABR server fails to request the next chunks. Consequentially, logs are empty in results folder. When I inspect the page on chrome, it shows an issue with CORS policy (screenshot attached). I tried a few options for chrome webdriver including --disable-web-security but nothing worked out. Any kind of help will be highly appreciated, thanks!

Screenshot from 2021-12-09 02-39-20

ahmadhassandebugs commented 2 years ago

I fixed this issue a few days ago but couldn't get time to share the fix. The problem occurs because modern browsers don't allow requests from private networks. There's a flag in chrome that can be disabled using chrome://flags/#block-insecure-private-network-requests. After disabling it, chrome allows requests from/to private networks. I also found a way to automate it using selenium:

experimentalFlags = ['block-insecure-private-network-requests@2']
chromeLocalStatePrefs = {'browser.enabled_labs_experiments': experimentalFlags}
options.add_experimental_option('localState', chromeLocalStatePrefs)