Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Sorry! Something went wrong error

 Post Reply Post Reply
Author
George Kirkwood View Drop Down
New Member
New Member
Avatar

Joined: 04 Dec 2010
Posts: 7
Post Options Post Options   Quote George Kirkwood Quote  Post ReplyReply Direct Link To This Post Topic: Sorry! Something went wrong error
    Posted: 08 Mar 2017 at 10:10pm
I'm using the component, and shortly after startup I get the error :

Sorry! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details.

Anyone had this and resolved the error ? I've obtained and set an API Key, but it still doesn't work.
Back to Top
camacho hilda View Drop Down
New Member
New Member
Avatar

Joined: 09 Feb 2015
Posts: 23
Post Options Post Options   Quote camacho hilda Quote  Post ReplyReply Direct Link To This Post Posted: 09 Mar 2017 at 6:47pm
Back to Top
camacho hilda View Drop Down
New Member
New Member
Avatar

Joined: 09 Feb 2015
Posts: 23
Post Options Post Options   Quote camacho hilda Quote  Post ReplyReply Direct Link To This Post Posted: 09 Mar 2017 at 6:49pm
Hi , I have the same problem , device  SM-T230  Andorid version 4.4.2  thanks
Back to Top
camacho hilda View Drop Down
New Member
New Member
Avatar

Joined: 09 Feb 2015
Posts: 23
Post Options Post Options   Quote camacho hilda Quote  Post ReplyReply Direct Link To This Post Posted: 09 Mar 2017 at 7:05pm
IOS 9.3.4 same error

Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2085
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 13 Mar 2017 at 1:49pm

We've indeed seen intermittent issues from Google with their Google Maps service in the past days.
We could also see the problem here last week at specific times only but today we do not see the issue.
When we saw the issue, it was resolved by specifying a Google  Maps Javascript API key to TMSFMXWebGMaps.APIKey before launching the map, so I'd recommend as a precaution to request such (free) key and assign it.

Back to Top
van Mol Paul View Drop Down
Member
Member
Avatar

Joined: 13 Feb 2011
Posts: 77
Post Options Post Options   Quote van Mol Paul Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 2017 at 12:17am
Hi,

Same problem here.

Galaxy S7 - Android 6.0.1

We create the map in runtime and supply the API key, but same error message
after two seconds after showing. Our code :

    web3              := TTMSFMXWebGMaps.Create(self);
    Web3.Parent  :=  TabItem1;
    web3.OnDownloadFinish := fix3;
    Web3.Name    := 'FT' + IntToStr(icmap);
    Web3.APIKey  := 'our_api_key';
    Web3.MapOptions.DefaultLatitude  := xlat;
    Web3.MapOptions.DefaultLongitude := xlon;
    web3.Align   := TAlignLayout.Client;

(Before we didn't supllied an API key, but still worked, using one makes no difference.)

Please a solution as our app is useless now.

Thanks,

Paul
Back to Top
George Kirkwood View Drop Down
New Member
New Member
Avatar

Joined: 04 Dec 2010
Posts: 7
Post Options Post Options   Quote George Kirkwood Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 2017 at 8:44am
Bruno replied to my direct support request and told me that you need to put the API Key in the constructor of the Tform (or the Tframe in my case). I did that and it made no difference. I'm not sure this is a TMS problem, because sometimes it happens and sometimes it doesn't. The problem is that we have no visibility of the actual error that would be posted in the Developer's Console so we don't know what the problem is.
Back to Top
Peter Goodland View Drop Down
New Member
New Member
Avatar

Joined: 22 Dec 2014
Posts: 4
Post Options Post Options   Quote Peter Goodland Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 2017 at 10:41am
Bruno replied to myself regarding this issue too in regards to a support ticket. His fix was to set the WebGMaps.APIKey to out own API key. This is something that we are already doing and it's still not working for us. 

The maps goes down in the middle of the day and comes back up around the same time that Google resets it's API limit count. 

This makes me to believe that somewhere there is a hard coded API key which is being used by TMS which may be going over quota (which would explain why at a certain time of the day the map software stops working and then continues to work early in the morning in the UK) I believe the daily request pool resets at 12:00am PST. 

Could TMS please list the entire Google APIs which should be enabled to have full use of the software please? Such as maps javascript, directions API and so on. Just so we can ensure our API key has everything enabled that it should have. 


Back to Top
Peter Goodland View Drop Down
New Member
New Member
Avatar

Joined: 22 Dec 2014
Posts: 4
Post Options Post Options   Quote Peter Goodland Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 2017 at 10:42am
Originally posted by van Mol Paul

Hi,

Same problem here.

Galaxy S7 - Android 6.0.1

We create the map in runtime and supply the API key, but same error message
after two seconds after showing. Our code :

    web3              := TTMSFMXWebGMaps.Create(self);
    Web3.Parent  :=  TabItem1;
    web3.OnDownloadFinish := fix3;
    Web3.Name    := 'FT' + IntToStr(icmap);
    Web3.APIKey  := 'our_api_key';
    Web3.MapOptions.DefaultLatitude  := xlat;
    Web3.MapOptions.DefaultLongitude := xlon;
    web3.Align   := TAlignLayout.Client;

(Before we didn't supllied an API key, but still worked, using one makes no difference.)

Please a solution as our app is useless now.

Thanks,

Paul

This is something very similar to how we do things here and we are having the same problem. 
Back to Top
Peter Goodland View Drop Down
New Member
New Member
Avatar

Joined: 22 Dec 2014
Posts: 4
Post Options Post Options   Quote Peter Goodland Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 2017 at 12:35pm
And it's down again! We are setting the APIKey both hard coded as the property and coding it in before initialization. 
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2085
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 2017 at 1:42pm
We also see the issue at this time when no API Key is assigned.
After assigning the API Key, the issue goes away.

Can you please make sure you have correctly assigned the API Key value?
Enabling only the "Google Maps JavaScript API" in the Google Developers Console should be sufficient. If you are using the directions functionality, also enable the "Google Maps Directions API".
If the API Key is assigned correctly, you should be able to see the stats (In Google Developers Console) increase every time the map is loaded.
Back to Top
George Kirkwood View Drop Down
New Member
New Member
Avatar

Joined: 04 Dec 2010
Posts: 7
Post Options Post Options   Quote George Kirkwood Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 2017 at 2:52pm
We have a Javascript API key, we're assigning it in the Constructor and if we read the key back during runtime we get the correct key returned. However, we get this error in the log :

"You have exceeded your daily request quota for this API. To request more than 25,000 map loads per day, you must use an API key and enable billing: https://developers.google.com/maps/documentation/javascript/get-api-key", source: http://maps.google.com/maps/api/js?sensor=false&libraries=panoramio,weather (33)

Unfortunately the error message doesn't tell us what the API key is, but we're only testing on a single device with one call every couple of minutes.

Peter could be onto something with maybe a hard coded API key, because we're not even using a couple of hundred calls in a day.
Back to Top
Peter Goodland View Drop Down
New Member
New Member
Avatar

Joined: 22 Dec 2014
Posts: 4
Post Options Post Options   Quote Peter Goodland Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 2017 at 3:06pm
We changed '%apikey%','apikey=' 

to 

'%apikey%','key='

Thoughout the project
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2085
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 2017 at 3:15pm

I can't find '%apikey%','apikey=' in the source code, only '%apikey%','key='.
Can you please make sure you are using the latest version of TMS FMX WebGMaps?
Back to Top
George Kirkwood View Drop Down
New Member
New Member
Avatar

Joined: 04 Dec 2010
Posts: 7
Post Options Post Options   Quote George Kirkwood Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 2017 at 3:50pm
I have set the APIKey in my TFrame constructor, and again when I interact with the map. But in :

function TTMSFMXWebGMaps.ReplaceHTML(HTML: string): string;

If I add a Log.d at this line :

Result  := ReplaceText(Result,'%apikey%','&key=' + APIKey)

The value of APIKey is always blank. If I then set the value of APIKey to my GMaps Javascript API Key, the map loads correctly.
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2085
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 2017 at 3:57pm
Originally posted by George Kirkwood

The value of APIKey is always blank. If I then set the value of APIKey to my GMaps Javascript API Key, the map loads correctly.

This is indeed an issue on Android.

As a workaround you can call Reinitialize after assigning the APIKey property.

Example:
procedure TForm1.FormCreate(Sender: TObject);
begin
  TMSFMXWebGMaps1.APIKey := 'ABC';
  TMSFMXWebGMaps1.Reinitialize;
end;

The next update of the TMS FMX WebGMaps will address this issue internally.
Back to Top
George Kirkwood View Drop Down
New Member
New Member
Avatar

Joined: 04 Dec 2010
Posts: 7
Post Options Post Options   Quote George Kirkwood Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 2017 at 4:25pm
Great. That seems to work.
Back to Top
Mol Paul van View Drop Down
New Member
New Member
Avatar

Joined: 18 Jul 2015
Posts: 4
Post Options Post Options   Quote Mol Paul van Quote  Post ReplyReply Direct Link To This Post Posted: 14 Mar 2017 at 5:24pm
Hi,

Doesn't work for me when creating in runtime :

    web3              := TTMSFMXWebGMaps.Create(self);
    Web3.Parent  :=  TabItem1;
    web3.OnDownloadFinish := fix3;
    Web3.Name    := 'FT' + IntToStr(icmap);
    Web3.APIKey  := 'our_api_key';
    Web3.MapOptions.DefaultLatitude  := xlat;
    Web3.MapOptions.DefaultLongitude := xlon;
    web3.Reinitialize;
    web3.Align   := TAlignLayout.Client;

As a matter of fact, this makes it worse. Without the Reinitialize, it shows
the map for 2 seconds before going to error. Now it instantly goes to error.

Am i missing something, or won't the "solution" work when creating in runtime ?

Thanks,

Paul
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2085
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 15 Mar 2017 at 9:19am
Originally posted by Mol Paul van

As a matter of fact, this makes it worse. Without the Reinitialize, it shows
the map for 2 seconds before going to error. Now it instantly goes to error.

The sample code you provided is working as expected here.
If the error message is displayed instantly this indicates that most likely the provided API Key is invalid or incorrect.
Can you please make sure you have assigned the correct API Key and the Google Maps JavaScript API is enabled on the Google Developers Console?



Edited by Bart Holvoet - 15 Mar 2017 at 9:20am
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2085
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 15 Mar 2017 at 12:03pm
Originally posted by George Kirkwood

The problem is that we have no visibility of the actual error that would be posted in the Developer's Console so we don't know what the problem is.

The next release of the TMS FMX WebGMaps will include an option to display any Developer Console messages.
Back to Top
Mol Paul van View Drop Down
New Member
New Member
Avatar

Joined: 18 Jul 2015
Posts: 4
Post Options Post Options   Quote Mol Paul van Quote  Post ReplyReply Direct Link To This Post Posted: 15 Mar 2017 at 11:20pm
Hi Bart,

Got it working now, with correct key.

Thanks.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down