Google Wallet DOM Exception 18 - android-pay

Google Wallet seems to get stuck at the loading screen and doesn't show the form
google.load('payments', '1.0', {
packages: ['sandbox_config'],
callback: cbk})
Callback is
goog.payments.inapp.buy({
jwt: getToken,
success: function() {
console.log("success");
},
failure: function() {
console.log("fail");
}
});
Console shows
Uncaught Error: SecurityError: DOM Exception 18 5F00.cache.js:23
com_google_checkout_inapp_client_gwt_init_init
This is on Google Chrome - Version 25.0.1337.0 dev. It works for me on the demo page, but not on my own pages.
EDIT:
Installed Google Chrome Canary - Version 25.0.1347.2 canary
Seems to not be an issue, works perfectly in Canary - is this just a Google Chrome dev glitch or has anyone else seen this?
EDIT 2:
Now it doesn't work in canary either (1348) I have also tested in Chrome stable, where it works.
Actually it doesn't seem to be related to the browser version, as reinstalling Canary and wiping Application Support data files makes it work again
Is there a way to get support via email from Google somehow? I know it's Google and they don't talk to people, but maybe there is some way?

Based off of your experiences it seems like a Chrome dev glitch.
Sidenote: I'm not sure if testing your app in dev/canary releases is the best way to catch potential bugs. Are you also testing in IE/FF/Chrome stable?

Related

How to anbale cookies for gitlab OAuth when running cypress test

I have an angular app which has to authorize to gitlab and signIn the user with userName and pass in order to fetch some data/information from gitlab and display it in the UI.
The first test case fails before the browser can redirect to the gitlab login-form (https://gitlab.com/users/sign_in):
Spec Code:
it('Visits the home page', () => {
cy.visit('/', {
onBeforeLoad(win) {
cy.stub(win.navigator, 'cookieEnabled', false).as('cookieEnabled');
},
})
})
Error:
Checking your browser before accessing gitlab.com.
Please enable Cookies and reload the page.
This process is automatic. Your browser will redirect to your requested content shortly.
Please allow up to 5 seconds…
I have been searching and trying couple of other options/implementation based on cypress official doc etc., but still facing the same issue. Some kind of similar questions here in SO, but none for the hints/answers provide the fix.
Also I am not 100% sure that it's really an issue related to cypress test implementation. Could it be an issue affecting gitlab itself?
Any ideas how to fix such issue?
Cypress: 10.7.0
Angular: 14.x
Node: v16.13.1

nodejs api returning nothing

I am trying to implement MEAN app for which I made node server
app.get("/posts",(req,res)=>{
posts=[{"title":"a","context":"b"},{"title":"c","context":"d"}]
res.send(posts); // tried even with res.status(200).json(posts)
});
when it checked with api tester it works well output snapshot
output snapshot with apitester
when i try to access with angular services
getposts()
{
var url='http://localhost:3000/posts';
this.http.get<post[]>(url).subscribe(data=>this.posts=data);
console.log(this.posts);
return this.posts;
}
when i do console.log(posts) it returning []
can someone please help i am struggling from last 2 days?
As you have not added the screenshot from the Browser's Inspector => Network Tab, I am guessing this answer will help you in case my guess is right.
Try setting the below in your front-end project (Angular in your case):
Try setting the below in your back-end project (Node in your case):
Also, verify your updates as in the below screengrab in the Browser's Inspector (Chrome in my case):
Please Note: - The mentioned response headers have special meaning, so kindly look for more info with a simple Google search. Use these settings during your development phase on localhost.

Custom Template in Azure B2C doesn't work in IE11 when JavaScript is enabled

I have a SignIn V2 policy in Azure Active Directory B2C
I also enabled JavaScript
Because I use it to manipulate some elements in the form.
This configuration works well in Google Chrome, but whenever I try to run it in Internet Explorer 11, I get
SCRIPT1002: Syntax error
In the console, and the login button doesn't respond.
This happens when JavaScript is enabled.
When I disable it, the page works in IE11 (But my manipulations don't).
Has anyone encountered this problem before?
I found out what the problem was.
I was using ES6 syntax such as
() => {
...
}
Once I replaced it to
function () {
...
}
It worked on IE11.
Thank you
#Thomas
and
#Zhi Lv - MSFT

How to fix 'Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.'

I have the following error in the Chrome Dev Tools console on every page-load of my Node/Express/React application:
Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist
This error makes a reference to localhost/:1. When I hover over this, it shows http://localhost:3000/, the address I'm viewing the app at in the browser.
Anyone have an idea what is going on? Most of the other threads I've found that bring up this error seem to be related to someone trying to develop a Chrome Extension, and even then they tend to have very few responses.
I'd been getting the exact same error (except my app has no back-end and React front-end), and I discovered that it wasn't coming from my app, it was actually coming from the "Video Speed Controller" Chrome extension. If you aren't using that extension, try disabling all of your extensions and then turning them back on one-by-one?
I found the same problem when developing the Chrome extensions. I finally found the key problem.
Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist
The key problem is that when background.js sends a message to the active tab via chrome.tabs.sendMessage, the content.js on the page is not ready or not reloaded. When debugging. We must ensure that content.js is active. And it cannot be a page without refreshing , The old pages don not update you js itself
Here is my code:
//background.js
chrome.tabs.query({active: true, currentWindow: true},function(tabs) {
chrome.tabs.sendMessage(tabs[0].id, {greeting: "hello"}, function(response) {
console.log(response);
});
});
//content.js
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse){
console.log(request, sender, sendResponse);
sendResponse('我收到你的消息了:'+JSON.stringify("request"));
});
The error is often caused by a chrome extension.
Try disabling all your extensions, the problem should disapear.
Solution
For Chrome:
You have the window open with the console error, open up a second new window.
In the second window, go to:
chrome://extensions
Disable each extension by toggling (the blue slider on the bottom right of each card), and refresh the window with the console after toggling each extension.
Once you don't have the error, remove the extension.
If you are an extension developer see this Chrome Extension message passing: Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist
The core of the problem is that chrome API behavior change and you need add a workaround for it.
You need to handle window.chrome.runtime.lastError in the runtime.sendMessage callback. This error just needs to be handled. Below is my code:
window.chrome.runtime.sendMessage(
EXTENSION_ID,
{ message:"---" }, // jsonable message
(result) => {
if (!window.chrome.runtime.lastError) {
// message processing code goes here
} else {
// error handling code goes here
}
}
);
});
🙂simple answer:🙂
if you have no response from another End it will also tell you Receiving end does not exist.
detailed answer:
if you have no answer from another end it will also tell you Receiving end does not exist. so if you have any callBack function which should use response in your .sendMessage part, you should either delete it or handle it if you probably have no response from another side.
so
if i wanted to re-write Simple one-time requests section of Message passing documents of google API i will write it with error handlers for callback functions in message-sending methods like this:
Sending a request from a content script looks like this:
chrome.runtime.sendMessage({greeting: "hello"}, function (response) {
if (!chrome.runtime.lastError) {
// if you have any response
} else {
// if you don't have any response it's ok but you should actually handle
// it and we are doing this when we are examining chrome.runtime.lastError
}
});
Sending a request from the extension to a content script looks very similar, except that you need to specify which tab to send it to. This example demonstrates sending a message to the content script in the selected tab.
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
chrome.tabs.sendMessage(tabs[0].id, {greeting: "hello"}, function(response) {
if (!chrome.runtime.lastError) {
// if you have any response
} else {
// if you don't have any response it's ok but you should actually handle
// it and we are doing this when we are examining chrome.runtime.lastError
}
});
});
On the receiving end, you need to set up an runtime.onMessage event listener to handle the message. This looks the same from a content script or extension page.
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
console.log(sender.tab ?
"from a content script:" + sender.tab.url :
"from the extension");
if (request.greeting === "hello")
sendResponse({farewell: "goodbye"});
}
);
Removing 'Udacity Frontend Feedback' chrome extension solved the issue for me.
This was happening in Chrome for me and I discovered it was McAfee WebAdvisor. Once I disabled it, the message went away:
The simple fix is to return true; from within the function that handles chrome.tabs.sendMessage.
It's stated
here.
(this is similar to other answers)
I removed "Video Speed Controller" Chrome Extension and the error was removed.
It worked for me like this. In your case there may be some other extensions too which may cause this error.
It was tab bnundler for me: https://chrome.google.com/webstore/detail/tab-bundler/ooajenhhhbdbcolenhmmkgmkcocfdahd
Disabling the extension fixed the issue.
It was a few extensions for me. Disabling and then re-enabling fixed the problem though. Grammarly was one of them. Hope the errors don't return.
Oddly enough, for myself I simply disabled all my extensions and the error went away.
However, after re-enabling all of the ones I disabled, the error was still gone.
I was testing my extension on edge://extensions/ page/tab. Testing it on another tab solved this issue. I think this may also occur for chrome://extensions/.
This is caused simply by installed chrome extensions, so fix this first disable all chrome extensions then start to enable one after another to detect which extension is cause you can enable the remaining.
in my case removing 'adblocker youtube' extension work for me
For me the error was due to the onelogin chrome extension. Removing it fixed the issue.
Cacher Extension in my case - but yeah disable each and then reload page
This is usually caused by an extension.
If you don't want to disable or remove the extension which causes this error, you can filter out this specific error by typing -/^Unchecked\sruntime\.lastError\:\sCould\snot\sestablish\sconnection\.\sReceiving\send\sdoes\snot\sexist\.$/ in the Filter box in the console:
As far as I've seen, this filter will stay until you remove it manually, you can close and reopen the console, restart Chrome, etc as much as you want and the filter will never be removed automatically.
I get the message only on the first Chrome page =
When Chrome is not running, and I open it - either directly or by double-clicking on a page on my desktop.
(I don't know if this matters, but I have "Continue running background apps when Google Chrome is closed" off.)
So, I'm assuming it's Chrome's crap spying/"enhancing user experience" attempt.
I don't know what it's trying to send, but I'm glad it's not able to! :)
So, second (or any but first) tab has no error.
== No need to disable anything (extensions, etc.).
Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
I "achieved" this error after
installing the Debugger for Chrome extension in Visual Studio Code,
debugging my code, and
closing and reopening the non-debugging Chrome window. (I had left Chrome running my app while debugging.)
Solutions:
Stop using the extension.
Refresh the non-debugging Chrome window.
Use a different debugger.
Of course, the console error reappears when I redo steps 2 and 3 above with the Debugger for Chrome. This encourages me to use other debuggers instead. Then I don't mistakenly think my own code produced the console errors!
For me this was caused by :
Iobit Surfing Protection & Ads Removal extension
which comes with Iobit advanced system care software. However, the console might provide you with relevant information on what you need do disable or the cause for that problem.
The likely cause of this error, as per google searches is because that extension which causes the error, might be using the chrome.runtime.sendMessage() and then tries to use the response callback.
Error shown in the console
Hope this information helps. Have a great day!
For chrome extension development, it's an error thrown by chrome.tabs.sendMessage method.
Here is the link of related documentation: https://developer.chrome.com/docs/extensions/reference/tabs/#method-sendMessage. In the link you can find the description for the callback function: If an error occurs while connecting to the specified tab, the callback is called with no arguments and runtime.lastError is set to the error message.
According to documentation above, the error is because of the specified tab. I restart chrome and reloaded the extension, and this issue is fixed
I solved this in following way. This is mainly chrome extension problem, try to first empty cache and hard reload for this inspect any window and hold reload button about 2 second then it will appear 3 options click last one which is mentioned above then go to manage extensions and turn off one by one and then turn on again one by one and check it's gone or not.
Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist
chrome.runtime.lastError
It's an error that appear in the Chrome devTools console.
And it's related to Chrome Chrome Message Passing
Because of the 'rigid structure' of the Chrome platform, it's not easy to pass data between different Chrome windows/tabs, as it's common to do in the 'object oriented' programming languages.
In Chrome extensions, usually, there is not a single file of code, that runs for all pages or tabs.
It's a common use, to build many different files of code in javascript, for different Windows/tabs/url address.
So, when the software, need to pass data from different windows/tabs/url, it's made using 'message passing'
The 'message passing', allow to send a 'message' and wait to receive a message as 'callBack'
But sometimes happens, in example, that the url of a window, or a tab, change, when there is a 'message passing' function which has been triggered, but still not returned.
If this situation it's not managed by code (as wrote TechDogLover OR kiaNasirzadeh), or it's an old extension not updated, this error can arise.
So as others users said, it could be an extension, which is running in your Chrome.
But if your window doesn't crash, it doesn't have much sense disable an extension because of such message appear in the devTools Console.
And it doesn't have sense try to understand how to fix it (if you are not the developer of the software which is causing the error), because the variables are so many, that it's not said that the error will be triggered again, in the same situation.
In those cases, in my opinion, if you really want to do something, a good thing to do could be, once you find the extension that cause the error, contact the extension developer and report it.
And if you are the developer, you could check for a missing
if(!chrome.runtime.lastError){
// here if there is no error
} else {
// here if there is an error
}
Or, also you could check your code, if you did more than one callBack, e.g. as explained there
wOxxOm comment
I also encountered this problem when I was developing chrome extensions.
Error: Could not establish connection. Receiving end does not exist.
The error message from chrome.tabs.sendMessage
The solution is to make it return the promise and use catch to handle the error and define it yourself. Example
Apparently an error occurred during browser startup and the browser did not launch extensions such as stylish, adblock. I closed the browser and reopened it and my page worked without errors.

'downloads' requires Google Chrome dev channel or newer, and this is the stable channel

I'm making a Chrome extension to automatically offer a saveAs box when clicked. I have found this on the API, but as soon I added the 'downloads' to the premissions I get the warning:
There were warnings when trying to install this extension:
* 'downloads' requires Google Chrome dev channel or newer, and this is the stable channel.
I have no idea what channels are, and how I change them.
What is that? Does that mean that anyone who downloads this extension will also have the headache of changing the channel?
My sample code:
window.onload = function(){
alert(chrome);
alert(chrome.downloads);
chrome.downloads.download(
{url: 'http://www.iana.org/_img/iana-logo-pageheader.png',
saveAs: true
},
function(res){alert(res);});
}
The majority of the users are on the Stable channel, because this is the default.
If you want to use bleeding-edge features, get the Dev or Canary builds. More information on using a different release channel can be found on chromium.org at Chrome Release Channels.

Resources