konveyor / move2kube-ui

An UI for interacting with Move2Kube API
https://move2kube.konveyor.io/
Apache License 2.0
10 stars 14 forks source link

bug: Google Chrome crashes when trying to upload a file in our UI #137

Closed HarikrishnanBalagopal closed 1 year ago

HarikrishnanBalagopal commented 1 year ago

Bug

Overview

Google Chrome updated over night and now the browser crashes when trying to upload a file in the UI. Note: We can still upload a file by dragging and dropping the file. The crash only occurs when clicking the Browse button. Both Firefox and Safari still work correctly. Crash is only in this specific version of Chrome. It's not just the tab that crashes, the browser itself crashes and the window gets closed.

Relevant code

https://github.com/konveyor/move2kube-ui/blob/4a5da95b2005ae18d7d1743c19817b7bf82aeccf/src/features/inputs/Inputs.tsx#L232-L255

Steps to reproduce

  1. Start the UI docker run --rm -it -p 8080:8080 quay.io/konveyor/move2kube-ui
  2. Go to http://localhost:8080 using Google Chrome (Version 111.0.5563.64 (Official Build) (x86_64)) on MacOS Monterey 12.6
  3. Create a workspace and a project
  4. Try to upload a file by clicking the Browse button

Expected behaviour

Google Chrome should not crash. It should allow you to upload the file. Firefox and Safari handle this correctly.

Actual behaviour

Google Chrome crashes immediately after clicking the Browse button.

Screenshots

image

Version info

CLI
version: latest+unreleased
gitCommit: 7b836fbf9c14a45442b6982dc5cc9c8b02014cd7
gitTreeState: clean
goVersion: go1.18
platform: linux/amd64

API
version: latest+unreleased
gitCommit: 67fd5820cad4122e5c6d79f67cd179db00397a2a
gitTreeState: clean
goVersion: go1.18
platform: linux/amd64

UI
version: latest
gitCommit: 4a5da95b2005ae18d7d1743c19817b7bf82aeccf
gitTreeState: clean

Docker
docker socket is not mounted
HarikrishnanBalagopal commented 1 year ago

Have reported the issue to Chrome team.

HarikrishnanBalagopal commented 1 year ago

Seems to have been fixed in the latest Google Chrome version

Version 111.0.5563.110 (Official Build) (x86_64)

As mentioned earlier, this bug was happening on the older version

Version 111.0.5563.64 (Official Build) (x86_64)
ashokponkumar commented 1 year ago

Yes, its no longer crashing.

HarikrishnanBalagopal commented 1 year ago

Filed a bug against the older version of Chromium just in case https://bugs.chromium.org/p/chromium/issues/detail?id=1427166

HarikrishnanBalagopal commented 1 year ago

Tracked in https://bugs.chromium.org/p/chromium/issues/detail?id=1423362 and fixed in latest Chrome releases.

What steps will reproduce the problem?
(1) Create an HTLM document with an `input` element of type `file` with `accept="..json"`. See https://gist.github.com/TomSellers/4e27a513d645a02340ea9ca941a4640d

(2) Open the document

(3) click the input element

What is the expected result?

Dialog prompt.

What happens instead?

Browser crashes entirely.

Please provide any additional information below. Attach a screenshot if
possible.

Setting the value of `accept` to `.json` or `.gz` doesn't not cause a crash.