TypeError: Cannot read property 'host' of undefined
See original GitHub issueGeneral information
- SDK version: tested on 3.81.1 and 3.39.0
- Environment: Sandbox
- Browser and OS: Chrome/71.0.3578.62 on Arch Linux (Kernel Version: 4.19)
Issue description
(node:46) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'host' of undefined
at /app/node_modules/braintree-web/client/get-configuration.js:21:38
at new Promise (<anonymous>)
at getConfiguration (/app/node_modules/braintree-web/client/get-configuration.js:17:10)
at /app/node_modules/@braintree/wrap-promise/wrap-promise.js:17:33
at Function.Client.initialize (/app/node_modules/braintree-web/client/client.js:124:13)
at Object.create (/app/node_modules/braintree-web/client/index.js:38:17)
at Object.create (/app/node_modules/@braintree/wrap-promise/wrap-promise.js:17:33)
at Object.create (/app/node_modules/braintree-web-drop-in/index.js:527:17)
at Object.create (/app/node_modules/@braintree/wrap-promise/wrap-promise.js:17:33)
at VueComponent.createDropIn (pages/index.js:117:68)
at VueComponent.created (pages/index.js:107:10)
at callHook (/app/node_modules/vue/dist/vue.runtime.common.js:2919:21)
at VueComponent.Vue._init (/app/node_modules/vue/dist/vue.runtime.common.js:4628:5)
at new VueComponent (/app/node_modules/vue/dist/vue.runtime.common.js:4796:12)
at createComponentInstanceForVnode (/app/node_modules/vue-server-renderer/build.js:7353:10)
at renderComponentInner (/app/node_modules/vue-server-renderer/build.js:7527:40)
(node:46) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:46) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the
future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hi, i’m facing a small issue which doesn’t affect the web application at all. but thought of leave it on the issues for just in case. Please let me know if more info is needed. Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Node.js TypeError: Cannot read property 'host' of undefined
I think the problem is that you have a typo in config.js . You are using module.export instead of module.exports , so you're...
Read more >Cannot read property 'host' of undefined - WordPress.org
Hi,. I have setup your plugin and added all details up to date. but on my checkout page plugin show Cannot read property...
Read more >Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError: Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >[SOLVED] Cannot Read Property of Undefined in JavaScript
The “cannot read property of undefined” error occurs when you attempt to access a property or method of a variable that is undefined...
Read more >TypeError: Cannot read properties of undefined (reading 'host')
The error is likely because conn.connection is null, and you're trying to access the property host on it. Try logging conn rather than...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
By mock the Braintree calls, I meant, mock the methods.
Example using sinon:
We’ve switched over from global -> window in v3.63.0, which should take care of your issue @saraedum