flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

JX Browser setup: failed to extract chromium binaries

Open kenzieschmoll opened this issue 10 months ago • 1 comments

In trying to initialize JX browser, an exception was thrown here: https://github.com/flutter/flutter-intellij/blob/8a864aa1665b80805ba9094bf3e58ae9f220792c/flutter-idea/src/io/flutter/jxbrowser/EmbeddedBrowserEngine.java#L49

Because the exception is swallowed, we were setting engine to null here: https://github.com/flutter/flutter-intellij/blob/8a864aa1665b80805ba9094bf3e58ae9f220792c/flutter-idea/src/io/flutter/jxbrowser/EmbeddedBrowserEngine.java#L53

We should not be swallowing this exception, because this left JX browser in an unrecoverable state. The solution was to delete the directory that JX Browser was trying to be extracted in rm -rf var/folders/vq/0jb4fqyn6_q03n58xhr8yq4800fv4z/T/JxBrowser/. I only knew this path from the exception thrown above, but this information would not normally be passed along to the end user. We should recover from this state, perhaps adding a button to delete the cache and try again, essentially automating the steps I had to perform manually.

kenzieschmoll avatar Feb 04 '25 21:02 kenzieschmoll

Hi there,

Having the issue here too!

To get it working I had to :

  1. Check in the logs the exact folder that JX browser was trying to be extracted. ( Help > Show Logs)
  2. Delete that folder with rm -r ....
  3. Restart Android Studio

HugoHeneault avatar Mar 03 '25 13:03 HugoHeneault