Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround chrome crash #4310

Merged
merged 2 commits into from Feb 15, 2023
Merged

workaround chrome crash #4310

merged 2 commits into from Feb 15, 2023

Conversation

mifi
Copy link
Contributor

@mifi mifi commented Feb 8, 2023

fixes #4133

…yApi/index.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@arturi
Copy link
Contributor

arturi commented Feb 11, 2023

Can we add an uppy.warn() or maybe even an error + maybe an uppy.info('Drag and drop is not supported, because the page is not secure') when files are dropped, but not added in insecure context? Right now it just silently ignores the drop.

@arturi arturi self-requested a review February 11, 2023 18:24
@mifi
Copy link
Contributor Author

mifi commented Feb 15, 2023

how do you reproduce it silently dropping files? when I test this PR locally with chrome in an insecure context, the if-statement will be false, and it will continue to the next fallback code entry ??= getAsFileSystemHandleFromEntry(item.webkitGetAsEntry(), logDropError). it will still add the files

@arturi
Copy link
Contributor

arturi commented Feb 15, 2023

I think yarn build:lib needed to be run after switching branches. Tested a couple more times placing debugger / console.log in different files and it started working!

@arturi arturi merged commit 8673335 into main Feb 15, 2023
@arturi arturi deleted the workaround-chrome-crash branch February 15, 2023 17:57
@mifi
Copy link
Contributor Author

mifi commented Feb 16, 2023

I never ran yarn build:lib before. I just use npm run dev:with-companion

@KrishnaPG
Copy link

Thank you for this @mifi . How to use this fix (which version of dashboard npm package?)

@mifi
Copy link
Contributor Author

mifi commented Feb 23, 2023

there's no release yet https://github.com/transloadit/uppy/commits/main @arturi

@github-actions github-actions bot mentioned this pull request Mar 7, 2023
github-actions bot added a commit that referenced this pull request Mar 7, 2023
| Package              | Version | Package              | Version |
| -------------------- | ------- | -------------------- | ------- |
| @uppy/audio          |   1.1.0 | @uppy/onedrive       |   3.1.0 |
| @uppy/box            |   2.1.0 | @uppy/provider-views |   3.1.0 |
| @uppy/core           |   3.1.0 | @uppy/screen-capture |   3.1.0 |
| @uppy/dashboard      |   3.3.0 | @uppy/unsplash       |   3.1.0 |
| @uppy/dropbox        |   3.1.0 | @uppy/url            |   3.2.0 |
| @uppy/facebook       |   3.1.0 | @uppy/utils          |   5.1.3 |
| @uppy/google-drive   |   3.1.0 | @uppy/webcam         |   3.3.0 |
| @uppy/image-editor   |   2.1.1 | @uppy/zoom           |   2.1.0 |
| @uppy/instagram      |   3.1.0 | uppy                 |   3.6.0 |
| @uppy/locales        |   3.0.7 |                      |         |

- @uppy/locales: add missing entries after build (Murderlon)
- @uppy/dashboard: update provider icon style (Alexander Zaytsev / #4345)
- @uppy/core: fix uppy.resetProgress() (Artur Paikin / #4337)
- @uppy/core: fix some types (Antoine du Hamel / #4332)
- @uppy/core: Fixed type of State.info to match reality being an array of info objects (Marc Bennewitz / #4321)
- @uppy/image-editor: Fix TypeScript error in image-editor types (Matthias Kunnen / #4334)
- meta: improve `importFromUploadURLs` docs (Mikael Finstad / #4323)
- @uppy/utils: workaround chrome crash (Mikael Finstad / #4310)
f2c-ci-robot bot pushed a commit to halo-dev/halo that referenced this pull request Mar 8, 2023
#### What type of PR is this?

/kind bug

#### What this PR does / why we need it:

修复在非安全情况下(非 HTTPS 环境或本地环境),在 [Chromium](https://www.chromium.org/) 内核的浏览器下拖拽文件上传出现浏览器崩溃的问题。

修复来源:

- https://github.com/transloadit/uppy/releases/tag/uppy%403.6.0
- transloadit/uppy#4310

#### Which issue(s) this PR fixes:

Fixes #3017

#### Screenshots:

before:

![2023-03-08 10 59 02](https://user-images.githubusercontent.com/21301288/223609341-222f62d2-630a-4ee8-ba8f-2fb3c78fcca7.gif)

after:

![2023-03-08 11 00 06](https://user-images.githubusercontent.com/21301288/223609353-857f6559-cc9c-482f-9b46-713430621bb6.gif)

#### Special notes for your reviewer:

测试方式:

1. 需要先执行 `make -C console install` 以更新 Console 的依赖。
2. 使用非 localhost 或者 127.0.0.1 访问 Halo 后台,本地环境可以使用 192.168.x.x 访问。
3. 在 Console 的附件管理测试拖拽文件上传,观察浏览器是否崩溃。

#### Does this PR introduce a user-facing change?

```release-note
修复非 HTTPS 环境下,在 Chromium 内核浏览器拖拽上传文件时出现浏览器崩溃的问题。
```
f2c-ci-robot bot pushed a commit to halo-dev/console that referenced this pull request Mar 8, 2023
#### What type of PR is this?

/kind bug

#### What this PR does / why we need it:

修复在非安全情况下(非 HTTPS 环境或本地环境),在 [Chromium](https://www.chromium.org/) 内核的浏览器下拖拽文件上传出现浏览器崩溃的问题。

修复来源:

- https://github.com/transloadit/uppy/releases/tag/uppy%403.6.0
- transloadit/uppy#4310

#### Which issue(s) this PR fixes:

Fixes halo-dev/halo#3017

#### Screenshots:

before:

![2023-03-08 10 59 02](https://user-images.githubusercontent.com/21301288/223609341-222f62d2-630a-4ee8-ba8f-2fb3c78fcca7.gif)

after:

![2023-03-08 11 00 06](https://user-images.githubusercontent.com/21301288/223609353-857f6559-cc9c-482f-9b46-713430621bb6.gif)

#### Special notes for your reviewer:

测试方式:

1. 需要先执行 `make -C console install` 以更新 Console 的依赖。
2. 使用非 localhost 或者 127.0.0.1 访问 Halo 后台,本地环境可以使用 192.168.x.x 访问。
3. 在 Console 的附件管理测试拖拽文件上传,观察浏览器是否崩溃。

#### Does this PR introduce a user-facing change?

```release-note
修复非 HTTPS 环境下,在 Chromium 内核浏览器拖拽上传文件时出现浏览器崩溃的问题。
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dropping file crashes browser tab with RESULT_CODE_KILLED_BAD_MESSAGE message
4 participants