-
Notifications
You must be signed in to change notification settings - Fork 75
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
server example not working on Deno 2 and OS X #182
Comments
Same here! It would be awesome to sort out to build and serve mini Vue apps. |
same here on windows |
Same here on Linux. I am currently using WebUI as an alternative, which isn't ideal for my purposes but works. |
This is most likely due to #149 (comment) and has been an issue for a while. Could also be because the webview run method is blocking on the main thread (never allowing the JS event loop to step), and therefor a potential server needs to be run on a separate worker (thread). |
That's a helpful pointer! Would you perhaps have an example of how to run the server on a worker thread to get it to work? |
This wouldn't explain the problem existing on Windows or Linux platforms, since they're not bound by that requirement to have UI code on the main thread. I understand the issue's title relates to macOS specifically, however. Maybe a separate issue should be created for the other operating systems too? As for having a worker, that would only be a hackfix for what is essentially a regression (in the case of Windows and Linux operating systems). I'm of the opinion that a worker is unnecessary, and that Deno 2 (or maybe a newer version of the webview library?) simply introduced breaking changes, so the library should be updated accordingly. |
Agreed, but it is an issue with the underlying webview library: webview/webview#578 |
It seems like the webview causes the program to hang and not serve any HTTP responses, nor show any output in the wevbiew.
Steps to reproduce:
$ deno -version deno 2.0.2 $ uname -a Darwin studio.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64 $ deno run -Ar --unstable examples/server.ts Listening on http://localhost:8080/
The webview window shows a blank screen. Furthermore the server is unresponsive:
The text was updated successfully, but these errors were encountered: