flutter / flutter/flutter-intellij

JX Browser setup: failed to extract chromium binaries

Open
#7,926 1 comment 0 reactions 1 assignee Claimed by @helin24 View on GitHub
devtools-integration jxbrowser P2
Dominant language
Java
Stars
2k
Forks
356
Avg merge
1d 11h
Merged PRs (30d)
27

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.