go-flutter-desktop / go-flutter

Flutter on Windows, MacOS and Linux - based on Flutter Embedding, Go and GLFW.
https://hover.build/
BSD 3-Clause "New" or "Revised" License
5.84k stars 286 forks source link

Fix VersionUnavailable warning #662

Closed bltavares closed 2 years ago

bltavares commented 2 years ago

When building an app on hover, we are getting the following error

GLFW: An uncaught error has occurred: VersionUnavailable: NSGL: Failed to create OpenGL context

This is happening when the Resource Window is created in background. The Version hint requirements is being reverted to the initial values after we create the main window, so the resource window does not have a version hint set.

This commit calls the global version hint code after we reset it, to ensure the resource window have it set.

This fixes the warning, but it's not the actual root-cause to the Flutter 3.0 errors. It is another warning that is misleading the investigation on that bug.