Closed KevinGrandon closed 8 years ago
I think this is a browser issue, not a vault issue. It looks like process.env.VAULT_HOST
is not making it to config.js.
The env definitely gets passed through to the executable in the gulpfile.js run task. I tried manually adding it in the shell options with no change and ps -p <PID> -wwwE
shows VAULT_HOST for both PIDs. export VAULT_HOST=https://vault-staging.brave.com
doesn't work either so it seems like something must be explicitly setting process.env or at least filtering it.
Changing the default value for vaultHost
in config.js does work, so the variable is being used correctly.
Thanks for chiming in! There definitely was a problem with the browser code, but we fixed a problem with VAULT_HOST yesterday. I'm actually seeing the iframe get populated with the correct SRC, but for some reason it's not making the request. Will post some screenshots soon.
(Are you actually getting ad replacements when overriding vaultHost manually? I'll give that a shot as well)
Here's what I'm seeing when passing VAULT_HOST. I also see the same thing when I hard-code the vaultHost value int he browser config.js. The iframe is in the page, but no HTTP requests are made. Wonder if we're catching the request in ad blocking or tracking protection.
I also only see empty boxes, but there was no error message so I assumed it was calling out to the vault and just had nothing to serve. How do you open the dev tools window?
I also only see empty boxes, but there was no error message so I assumed it was calling out to the vault and just had nothing to serve. How do you open the dev tools window?
We're going to try to get them embedded inside of brave, but for now you need to have a Firefox instance running and use Tools -> Web Developer -> WebIDE. From there you can connect to "remote desktop". Oh, and you also need to have remote debugging enabled in about:preferences inside of Brave. It's quite a chore currently - we're going to make it better.
sigh.. this was happening because the easlist has a rule like:
{"isException":false,"options":{},"isRegex":false,"data":".com/ad?"},
Removing that line causes everything to load just fine. The likely fix here is to just rename that route :)
We have a temporary workaround for now, handled by: https://github.com/brave/vault/pull/16 and https://github.com/brave/browser/commit/57c7bd5ddac107bf0c9d3be506aa4a141bbe6ac9
In the future we'll need to make sure that requests to the vault don't get caught up in the ad blocking or tracking protection rules, possibly by having some list of whitelisted hosts.
When running the browser with:
VAULT_HOST=https://vault-staging.brave.com gulp
It seems no HTTP requests are being made to the vault.