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

Bug in release mode #63

Open
reisclaudio opened this issue Jun 6, 2023 · 8 comments
Open

Bug in release mode #63

reisclaudio opened this issue Jun 6, 2023 · 8 comments

Comments

@reisclaudio
Copy link

I'm trying to pass a url by parameter and passing that parameter through initstate. In debug mode it works. however, when compiling the program, it calls the url of the parameter and then redirects to the default url (in this case, flutter.dev), would there be a solution for this?

@waqadArshad
Copy link

Hi, is this resolved? @reisclaudio

@reisclaudio
Copy link
Author

Hi @waqadArshad! Not yet, I tried several ways but in release mode it doesn't work.

@waqadArshad
Copy link

@reisclaudio Sorry to hear that. Given that it is actively in development, hopefully, this would be resolved soon.

@hlwhl @BullsEye34 Please take a look at this whenever you can. Thanks

@hlwhl
Copy link
Owner

hlwhl commented Jun 22, 2023

It's a timing issue. We need add an init done callback when OnContextInitialized called.

void WebviewApp::OnContextInitialized() {
CEF_REQUIRE_UI_THREAD();
// Specify CEF browser settings here.
CefBrowserSettings browser_settings;
browser_settings.windowless_frame_rate = 60;
std::string url = "https://www.flutter.dev/";
CefWindowInfo window_info;
window_info.SetAsWindowless(nullptr);
// Create the first browser window.
CefBrowserHost::CreateBrowser(window_info, m_handler, url, browser_settings,
nullptr, nullptr);
}

@hlwhl
Copy link
Owner

hlwhl commented Jun 22, 2023

@reisclaudio @waqadArshad You may change the default URL here as a temp solution.

std::string url = "https://www.flutter.dev/";

@reisclaudio
Copy link
Author

OK. The temporary solution doesn't work for me. I'll wait for updates, thanks for the answers

@kuangruan
Copy link

@reisclaudio My workaround is to delay execution of _controller.loadUrl();

Wait for the WebView to be initialized

@bahricanyesil
Copy link

Any updates or workaround? @reisclaudio @kuangruan

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

No branches or pull requests

5 participants