auchenberg / vscode-browser-preview

A real browser preview inside your editor that you can debug.
MIT License
4.39k stars 154 forks source link

[WIP] Add Firefox support #216

Open zurgeg opened 3 years ago

zurgeg commented 3 years ago

Fixes #215

zurgeg commented 3 years ago

Should be good to merge, I haven't tested though.

zurgeg commented 3 years ago

Alright, just tested. The title appears but nothing shows on the actual window.

zurgeg commented 3 years ago

Alright so adding --start-debugger-server did nothing apparently, I will have to do further investigation

zurgeg commented 3 years ago

Alright, so it should work with Firefox Nightly, I can't confirm though. If anyone can test, that'd be helpful

zurgeg commented 3 years ago

Alright, tried with Dev Edition, doesn't work... But, upon attempting to screenshot something (in headless mode), it... works? This indicates that the problem is somewhere in the code, time to do some more digging.

zurgeg commented 3 years ago

I did some more digging, I tried using puppeteer-core instead of puppeteer in tests, which couldn't reproduce the problem, I'll try on my desktop later to see if that fixes anything

zurgeg commented 3 years ago

So I took another look, and it appears to be navigating to networkservice,networkserviceinprocess.com??? image

zurgeg commented 3 years ago

Well, turns out that networkserviceinprocess happens to be a flag passed to Firefox, but this raises another question... does Firefox not support this flag? If so, disabling this flag which appears to be there by default could fix our problems

zurgeg commented 3 years ago

Upgrading to Puppeteer 3 fixed the title, but it still doesn't display

zurgeg commented 3 years ago

Showing the browser window shows that the weird navigation problem I mentioned here is solved, which is progress I guess?

zurgeg commented 3 years ago

Using -wait-for-browser allows navigation to work fully, we're getting close!