Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example not working on Windows 😁 #151

Closed
YazeedAlKhalaf opened this issue Dec 28, 2020 · 6 comments · Fixed by #153
Closed

Example not working on Windows 😁 #151

YazeedAlKhalaf opened this issue Dec 28, 2020 · 6 comments · Fixed by #153

Comments

@YazeedAlKhalaf
Copy link

YazeedAlKhalaf commented Dec 28, 2020

This is what I did, also tried running build_runner command but no luck.

I use Flutter so does that make some problem for the environment?

PS C:\Users\yazee\Desktop\hello> dart run .\bin\server.dart
Unhandled exception:
SignalException: Failed to listen for SIGTERM, osError: OS Error: The request is not supported.
, errno = 50

Dart Version

PS C:\Users\yazee> dart --version
Dart SDK version: 2.12.0-141.0.dev (dev) (Thu Dec 10 06:04:48 2020 -0800) on "windows_x64"
@subfuzion
Copy link
Member

subfuzion commented Dec 28, 2020

Hmm, Windows doesn't appear to support SIGTERM ... therefore, it seems like the mere act of trying to register a signal handler fails. This is a devex issue for Windows since it will work on Linux in the container that gets deployed. We can fix by detecting if we're on Windows before attempting to register the handler.

@subfuzion
Copy link
Member

@YazeedAlKhalaf Did you run pub get first?
@kevmoo Are there any issues you're aware of using build_runner on Windows with a Flutter-only install?

@YazeedAlKhalaf
Copy link
Author

@subfuzion Yes, I did run pub get. It works fine when using docker but otherwise, it crashed with the exception above.

I believe it will be fixed once your pull request is merged?

@subfuzion
Copy link
Member

@kevmoo Need a Windows expert to weigh in on this. While the exception would seem to indicate that SIGTERM isn't supported, I found this old Microsoft doc that seems to indicate that SIGTERM is supported. 🤷🏻‍♂️

@subfuzion
Copy link
Member

@YazeedAlKhalaf Yeah, it works with Docker since the container actually runs in a Linux VM. As to my PR, it's just a proposed fix -- but I'm not entirely certain about it and want someone with Windows expertise to review. According to this doc, Windows includes SIGTERM for ANSI compatibility.

@YazeedAlKhalaf
Copy link
Author

YazeedAlKhalaf commented Dec 28, 2020

Really weird, anyway. I can confirm the fix works and I edited the pub cache with your edits and it now runs on my windows machine! 🚀

Thanks a lot 🚀 @subfuzion

idk about the performance wise thing but it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants