zserge / lorca

Build cross-platform modern desktop apps in Go + HTML5
MIT License
8k stars 532 forks source link

Gracefully quit the browser instance when Close is called #155

Open phanirithvij opened 3 years ago

phanirithvij commented 3 years ago

Can the browser be closed gracefully instead of quitting abruptly?

chromedp has it implemented

I'm requesting it because the examples, when run with the same user-data-directory over multiple runs instead of using temporary ones and discarding each time, led to the following issue:

image

The second one opens saying chrome/browser crashed in the previous run.

hassandraga commented 3 years ago

True, Lorca should do the same as WebUI. https://github.com/alifcommunity/webui

williamleecn commented 2 years ago

fixed it by:

os.Remove("./tmp/Default/Preferences")

ui, err := lorca.New("", "./tmp", 480, 320, args...)