Chinese (.cn) api calls .com AutocompletionService which results in failure - google-maps-api-3

In order to make autocomplete work in China I referenced Chinese Google Maps Api, as suggested in the documentation.
When it's called to get autocomplete results, I see it correctly makes requests to:
http://maps.google.cn/maps/api/js/AuthenticationService.Authenticate?...
... but then it makes a call to:
https://maps.googleapis.com/maps/api/js/AutocompletionService.GetPredictions?...
... which is unable to be completed when website is used in China because this domain is blocked in China.
See plunker demo (press F12, open Network tab, and watch requests as you type in the input).
Apparently SO questions with links to plunkr require code, so here is a reference to the script I use:
<script type="text/javascript" src="http://maps.google.cn/maps/api/js?libraries=places&sensor=false"></script>
Here is a screenshot that shows the issue:
Here is a bug report, submitted to Google, which apparently looks all good to them.
Am I doing something wrong? Can someone please confirm they see the same behavior as I do?

Related

Firebase Crashlytics links from mail, redirect to error-page, due to wrong Chrome user

Setup:
having a firebase project with crashlytics active
receive mails for crashes
try to open the crash from the link within the mail
Example link: https://console.firebase.google.com/project/xxx-8c64/crashlytics/app/android:com.example.project/issues/3fgdfgfdg9e86f653d84df9fdfdfdf3?time=last-seven-days
I have multiple accounts in chrome. One is my private, one is my work account.
My main account is the private one. (/u/0)
Now, once I try to open the link
result: get redirected to wrong user https://console.firebase.google.com/u/0/
expected result: asking which account I want to use to open the link
My current workaround is to stop loading the link in the middle and replacing the u/0 with u/1 and let chrome continue. This will load the link correctly. But it will not always work and is super cumbersome.
Is there anything I can do? Do some of you face the same problem?
(Besides logging in with my work account. No - I don't want to log out from my main and switch forth and back all the time)
Okay I found a way, although I would love to hear a better one.
Using a redirect chrome extension. Redirector
github Link
Chrome Extension Link
RegEx:
From: ^https://console\.firebase\.google\.com/u/./(.*)
to: https://console.firebase.google.com/u/1/$1

Confused by RefererDeniedMapError

I'm trying to use the Google Maps Javascript Geocoder code. I figured I'd start with their example at https://developers.google.com/maps/documentation/javascript/examples/geocoding-simple
I copied their code exactly, putting in my Browser Key where it said YOUR_API_KEY,
and the page seems to load for a moment, and then I get this error in my console:
Google Maps API error: RefererDeniedMapError
And a Javascript alert telling me that it was unable to load.
I have checked my developer console and I have enabled the Google Maps JavaScript API, and I don't have any referrers set up for that key (which is supposed to let all requests through), and yet I still get this error.
I have to believe I still have a setting wrong somewhere, but the console is so simple to use I can't identify where. Can anyone give me the benefits of their experiences on setting up the Browser key to work properly?
Thanks in advance,
DW

Google Map API Issue. Using without API key

"Our Google's MAP implementation was working fine when suddenly an alert was being prompt by Google informing to any visitor that Google's MAP was deactivated in our site because it didn't have the correct domain references or because the key was wrong; the same key was working fine in one of our sub-domains, which we use for development purposes, so we were pretty sure that the issue didn't rely on our end. We also double checked the settings on Google's developers console and everything is setup properly.
At the end we removed the key from the API call temporarily until we find a solution; what are the consequences of not including the key and what recommendations could you give us to solve this issue?
We are also using Google's Page Speed technology.
One thing I tried was to make sure that the Referer patterns shown in the Google Developers Console were sufficiently generalised, e.g. *.mysite.com/* rather than mysite.com
This apparently helped but further testing was inconsistent with the alert shown almost always on Windows Safari (5.1.7) and Firefox (29.0.1). In contrast, it was rarely shown on Safari on iOS.
As my web app is unlikely to make 20000 requests a month, I decided to ditch the key and use
<script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
So far, this has worked without any apparent issues.

Security problem

I have a security problem in my website. A script code was added into my all pages like "<script src="Ip address/viewpic.asp"></script>" . It is between </head> and <body> tag. Now Google says "this site may be hartful for your pc!" about my site. How can i secure my website? I use C# and Visual Studio 2008.
You have been hacked. This code that has been added to your site is trying to hack web browsers that visit your site.
This could have happened a number of ways. The easist thing for you to do is to download an anti-virus like AVG and scan any machines with access to the site. There is malware that looks for FTP connections, it grabs the username/password then logs in and modifies files it finds. You should be using SFTP which can be installed under windows, FTP is only used by people who don't know any better or love to get hacked, or both.
The more complex possibility is that there is a vulnerability in your site. This requires a professional (Like me) to track down and fix. Acunetix can help find flaws in your site, but this might not find the vulnerability that was used to break in.
Edit: Assuming that the script is your own and not malicious:
You should not have any code between </head> and <body> - Otherwise you have got a <script> tag as a direct child of <html> which is not allowed.
Put the <script> tag inside <body> at the correct place where you want the script to execute, to correct the structural issue but you need to provide some more information about the exact error messages you are seeing about security as I'm not aware that Google shows error messages within its search listings and I dont have Google Toolbar installed to know what that does; but I don't believe it has typos in it ;)
So please provide more information about the exact security warnings once you've fixed - and validated (with the W3C Validator) - the structure of your HTML.
Edit: If the script is not intended to be there and has appeared outside of your desire:
Have a look in the HTML source where the script is present; and compare to your own ASPX pages to find out where the script is appearing. If it is being rendered by one of your controls you need to examine where the value is coming from. If it is a database, you need to focus your attention on what gets the information into the DB in the first place. If the script is injected and not into one of your controls then you should talk to your ISP I would think.

Can I use google analytics on vkontakte?

I want to use Google Analytics on my Vkontakte application (written with Flex). Vkontakte does not support naturally in Google Analytics (not as Facebook) which means I can't even put the Google Analytics JS at the bottom of the page (or even use JS for that matter). What I can use is the AS3 library of Google Analytics, but for some reason it reports of failed gif requests every time I use it to report on an event.
Is it even possible to use Google Analytics on the described environment?
If so, what could be the reason of the failed gif requests? Is it debugable?
Update #1:
After debugging the "Google Analytics for flex" source code, I got this error: Error #2035: URL Not Found.
Update #2:
It turns out to be a known bug as suggested here. It works perfectly on IE.
Update #3:
It works on FF when I disable the "ABP Tracking Filter (by rick752)" filter at the "AdBlock Plus" extension.
It's possible, the problems I've experienced were due to FF problem as stated in the question.
One potentially relevant way to debug this: install a network monitor like Fiddler, and look at the requests going over the wire. Do you see the right GIF get downloaded? If so, you're good. If not, you'll see what's going on on the network.
Here's some info from Google on debugging the gif requests. What do you mean when you say it failed?

Resources