Open alper-batioglu opened 1 year ago
It seems the DNS layer is not working in native node webcontainer
@alper-batioglu refer to this answer of webcontainer maintainer https://github.com/stackblitz/webcontainer-core/issues/1106#issuecomment-1602232609
we don't support databases like Mongo out of the box, b/c that would require something akin to low-level networking in the browser (e.g. TCP/UDP sockets, DNS, etc.), which don't currently exist. We are thinking about ways around this, but we don't have any concrete roadmap about it. If you're interested, we can leave this open as a venue for updates in case anything changes.
Describe the bug Hello, I am trying testing mongoDB connection from a webcontainer. But i was unable to get it working. After debugging I saw it gets stuck in dns.promises.resolveSrv call. It does not get resolved nor gets rejected. I checked the documentation and nothing mentions about native node limitations. So, I wonder if this is a bug or are there limitations.
To Reproduce Steps to reproduce the behavior:
dns.promises.resolveSrv('_mongodb._tcp.cluster0.cb93mrj.mongodb.net').then(() => console.log('then')).catch(() => console.log('catch'));
console.log(
Hello Node.js v${process.versions.node}!
); setTimeout(() => console.log('time is up :('), 5000);