I want to use Places API, example:
<iframe
width="600"
height="450"
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?q=Space+Needle,Seattle+WA&key=AIzaSyCOurENeDiNJ4x....." allowfullscreen>
</iframe>
I always get error: "Google Maps Platform rejected your request. This API project is not authorized to use this API."
Key is valid and payments/billings are enabled, any suggestions?
console
Related
I have two ongoing and long issue with Firefox and Cypress regarding iframes and cross origin errors. This will be the first part of my question, this is for the iframes. My issue is, whenever I try to run my code in Firefox, I am getting this error below and unable to interact with the iframe. I have set the chromeWebSecurity to false to be able to do so in Chrome. Do we have the same for Firefox? Maybe a plugin?
This is the code to play the video. It works in Chrome but never in Firefox.
playVideo(){
cy.get(createTextPagePO.getYouTubeVideoOnPreview()).then(function($youTubeVideo){
const youTubeVideo = $youTubeVideo.contents().find(createTextPagePO.getYouTubeRedPlayButton())
cy.wrap(youTubeVideo)
.click({force: true})
})
}
I cannot fully disclose the page object code for our application but let's say I tried to embed this iframe code. And I want to click the Play button.
<iframe width="560" height="315" src="https://www.youtube.com/embed/3GNOLYNxGfQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
What it looks like in our site is:
I'm trying to make APLcart work with OpenSearch, but keep getting Firefox could not install the search engine from: https://aplcart.info/opensearch.xml with:
<link rel="search" type="application/opensearchdescription+xml" title="APLcart"
href="/opensearch.xml">
Where /opensearch.xml is:
<OpenSearchDescription>
<ShortName>APLcart</ShortName>
<Description>
Search APLcart: A novel approach to finding your way in APL
</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">https://aplcart.info/favicon.ico</Image>
<Url type="text/html" template="https://aplcart.info/?q={searchTerms}"/>
</OpenSearchDescription>
Note that this is not the same issue, since I do have Url type="text/html".
I've tried with method="get"
What do I need to change for my OpenSearch specification to be compliant?
You have to use the correct namespace
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
If you open the browser console (CTRL+Shift+J) you can see the error message
Invalid search plugin due to namespace not matching.
Since yesterday, our connection to the Google Analytics API returns an HTML page with... captcha. Does anyone experience something like this?
We use the API with the PHP library. Our code for retrieving a report (its wrapped in our own class but it uses the google/apiclient package):
// Create analytics
$this->analytics = new \Google_Service_AnalyticsReporting($this->client);
// Create the ReportRequest object.
$request = new \Google_Service_AnalyticsReporting_ReportRequest();
$request->setViewId($view_id);
$request->setDateRanges($this->dateRanges);
$request->setMetrics( array_values( $this->metrics ) );
$request->setDimensions( array_values( $this->dimensions ) );
$request->setSegments($this->segments);
$body = new \Google_Service_AnalyticsReporting_GetReportsRequest();
$body->setReportRequests( array( $request) );
try {
$reports = $this->analytics->reports->batchGet( $body );
}
catch(\Google_Service_Exception $e)
{
echo"Error (1)...\n";
echo $e->getMessage() . "\n";
$this->lastError = json_decode($e->getMessage());
return false;
}
We catch a Google Service Exception, and the message of the error is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta name="viewport" content="initial-scale=1"><title>https://analyticsreporting.googleapis.com/v4/reports:batchGet</title></head>
<body style="font-family: arial, sans-serif; background-color: #fff; color: #000; padding:20px; font-size:18px;" onload="e=document.getElementById('captcha');if(e){e.focus();}">
<div style="max-width:400px;">
<hr noshade size="1" style="color:#ccc; background-color:#ccc;"><br>
<form id="captcha-form" action="index" method="post">
To continue, please type the characters below:<br><br>
<img src="/sorry/image?id=14645528721876966739&q=EgSIkL9bGIjOzu4FIhkA8aeDSycUmKeaKy3bPExiN-Ol2PpxQzOfMgFj&hl=en&continue=https://analyticsreporting.googleapis.com/v4/reports:batchGet" border="1" alt="Please enable images"><br><br>
<input type="text" name="captcha" value="" id="captcha" size="12" style="font-size:16px; padding:3px 0 3px 5px; margin-left:0px;"><br><br><br>
<input type="submit" name="btn-submit" value="Submit" style="font-size:18px; padding:4px 0;">
<input type='hidden' name='q' value='EgSIkL9bGIjOzu4FIhkA8aeDSycUmKeaKy3bPExiN-Ol2PpxQzOfMgFj'><input type="hidden" name="continue" value="https://analyticsreporting.googleapis.com/v4/reports:batchGet">
</form>
<hr noshade size="1" style="color:#ccc; background-color:#ccc;">
<div style="font-size:13px;">
<b>About this page</b><br><br>
Our systems have detected unusual traffic from your computer network. This page checks to see if it's really you sending the requests, and not a robot. Why did this happen?<br><br>
<div id="infoDiv" style="display:none; background-color:#eee; padding:10px; margin:0 0 15px 0; line-height:1.4em;">
This page appears when Google automatically detects requests coming from your computer network which appear to be in violation of the Terms of Service. The block will expire shortly after those requests stop. In the meantime, solving the above CAPTCHA will let you continue to use our services.<br><br>This traffic may have been sent by malicious software, a browser plug-in, or a script that sends automated requests. If you share your network connection, ask your administrator for help — a different computer using the same IP address may be responsible. Learn more<br><br>Sometimes you may be asked to solve the CAPTCHA if you are using advanced terms that robots are known to use, or sending requests very quickly.
</div>
IP address: xxx.xxx.xxx.xxx<br>Time: 2019-11-19T08:25:44Z<br>URL: https://analyticsreporting.googleapis.com/v4/reports:batchGet<br>
</div>
</div>
</body>
</html>
If anyone experiences this too or has a solution, please let me know.
Thanks in advance.
This may have been Google applying some safety measures to handle a large spike in traffic. I am also aware they updated their error messages for the API as of the 4th November 2019 which may be why we are now getting this error instead of something else previously.
Email I received from Google:
"we’re upgrading the Google Analytics APIs to a new technical infrastructure stack beginning November 4, 2019. As a result of this change, clients will see some differences in the response error message text for failed API requests."
"If your application or log analysis workflow rely on the specific wording provided in responses of the Management API v3 or Core Reporting API v3, you will need to update the code to reflect the new error response text. Please note that as exact error message wording can change at any time, we strongly discourage hardcoding the specific message text when processing responses from the API."
Today my requests failed and a captcha image was provided in my error log that produced a 404.
Error I received:
"Our systems have detected unusual traffic from your computer network. This page checks to see if it's really you sending the requests, and not a robot."
"The block will expire shortly after those requests stop. In the meantime, solving the above CAPTCHA will let you continue to use our services."
I have since found the service to be back running in small doses without any code changes required.
I suggest to try again and limit the number of requests until the service is back 100%.
I just tried the the sample code provided by oracle maf for push notifications.I can register through it but when I pass message I didn't receive any message.
this is server code. Can us plz explain how to register in gcm.I registered there but I doubt in that also and is there any way to seeing the message received details in gcm
<af:commandButton actionListener="#{bindings.Execute.execute}"
text="Refresh"
disabled="#{!bindings.Execute.enabled}"
id="ctb1" immediate="true"/>
<af:table value="#{bindings.RegistrationsView1.collectionModel}"
var="row"
rows="#{bindings.RegistrationsView1.rangeSize}"
emptyText="#{bindings.RegistrationsView1.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.RegistrationsView1.rangeSize}"
rowBandingInterval="0"
selectedRowKeys="#{bindings.RegistrationsView1.collectionModel.selectedRow}"
selectionListener="#{bindings.RegistrationsView1.collectionModel.makeCurrent}"
rowSelection="single" id="t1"
partialTriggers="::ctb1" width="633" inlineStyle="height:189px;">
<af:column sortProperty="DeviceToken" sortable="false"
headerText="Device Token" id="c1" width="100">
<af:outputText value="#{row.DeviceToken}" id="ot5"/>
</af:column>
<af:column sortProperty="DeviceModel" sortable="false"
headerText="Device Model" id="c3" width="100">
<af:outputText value="#{row.DeviceModel}" id="ot4"/>
</af:column>
<af:column sortProperty="ApplicationId" sortable="false"
headerText="Application" id="c5" width="205">
<af:outputText value="#{row.ApplicationId}" id="ot1"/>
</af:column>
<af:column sortProperty="UserId" sortable="false"
headerText="User Id" id="c2" width="-5">
<af:outputText value="#{row.UserId}" id="ot3"/>
</af:column>
<af:column sortProperty="SenderId" sortable="false"
headerText="Sender Id" id="c4" width="100">
<af:outputText value="#{row.SenderId}" id="ot2"/>
</af:column>
</af:table>
</af:panelGroupLayout>
<af:panelGroupLayout layout="scroll"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
id="pgl1">
<af:panelFormLayout id="pfl1" partialTriggers="t1">
<af:panelLabelAndMessage label="#{bindings.DeviceToken.hints.label}"
id="plam4">
<af:outputText value="#{bindings.DeviceToken.inputValue}"
id="ot7"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{bindings.DeviceModel.hints.label}"
id="plam2">
<af:outputText value="#{bindings.DeviceModel.inputValue}"
id="ot6"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{bindings.UserId.hints.label}"
id="plam1">
<af:outputText value="#{bindings.UserId.inputValue}"
id="ot9"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="#{bindings.ApplicationId.hints.label}"
id="plam3">
<af:outputText value="#{bindings.ApplicationId.inputValue}"
id="ot8"/>
</af:panelLabelAndMessage>
<af:inputText label="Message" id="it1"
value="#{MessageBean.message}"/>
</af:panelFormLayout>
<af:commandButton text="Push Message" id="cb1"
actionListener="#{MessageBean.pushMessage}"/>
</af:panelGroupLayout>
First of all, you will have two applications. A server application (PushServer ) and a mobile application implemented with MAF framework (PushDemo) .I believe you found those after you installed MAF module into JDeveloper.
Secondly, to register with Google Cloud Messaging server, go to this link , write your app name ( default is PushService ) and your Android package name ( default for sample app is com.oraclecorp.internal.maf.PushSample ). You will get a GOOGLE API KEY which you will have to set into the PushServer application, into the MessageBean class (it is a constant there called GOOGLE_APIKEY), and a senderId that you will write into the mobile application ( into adf-config.xml - it is a property called gcmSenderId ).
You will have to run the server project on a public server ( Weblogic probably ) and have your mobile app call the URL where your servlet is - for example : http://www.something.com/PushService-ViewController-context-root/registrations ), then in your mobile application project, under connections.xml you have two fields that you have to edit :
<urlconnection name="SyncService_base_connection" url="http://www.something.com"/>
and
<urlconnection name="PushServiceConn" url="http://www.something.com/PushService-ViewController-context-root/registrations"/>
You start the app on the device, then check on the application if you registered into the database. Then if you press push for your device, you should receive those notifications straight on the Android device.
For the APNS process things are a little bit complicated, but the tutorial gets you going.
Thanks,
Razvan
Above issue solved after enabling JSSE on all managed servers including Admin Server (in weblogic server).
I have an HTA that loads up an external webpage inside a nested IFRAME. This webpage (which I don't have control over) throws an "Access Denied" error in my HTA asking the user if they "want to continue running scripts on this page". What I want to do is have my HTA suppress all scripting error messages regardless of where they originate
Here's a very basic idea of how my setup is working:
<html>
<head><HTA:APPLICATION ... ... </head>
<body>
...
<div id="navigation">...</div>
<div id="browsers">
<iframe APPLICATION="yes" src="http://myserver/browse.php?src=http://www.example.com/">
<!-- contents of http://myserver/browse.php?src=http://www.example.com/ -->
<html>...
<body>
<div id="titlebar">...</div>
<iframe APPLICATION="no" src="http://www.example.com/">
<!-- contents of http://www.example.com/ with js that causes error -->
</iframe>
</body>
</html>
</iframe>
<iframe APPICATION="yes" src="http://myserver/browse.php?src=somethingelese"></iframe>
</div>
</body>
</html>
And here is a screenshot of the error:
As far as I know there isn't a way to suppress errors like that. If you have access to their registry or group policy here is the relevant Registry Value (for IE naturally) that disables that popup:
Key: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
Name: Disable Script Debugger
Type: REG_SZ
Value: no
A sentinent GetWindowText() -> SendMessage WM_CLOSE based dialog closer could deal with that but is not exactly disabling
I've been searching for days and haven't found solid solution - perhaps HTAs do not serve their simplistic rationale after all, at least when using actual browser info
By the way changing the IE8 script debugger does not disable the error message - it merely disables the debug dialog and replaces it with a script error
Unchecking the IE flag "Error Dlg Displayed On Every Error" does not alleviate the issue either