Uncaught (in promise) https://extensionpay.com/home ExtPay.js:1468 #187
-
Hello all! I am currently working on implementing extpay into my chrome extension. As said in the title, when I call for the login or payment page I get this error: Uncaught (in promise) https://extensionpay.com/home Any help or recommendations to improve my code would be greatly appreciated. Below are the files I have extpay interacting with in my code: background.js: (most of extpay is the first couple lines, additional extpay stuff at very bottom.)
Content.js: (i've not included the bulk of the code as it isn't relevent to this problem)
popup.html: (I don't imagine there is much use for this as the buttons work properly, two buttons that are used for extpay are loginBtn and payBtn)
popup.js: (extpay stuff is the bottom two event listeners)
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Those methods might return promises. Try waiting for the promise to resolve before sending a response back. Also, you don't need to add so many |
Beta Was this translation helpful? Give feedback.
-
Hey Graham, one thing that seems important is this: Also as @burkybang said, you can just call |
Beta Was this translation helpful? Give feedback.
Those methods might return promises. Try waiting for the promise to resolve before sending a response back.
Also, you don't need to add so many
chrome.runtime.onMessage.addListener()
s. Just add one and use ifs or a switch statement in the callback.