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

Likely incompatibility with NSSM and WinSW #222

Open
boganiLuca opened this issue Jun 23, 2023 · 0 comments
Open

Likely incompatibility with NSSM and WinSW #222

boganiLuca opened this issue Jun 23, 2023 · 0 comments

Comments

@boganiLuca
Copy link

boganiLuca commented Jun 23, 2023

This is more a warning for other people than a request for solving the issue, since these errors provided almost zero results on the web.

I've been struggling to start a Flutter Windows app as a service using NSSM or WinSW, but, in both cases, the service-part was carried out perfectly by those app, but the Flutter app instead outputted this lines:

[ERROR:flutter/shell/platform/windows/direct_manipulation.cc(201)] manager_->Activate(window_->GetWindowHandle()) failed
ERR: SwapChain11.cpp:636 (reset): Could not create additional swap chains or offscreen surfaces, HRESULT: 0x887A0022
ERR: SwapChain11.cpp:636 (reset): Could not create additional swap chains or offscreen surfaces, HRESULT: 0x887A0022
ERR: SwapChain11.cpp:643 (reset): Device lost in SwapChain11::reset HRESULT: 0x887A0022, reason: HRESULT: 0x00000000
ERR: SwapChain11.cpp:643 (reset): Device lost in SwapChain11::reset HRESULT: 0x887A0022, reason: HRESULT: 0x00000000
[ERROR:flutter/shell/platform/windows/angle_surface_manager.cc(15)] EGL: Surface creation failed.
[ERROR:flutter/shell/platform/windows/angle_surface_manager.cc(16)] EGL: eglGetError returned 12302
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(121)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(43)] Could not make the context current to set up the Gr context.
[ERROR:flutter/shell/gpu/gpu_surface_gl_skia.cc(81)] Could not make the context current to set up the Gr context.
[ERROR:flutter/shell/common/platform_view.cc(75)] Failed to create platform view rendering surface

With some research, I discovered this happened somewhere in between the runApp main Flutter command and the subsequent doWhenWindowReady of this package. No matter what I tried, the Flutter app ran just fine, with all the initializations getting done before the runApp, but it got stuck after that.
I started then removing stuff from my Flutter app, and the first thing was this package, of course: I commented out the doWhenWindowReady part, made it so that the app showed a GUI of 1x1 pixel with transparent color (in order to simulate a GUI-less service), and, voilà, the invisible app was started just fine (my logger and print commands confirmed this), although the above errors were still there.

So, be aware that until something changes, this package is not likely to work with NSSM or WinSW (and probably, with other software like them)

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

No branches or pull requests

1 participant