Closed barneycarroll closed 7 years ago
This isn't a blocking problem BTW - resolves itself if I reboot.
Could you check if there's a ghost process of chrome running in task manager?
I'll just answer more thoroughly meanwhile ;)
The desired behavior is to not close chrome if the wright process terminates. The reason is that I usually end up opening other tabs in the same window, I'm still not sure it's worth it taking the edge cases reattaching brings into account, but so far it looked possible :)
It should also be possible to run multiple projects at the same time.
There's a specific user-data-dir set for each project depending on the name in config which currently is either a name specified in options or the name of the containing folder.
I wanted to change that by putting a hash of the absolute path on the end of the chrome user-data-dir to resolve name conflicts as there is probably a lot of cases where the containing folder is named "web" or "www".
I imagine it is something like this you bump into together with a stuck chrome instance.. I'll just try it out on windows myself as it might behave a bit differently than on mac.
Unfortunately it seems like an issue with how chrome on windows is reattaching to a running process. With this issue chrome was actually meant to launch two seperate instances, but somehow locks up to the previous one causing it to leave a hanging process that can't be revived (only visible in task manager).
This commit fixes it temporarily on windows but with the downside that chrome will exit when wright exits. (ok as long as you don't have interesting stuff in your app state or something open in other tabs.)
On win32, if I terminate the node instance, the Chrome instance persists. Executing a wright script in another location (from the same shell instance) seemed to lock onto the old instance from the new location, complaining that it couldn't find files pertinent to the previous instance.
After terminating the terminal and the chrome instance, attempting to invoke a wright script again waits for chrome to launch for 30 seconds, finally complaining that it couldn't resolve
http://localhost:3001/json/list
.My wright file, which worked in a previous session with no code changes or dependency updates in the interim: