nfl / react-gpt

A React display ad component using Google Publisher Tag
MIT License
145 stars 84 forks source link

Error: findDOMNode was called on an unmounted component #43

Open ethanselzer opened 7 years ago

ethanselzer commented 7 years ago

I am using react-gpt on React 15.0.1 and In some cases the message below is printed in the console as a warning. It does not seem to interfere with ads. I think the issue may be related to this line in thefoldCheck method. When I set renderWhenViewable false, I do not get the warning. Please let me know your thoughts.

Thank you for creating this very useful component!

Console Message: Ad: Failed to load gpt for //www.googletagservices.com/tag/js/gpt.js Error: findDOMNode was called on an unmounted component. at invariant (webpack:///./~/fbjs/lib/invariant.js?:44:15) at Object.findDOMNode (webpack:///./~/react/lib/findDOMNode.js?:50:21) at Bling.foldCheck (webpack:///./~/react-gpt/lib/Bling.js?:250:79) at Bling.onScriptLoaded (webpack:///./~/react-gpt/lib/Bling.js?:219:22) at From previous event: at Bling.componentDidMount (webpack:///./~/react-gpt/lib/Bling.js?:124:62) at CallbackQueue.notifyAll (webpack:///./~/react/lib/CallbackQueue.js?:66:22) at ReactReconcileTransaction.close (webpack:///./~/react/lib/ReactReconcileTransaction.js?:79:26) at ReactReconcileTransaction.closeAll (webpack:///./~/react/lib/Transaction.js?:202:25) at ReactReconcileTransaction.perform (webpack:///./~/react/lib/Transaction.js?:149:16) at ReactUpdatesFlushTransaction.perform (webpack:///./~/react/lib/Transaction.js?:136:20) at ReactUpdatesFlushTransaction.perform (webpack:///./~/react/lib/ReactUpdates.js?:89:38) at flushBatchedUpdates (webpack:///./~/react/lib/ReactUpdates.js?:165:19) at wrapper (webpack:///./~/react/lib/ReactPerf.js?:66:21) at ReactUpdatesFlushTransaction.close (webpack:///./~/react/lib/ReactUpdates.js?:47:7) at ReactUpdatesFlushTransaction.closeAll (webpack:///./~/react/lib/Transaction.js?:202:25) at ReactUpdatesFlushTransaction.perform (webpack:///./~/react/lib/Transaction.js?:149:16) at ReactUpdatesFlushTransaction.perform (webpack:///./~/react/lib/ReactUpdates.js?:89:38) at Object.flushBatchedUpdates (webpack:///./~/react/lib/ReactUpdates.js?:165:19) at Object.wrapper [as flushBatchedUpdates] (webpack:///./~/react/lib/ReactPerf.js?:66:21) at ReactDefaultBatchingStrategyTransaction.closeAll (webpack:///./~/react/lib/Transaction.js?:202:25) at ReactDefaultBatchingStrategyTransaction.perform (webpack:///./~/react/lib/Transaction.js?:149:16) at Object.batchedUpdates (webpack:///./~/react/lib/ReactDefaultBatchingStrategy.js?:63:19) at Object.enqueueUpdate (webpack:///./~/react/lib/ReactUpdates.js?:194:22)

jdwinall-tm commented 6 years ago

@ethanselzer which version of react-gpt are you using?

ethanselzer commented 6 years ago

@jdwinall-tm - v0.2.5

ajay-padamata commented 6 years ago

Facing the same issue