Open ak-org opened 8 years ago
Thanks for the bug report. I need some more info before I can reproduce this:
setTimeout()
?I know it has been awhile since this issue was created. I spent the day digging into what is actually going on here. I have learned that meteor bundles a number of browserify modules and stubs them in as needed. I think that something in that process is slightly broken or at least different enough from how the browserify tool works to break the req.setTimeout and req.abort.
I've created a minimal reproduction repo here: https://github.com/TechplexEngineer/meteor-http-browserify-repro/tree/master
And filed a related issue here: https://github.com/meteor/node-stubs/issues/9
Any thoughts or insights would be appreciated.
Thank you for taking the time to make the test case. We will look into it!
The same issue is true within react native. I have proposed a solution here: https://github.com/spark/softap-setup-js/issues/40.
My guess, and I haven't looked into this, is that meteor is probably using http-browserify which provides a "http" implementation for the browser. Their implementation does not provide the setTimeout function. This is similar to how in react native "react-native-http" provides the "http" implementation and it also does not provide the setTimeout function.
HttpSoftAP.js:42 Uncaught TypeError: req.setTimeout is not a function_sendProtocolCommand @ HttpSoftAP.js:42__sendCommand @ SoftAP.js:182deviceInfo @ SoftAP.js:73getDeviceInfo @ searchMotiWifi.js:220clickMyWifiIsMoti @ searchMotiWifi.js:77(anonymous function) @ template.js:496Template._withTemplateInstanceFunc @ template.js:465(anonymous function) @ template.js:495(anonymous function) @ view.js:884Blaze._withCurrentView @ view.js:538(anonymous function) @ view.js:883(anonymous function) @ events.js:47dispatch @ jquery.js:4665elemData.handle @ jquery.js:4333
Env :Meteor 1.4 Softap-setup library version: latest