I am trying to get an image from Google Storage API
hence I used this line of code in my html
<img src="http://storage.googleapis.com/property_home_image/1405009694204ioiqlxmseplcn.jpg"/>
However, I get an error message on my console for chrome, which is
GET http://storage.googleapis.com/property_home_image/1405009694204ioiqlxmseplcn.jpg net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION
It works fine all on all browsers except for Chrome, may I know how I am able to solve such issue.
1405009694204ioiqlxmseplcn.jpg does not exist in the property_home_image bucket.
Related
When clicking on the Continue With Google button, a popup appears (on my website that I created using Django in Python) as expected in Google Chrome asking which account to continue with etc...
By doing the same thing in Microsoft Edge, the popup is blank, there is no content. I'm not sure if it's a problem with my code, my OAUTH account or Microsoft Edge itself.
This is the popup in Google Chrome (working as normally)
This is the popup in Microsoft Edge (not working at all)
I expect the top image to be happening in both browsers.
Does anyone have any idea why this isn't working in Microsoft Edge?
EDIT:
The following two errors appear in the Microsoft Edge console but they also show up in Google Chrome:
Failed to load resource: the server responded with a status of 400 ()
[GSI_LOGGER]: The given origin is not allowed for the given client ID.
I tested the website in Firefox and everything works as expected similar to Google Chrome.
Why is Edge the only browser that isn't working (My Microsoft Edge is up to date)
HTML Code:
<script src="https://accounts.google.com/gsi/client" async defer></script>
<div id="g_id_onload"
data-client_id="**********.apps.googleusercontent.com"
data-login_uri="http://localhost:8000/accounts/continue-with-google/?source=signup"
data-auto_prompt="false">
</div>
<div id="continueWithGoogleButton" class="g_id_signin"
data-type="standard"
data-size="large"
data-theme="outline"
data-text="continue_with"
data-shape="pill"
data-logo_alignment="left"
data-width="300">
</div>
Be sure to read this, because it seems that might be causing the issue (blank window). Also, the key points are important (#2, and #3), since you're developing in localhost. This would also mean that you might need to add (if you don't have it already) a meta tag regarding the referrer policy.
This was answered in the comments by FiddlingAway. I wanted to post this as an answer to make it clearer for future references. To save a bit of research, in Django, you'll need to write in settings.py file SECURE_CROSS_ORIGIN_OPENER_POLICY = "same-origin-allow-popups". Check the above links to find out what this means.
Hope this helps!
I have implemented recaptcha on my site but it doesnt work in IE11.
I get this console error:
SCRIPT5005: String expected
recaptcha__en.js (17,24)
Any ideas what this may be and why IE is complaining?
Just remove the script src for google ReCaptcha from index.html and used loadRecaptchaScript=true in vue-recaptcha.
I have a local IIS site where i developed some code with PDF.js. There it worked fine to load a specific PDF and read the text contents from it.
Then I copied everything to the a library in a SharePoint Server (thats the only difference, IIS vs SharePoint) and changed all references. The code does not throw any Errors, with debugging level info it just prints
Info: Cannot use postMessage Transfers
to the console. Adding a console.log line into the PDF.js catch block of the promise did not result in any new information. It doesn't even get to the first logging inside the then:
var pdfobj = PDFJS.getDocument(docPath);
pdfobj.then(function (pdf) {
console.log(pdf);
any ideas?
EDITS: Updated from PDF.JS 1.1 to 1.2
There are not many error logs in PDF.js. I accidently hardcoded a wrong URL where even the server is non existent... and no error log, not even the then(...).catch(...) is called?
It is working now in Firefox but not in IE and I cannot see any reason for this. The Info message about Cannot use postMessage Transfers is also only displayed in IE (using IE 11).
It does work now. I am not sure what I did to fix it, but I will update this answer when I know. I think it has something to do with the directory structure of the PDF.js files. Previously I just uploaded all JS files (there were no errors though).
Still there is no exception handling when the PDF does not exist.
I am getting (NS_ERROR_DOCUMENT_NOT_CACHED) error when I try to access the Javascript code through firefox.I get this error in the contents tab of HTTPFOX.
I googled and set the parameters of browser in config file as specified in this site but it still doesn't work.
http://code.google.com/p/httpfox/issues/detail?id=20
Can somebody suggest whats going wrong since the same code works fine for safari browser..
If anyone is interested in a solution to this, I believe it's to do with the plugin noscript. Disabling it fixed this, but I have yet to work out what part of noscript was causing the issue. Will update if I find out.
Edit:My issues was with a twitter auth callback. In the Advanced settings of noscript under ABE, in the SYSTEM ruleset, on the line "Accept from LOCAL" I added "*.twitter.com". This allowed callback requests from *twitter.com to return to a local address.
On my macbook I had to uninstall firefox completely to correctly get the content of an ajax response with httpfox. This also implies to remove the firefox profile bij removing this Firefox folder (I could only find it via the terminal and not via Finder):
/Users/<YOURUSER>/Library/Application Support/Firefox
Then install firefox again and install the httpfox add-on.
I tried many cache settings also by entering about:config in the firefox URL however without succes. Be aware that removing the profile settings like I describe will also remove all your personal firefox customization. It concerned firefox 18.0.2 and httpfox 0.8.11.
We used to get the same error when our JavaScript made an XMLHTTPRequest to the server. On the server side, we had java, and the java response, the content type was not explicitly set to "text/html". When that was done
resp.setContentType("text/html");
the error went away.
function publish(text) {
$('#helpdiv').prepend(text);
}
function get_help(topic) {
$.get(topic, publish);
}
<p>Hi. click here for more help.</p>
<div id="helpdiv"></div>
I've inherited this chunk of HTML and javascript above (snippet). It is/was going to be used as local help. Currently it is online only and it works fine. However, when I copy the files locally, I get "Permission Denied" in Internet Explorer and in Chrome doesn't do anything when I "click here for more help". What it's supposed to do is load the help content from inline-help.html and display it in the helpdiv div. Now here is the kicker, if I take the same files and copy them to inetpub on my PC and load them as http://localhost/hello.html it functions perfectly.
Presumably this is a security thing where the "local" zone isn't allowing me to load files off of the user's HD? But I'm not really sure what's going on and would like to understand this problem further and potentially come up with a workaround.
Any insight is greatly appreciated.
jquery's "get" uses xmlHttpRequest, which doesn't work on local files, unfortunately. If you really need to be able to fetch local data (or data from a different domain) asynchronously, you should use dynamic script tags. However that means the data file has to be reformatted as JSON data.
I don't think your browser is allowing you to run javascript locally (using the file:/// access method). But when you load it from http://localhost/ it works fine.
You need to either develop on a website, or use your localhost server.