error with Google+ button Badge - html

I want to use this button on my page but when I use chrome script appears to create a new circle, the same happens in firefox and safari explorer only works on analyzing with the console I get this error
Failed to load resource: the server responded with a status of 400 (Bad Request) /+1/fastbutton?bsv&annotation=inline&width=300&hl=en-US&origin=file%3A%2F%2F&url=file%3A%2F%2F%2FC%3A%2FUsers%2Fusuario%2FDesktop%2Fnoche.html&jsh=m%3B%2F%2Fapps-static%2F_%2Fjs%2Fgapi%2F_features_%2Frt%3Dj%2Fver%3DlgJnpFHo_sE.es.%2Fsv%3D1%2Fam%3D!9YrXPIrxx2-ITyEIjA%2Fd%3D1%2Frs%3DAItRSTMUGsaYaMyYb_qFDQo8MG8RKB82aQ#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Conload&id=I1_1352910400423&parent=file%3A%2F%2F">https://plusone.google.com//+1/fastbutton?bsv&annotation=inline&width=300&hl=en-US&origin=file%3A%2F%2F&url=file%3A%2F%2F%2FC%3A%2FUsers%2Fusuario%2FDesktop%2Fnoche.html&jsh=m%3B%2F%2Fapps-static%2F_%2Fjs%2Fgapi%2F_features_%2Frt%3Dj%2Fver%3DlgJnpFHo_sE.es.%2Fsv%3D1%2Fam%3D!9YrXPIrxx2-ITyEIjA%2Fd%3D1%2Frs%3DAItRSTMUGsaYaMyYb_qFDQo8MG8RKB82aQ#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Conload&id=I1_1352910400423&parent=file%3A%2F%2F

I believe the problem is that you are testing this code locally served through the file:// protocol as shown in the query parameter:
origin=file%3A%2F%2F&url=file%3A%2F%2F%2FC%3A%2FUsers%2Fusuario%2FDesktop%2Fnoche.html
Place your file in a location that can be served through http. Upload the page to your site or install a web server to test on.
I believe I was able to duplicate what you saw in Chrome and Safari; however, this approach is not a supported method to use the plugin and wouldn't be used to serve the page to real users.

Related

NTLM authentication doesn't work for JS files unless Fiddler is running

I am running an ASP.NET 4 app in IIS using NTLM (Windows) Authentication. All other authentication schemes are disabled. I am able to authenticate to the server successfully. However, even after successfully authenticating, the server (under certain circumstances explained below) still returns a 401 Unauthorized error when I request Javascript files. Why am I unauthorized to download JS files?
Granted, I don't completely understand how NTLM works, but I expect something like the following to happen when I request a protected resource:
I make a request to localhost:444 (yes, this is the correct port)
I am not authenticated, so IIS returns a 401 to my web browser.
My web browser understands that it must provide me with a popup in which to enter my username and password. I do so.
The browser and IIS perform the NTLM auth flow. (tbh, I don't know the details of this.) Authentication is successful. The browser understands to re-request my original request from Step 1.
IIS returns index.html.
Index.html references a CSS file and some JS files. The browser requests these files.
IIS returns these files.
This desired functionality is working... usually. When I'm accessing the site from Firefox, or Chrome 78, or Chrome 83, everything works as expected. However, when I access the site using Chrome 70, the following happens instead:
Steps 1 thru 5 work correctly as explained above.
Index.html references a CSS file and some JS files. The browser requests these files.
IIS returns the CSS file, but returns a 401 error for the JS file.
Then however, when I turned on Fiddler (and configured it to decrypt https, because I've been using https) Chrome 70 started behaving correctly, just like Firefox and Chrome 78 and Chrome 83 are. I turned Fiddler off again, and I got the same error (on my JS file) again.
Does anyone have any idea what the issue is?
Thanks!
The issue was not with the authentication; the authentication was working correctly.
The issue was with Angular 8/9 and Chome 70. I happened across this post which helped me discover this forum thread which (sortof) explains the issue.
Turns out, Angular 8 changed the way the the index.html formats its script tag. In Angular 8+, the tag makes use of JS modules and such, and includes a fall-back for browsers that don't support JS modules. However, Chrome 70 (and possibly others) seems to support JS modules poorly (I don't understand the exact nuances of what Chrome 70 does and doesn't do). Therefore, instead of using the fall-back for browsers that don't support JS modules, Chrome 70 seems to have made a malformed request for the JS files. Specifically, Chrome 70 requested the JS files, but requested their MIME type to be "text/plain" instead of "text/javascript". When IIS received this (assumedly) malformed request, it returned a 401 error. (I would've thought it would return a 400 error, but whatever.)
I don't know why turning on Fiddler fixed the issue. Maybe Fiddler was somehow changing the (assumedly) malformed headers to be correct again? I don't know.
The solution is easy - in your tsconfig.json file, simply set the target to "es5" instead of "es2015" (or whatever else is the default in the future). Compiling to es5 simply doesn't use the features that confuse Chrome 70.

Flash player redirect issues in Microsoft Edge

For some reason Microsoft Edge's flash player doesn't properly load urls with redirects.
I'm trying to load a file from CDN using urlLoader.load(). I make a request to https://cdn.example.com/path/name and server redirects me to https://edge-01.example.com/path/name with HTTP 302.
In other browsers everything works fine. I can get the file and see two crossdomain requests (for CDN and edge-01). In case of MS Edge I can only see crossdomain request for CDN. Redirected request to edge-01 stucks and in a minute returns HTTP 408.
Any ideas or workarounds on this?

Why is Google Chrome getting 400 errors when I try to load any content from a Phoenix server?

I'm currently trying to get a Phoenix project up and running, but my normal browser for dev (Chrome) is malforming all requests for some reason and just gets 400's form the server. I can see the default splash page in all other browsers, and Incognito mode, but I would like to be able to just use Chrome.
So far I have tried:
Clearing browser cache, cookies, etc.
Turning off all of my Chrome extensions and reloading Chrome.
Running the server on different ports (4000, 4001, 3000, 3005, 8080)
This is the gist of what my errors are looking like in Chrome.
localhost/:1 GET http://localhost:4000/ 400 (Bad Request)
favicon.ico:1 GET http://localhost:4000/favicon.ico 400 (Bad Request)
Here's one example of a server that is giving me trouble:
https://github.com/phoenix-examples/hello_phoenix
Does anyone have prior experience with this or know of what I could try to get Chrome to play nice with Phoenix?
Selecting "since the beginning of time" option under Chrome > Clear Browsing Data... and clearing all data again fixed it!

Chrome HTTP2.0 throws SPDY PROTOCOL ERROR

I'm using Windows 10 Technical preview. I know it's not yet tweeked out to full usage, but here is my problem.
On local IIS I'm developing my web app. It loads most of the data via ASP.NET MVC API. After the upgrade to Windows 10 I started to get
net::ERR_SPDY_PROTOCOL_ERROR
for all AJAX calls to API. The HTML page loads normally, but the dynamic loading of data content fails. I managed to figure it out by starting Chrome with parameters
--use-spdy=off --use-system-ssl
Strange thing is that on the first start I always get this error and have to restart Chrome. Other browsers fail too, but not with specific error. For the transfer there is used HTTP2.0 protocol, which is based on SPDY protocol.
Do I have to turn something off in IIS?
Edit:
Seems like an IIS problem with HTTP2.0. When trying to enter the site from Windows 8.1 I get the same error.
Most people’s reaction to this error would be to reload the web page. We would actually recommend this as a first response. Sometimes this even does work.
Interesting Factoid: SPDY actually stands for “speedy” and is used to reduce a web pages’ load time
If reloading the web pages does not remove the error, then you should close down Google Chrome and restart it. This alone will not really solve the problem because you will need to clear the cache as soon as you restart the browser.
or in cmd clear dns using this command ipconfig/flushdns

github chrome can't load resources

I did a todo list app a while ago using github pages. It works alright under safari, but the js just doesn't load under chrome. Why? here is the code: https://github.com/randomor/tododoingdone
What I see in the Chrome console is:
Application Cache Cached event
http://ametopia.com/tododoingdone/border.pngFailed to load resource
http://themes.googleusercontent.com/static/fonts/deliusunicase/v6/b2sKujV3Q48RV2PQ0k1vqiiT6GQZqXe56UwGtNcbg_g.woffFailed to load resource
That reminds me of the question "failed to load resource under Chrome":
It can be cause by an extension (like for instance AdBlock).
Desactivating AdBlock (even all the extensinos) lead to other javascript loading errors:
Those are displayed by the console as "others" (and not "scripts") errors.
That can be the result of some other query failing to return properly and blocking all subsequent scripts:
See for instance "jquery ajax problem in chrome".
Check your resources though, like your images (see "Resizable: Chrome dev tools console shows GET data: undefined (undefined)").