Wrong 3P frame.html loaded when testing local compiled binary
See original GitHub issueAll 3P frames are loading //ampproject.net/dist.3p/1513120604167/frame.html
.
This might be due to this change #12152 , which sets config.localDev=true,
hence triggered the following logic in 3p-frame.js:
function getAdsLocalhost(win) {
if (urls.localDev) {
return `//${urls.thirdPartyFrameHost}`;
}
return 'http://ads.localhost:'
+ (win.location.port || win.parent.location.port);
}
To reproduce,
gulp dist --fortesting
gulp serve --fortesting --compiled
then load page http://localhost:8000/examples/ads.amp.html
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Load local javascript file in chrome for testing? - Stack Overflow
In my case I need a html page that runs locally but still needs to load json files. I cannot tweak my Chrome...
Read more >VbS - River Thames Conditions - Environment Agency - GOV.UK
Shill bidding ebay uk, Envision math topic 6 test, Fastest charger for iphone, Foto spiagge isola d'elba! E-gitarre solo lied, Garage pour moto...
Read more >2010-October.txt - GCC, the GNU Compiler Collection
So far I have partial success with updating the toolchain to binutils 2.17+gcc 4.1.2+newlib 1.15: - I can compile binaries with the gcc...
Read more >Changelog - curl
... tests: add HTTP/3 test case, custom location for proper nghttpx ... mbedtls: fix compile when h2-enabled; mbedtls: fix some error messages ...
Read more >Consolidated JDK 8 Release Notes - Oracle
getCpuLoad() returns incorrect CPU load inside a container ... JDK-8271854, core-libs, java.nio, Explicitly reclaim cached thread-local direct buffers at ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I do expect
localDev
to be true (originally proposed here.And I agree the fix should be somewhere getAdsLocalhost.
What is unclear to me is the current relation between
getMode().LocalDev
vsAMP_CONFIG.localDev
.If we can consolidate these 2 variables, then we can probably get rid of this getAdsLocalhost function.
I agree that the logic is complicated. This is because the config is written during build time, and returned at runtime. I wonder how they can be consolidated without a file read.