As mentioned in this thread that was prematurely closed
https://twittercommunity.com/t/destroy-widgets-in-single-page-app/83050
This component is being loaded on a React page with https://github.com/andrewsuzuki/react-twitter-widgets
When a Timeline widget is loaded then you change pages and go to a different page with another Timeline widget that get loaded a number of errors occur
On the initial page load everything is fine. The console outputs the following
notifyapi LOADED.
connecting to mothership...
==> Current connections: 0
Sent request
DET twitter timeline loaded. # This is my onLoad console.log.
When I proceed to switch pages, on page change I receive an out put in my console of the following
XHR failed loading: GET "https://platform.twitter.com/a535cd8623558445f32839316318f3c2844eb385d3850a55af36dc5ecbfe16ea/p/1490628239".
connectToMothership @ VM39081 ns.js:613
(anonymous) @ VM39081 ns.js:659
(anonymous) @ VM39081 ns.js:671
XMLHttpRequest {readyState: 4, timeout: 0, withCredentials: false, upload: XMLHttpRequestUpload, responseURL: ""…}
request finished and response is ready
req.status: 0
Request cancelled - connect to mothership again
My sources tab shows twitter-widget-2, twitter-widget-3 being removed while rufous-sandbox stays.
The page in which I moved to also has a twitter Timeline widget and it gets loaded twice, just w/o any of the initial page load console output. Instead I get a number of errors
Uncaught (in promise) Error: sandbox not initialized at t.addRootClass (widgets.js)
After the errors I get the remaining console logs.
This does not occur with the Follow button widget. Just the Timelines
Any idea what may be causing this?
Thanks