bitsdojo / bitsdojo_window

A Flutter package that makes it easy to customize and work with your Flutter desktop app window.
http://www.youtube.com/watch?v=bee2AHQpGK4
MIT License
815 stars 229 forks source link

Error waiting for a debug connection: The log reader stopped unexpectedly, or never started. #157

Closed YowFung closed 2 years ago

YowFung commented 2 years ago

A duplication of https://github.com/flutter/flutter/issues/101168 .

joaovperin commented 2 years ago

Same issue here... But when building on release mode, the window doesn't open and the app suddenly crashes.

I'm using Windows 11 and it doesn't happens on Win 10.

devNamanG commented 2 years ago

Same here! Did anyone find a solution?

devNamanG commented 2 years ago

I suppose there is some exception being thrown while the window is getting created or when the flags are set

devNamanG commented 2 years ago

I'm using Windows 11 and it doesn't happens on Win 10.

Which win 11 build @joaovperin ?

joaovperin commented 2 years ago

I'm using Windows 11 and it doesn't happens on Win 10.

Which win 11 build @joaovperin ?

Well, I keep the system always updated, so I tried in a lot, but can't retrieve now because it has passed some time. But I found a workaround.

The bug was happening because of these lines on main.c :

#include <bitsdojo_window_windows/bitsdojo_window_plugin.h>
auto bdw = bitsdojo_window_configure(BDW_CUSTOM_FRAME | BDW_HIDE_ON_STARTUP);

I just removed them and implemented some manual workaround. At win32_window.cpp, set these flags:

WS_POPUP | WS_THICKFRAME (in place of the default WS_OVERLAPPEDWINDOW | WS_VISIBLE at the HWND window = CreateWindow(...) call.

And don't forget to set window visible at main.dart, just after calling runApp:

 // Configure the main Window
  AppWindow.doWhenWindowReady(() {
    appWindow.size = const Size(1280, 720.0);
    appWindow.minSize = const Size(500, 720.0);
    appWindow.title = 'Your Title';
    appWindow.alignment = Alignment.center;
    appWindow.show();
  });

I think it should do the trick for you. But I strongly recommend you to stop using this lib, as long as it looks no longer being actively mantained.

devNamanG commented 2 years ago

Okay great! Thank you very much @joaovperin , I really appreciate your help! Which lib did you migrate to then? I don't think there are any alternatives as of now for flutter other than self implementing such a package (Or forking this and updating the fork)

bitsdojo commented 2 years ago

@namangor04 I have been away in the last months taking care of a health problem that kept me from doing any significant work.

I have lots of changes on the private branch that I need to merge to the public branch and you will see more of those in the next weeks.

devNamanG commented 2 years ago

@bitsdojo I'm so sorry to hear about that, Take Rest and Get Well Soon 💐. Thank you for this amazing package though! We have been using it since about a year or so and it has worked great! This is the only issue we have faced. No problem though, please take good care of your health, Thank you for the prompt reply!

joaovperin commented 2 years ago

@namangor04 I didn't migrate yet. I was studying a few other libs, but I decided to keep using this until I have time to implement my own code, because I want to support some Windows 7 users.

@bitsdojo hope you're fine now! And thanks for answering, I thought the lib was being abandoned. So take a rest and come back when you're ready!

devNamanG commented 2 years ago

I decided to keep using this until I have time to implement my own code, because I want to support some Windows 7 users.

@joaovperin You can check out this PR as it adds support for Windows 7 and early windows 10.

And this PR fixes the current issue!

YowFung commented 2 years ago

@bitsdojo I'm glad you're back!

joaovperin commented 2 years ago

Hey @bitsdojo, any progress here? The issue was completed, but the PRs weren't merged yet.

https://github.com/bitsdojo/bitsdojo_window/pull/134 fix this issue, please merge it a.s.a.p! And https://github.com/bitsdojo/bitsdojo_window/pull/100 would be great also.

If you need some help to maintain this lib, let us know. But please, don't let the project die.

devNamanG commented 2 years ago

@bitsdojo please merge #134 and #100 as soon as possible. They fix critical issues which are affecting us!

devNamanG commented 2 years ago

@YowFung please reopen this issue!

devNamanG commented 2 years ago

Thank you very much @YowFung ! :)

devNamanG commented 2 years ago

Please merge #197 so that this issue can be closed @bitsdojo . Thank you! :)

bitsdojo commented 2 years ago

@bitsdojo please merge #134 and #100 as soon as possible. They fix critical issues which are affecting us!

I hear you. Just pushed 0.1.5. Feel free to re-open if you encounter any issues.

devNamanG commented 2 years ago

Thank you very much mate! :)

martemorfosis commented 1 year ago

Hello @bitsdojo.

I still had to make the manual changes that @joaovperin suggested in order to make my app work on Windows 11 (it was showing just a blank window. On Windows 10 it was working fine tho.)

BTW I'm using version 0.1.15 of the plugin.

bitsdojo commented 1 year ago

Thank you for reporting. I will try it on my side and see what I can do about it.