Closed renatoargh closed 8 years ago
Wow, thanks! Took us forever to figure out the source of the problem - and we ended up removing connectDomain()
altogether. Definitely worth fixing / mentioning in the README.
In our case, we could load views & assets once, but every request after that first page would just hang there.
:+1: glad I checked the issues first!
Thank you so much !
In my case, calls to an external API was only working once.
To solve the issue I had to move it after app.use(app.router)
just before my route declarations.
Thank you all for this info. It's really helpful. I also agree the README file should be updated to mention this.
Same bug for me, and it wasn't static files, it was standard routes. When I moved connectDomain after app.use(app.router) like sebz, it worked. Seems like a bug to me ! (moreover since connect-domain is there to catch the errors thrown during the router work, it more natural to put it before it ; even if this won't change anything since the asynchronous errors will be thrown later anyway)
I stand corrected, the bug is fixed by putting connectDomain after app.use(app.router), but now asynch errors are not caught anymore.
If I can't fix this bug, i'll have to remove connect-domain...
The requests that don't answer are the PUT requests. The GET work correctly.
+1
Some requests sometimes (not every time) just fail. Removing connectDomain fixes it…
Any news on this issue dear developers ? I'm not using connectDomain because of this, it seems like a shame.
I had similar problems, and after a few hours I gave up trying to diagnose it. In the end I used another (more popular) module called express-domain-middleware. Works for me :)
Still appreciate baryshev's work, despite the probs.
@renatoargh Why did you close this ? connect-domain is unusable for us because of this bug (or the related one with standard routes)
I closed this by inactivity (not being closed by the developers) - and also because it was polluting my issues feed. I think it is more appropriate to open a new one and reference it here if it still applies to you!
Hi guys, this is not exatcly an issue (but a misuse maybe), so I am creating this issue to keep documented so other folks may not struggle and get stucked like me.
Requests like
myapp.com/js/jquery.js
were simply hanging forever in the server not allowing my page to be fully rendered, was not even getting error404
. And the most crazy part was that sometimes it worked sometimes not. At a totally random fashion.My code before (with problems):
Then I solved by pulling connectDomain some lines down the stack:
Maybe its worth adding this info at the readme file.