-
Notifications
You must be signed in to change notification settings - Fork 425
fix(upload): fix download() locks main thread on Android #2838
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
fix(upload): fix download() locks main thread on Android #2838
Conversation
Package Changes Through 9549d50There are 8 changes which include barcode-scanner with minor, barcode-scanner-js with minor, upload with patch, upload-js with patch, window-state with minor, window-state-js with minor, fs with patch, fs-js with patch Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
3d030df
to
578625a
Compare
Tested upload demo on the following platforms:
Verified no locking of the main (UI) thread occurs when downloading or uploading. ^ When testing on Windows, I ran into the issues described in #2852. Switching to the Brownfield pattern in a local branch allowed me to test and validate the behavior was correct. |
@lucasfernog Fixed this issue. FYI - I noticed mobile support isn't added in the example project; I had to manually run |
Added tests for |
e011f5f
to
87c344a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the pr just a nitpick annotated and we'll also need a changefile :) (check .changes dir for examples)
8fb9ad0
to
667a0d2
Compare
Thanks for the review @FabianLars! Just pushed a commit to resolve your comments. |
f93d2d5
to
2cd12e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks :)
amazing PR! |
 <h3>Snyk has created this PR to upgrade @tauri-apps/plugin-dialog from 2.2.2 to 2.3.1.</h3> :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project. <hr/> - The recommended version is **2 versions** ahead of your current version. - The recommended version was released **25 days ago**. <details> <summary><b>Release notes</b></summary> <br/> <details> <summary>Package name: <b>@tauri-apps/plugin-dialog</b></summary> <ul> <li> <b>2.3.1</b> - <a href="https://redirect.github.com/tauri-apps/plugins-workspace/releases/tag/upload-v2.3.1">2025-07-20</a></br><h2>[2.3.1]</h2> <ul> <li><a href="https://redirect.github.com/tauri-apps/plugins-workspace/commit/b7292030594daa04e78979214478031241b6e38e"><code>b7292030</code></a> (<a href="https://redirect.github.com/tauri-apps/plugins-workspace/pull/2838" data-hovercard-type="pull_request" data-hovercard-url="/tauri-apps/plugins-workspace/pull/2838/hovercard">#2838</a> by <a href="https://redirect.github.com/tauri-apps/plugins-workspace/../../velocitysystems">@ velocitysystems</a>) Fix <code>download</code> and <code>upload</code> locks main thread on Android.<br> Use Tokio to spawn task when invoking commands.</li> </ul> <details> <summary><em><h4>Cargo Publish</h4></em></summary> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Updating crates.io index Packaging tauri-plugin-upload v2.3.1 (/home/runner/work/plugins-workspace/plugins-workspace/plugins/upload) Updating crates.io index Packaged 25 files, 206.3KiB (86.1KiB compressed) Uploading tauri-plugin-upload v2.3.1 (/home/runner/work/plugins-workspace/plugins-workspace/plugins/upload) Uploaded tauri-plugin-upload v2.3.1 to registry `crates-io` note: waiting for `tauri-plugin-upload v2.3.1` to be available at registry `crates-io`. You may press ctrl-c to skip waiting; the crate should be available shortly. Published tauri-plugin-upload v2.3.1 at registry `crates-io`"><pre class="notranslate"><code>Updating crates.io index Packaging tauri-plugin-upload v2.3.1 (/home/runner/work/plugins-workspace/plugins-workspace/plugins/upload) Updating crates.io index Packaged 25 files, 206.3KiB (86.1KiB compressed) Uploading tauri-plugin-upload v2.3.1 (/home/runner/work/plugins-workspace/plugins-workspace/plugins/upload) Uploaded tauri-plugin-upload v2.3.1 to registry `crates-io` note: waiting for `tauri-plugin-upload v2.3.1` to be available at registry `crates-io`. You may press ctrl-c to skip waiting; the crate should be available shortly. Published tauri-plugin-upload v2.3.1 at registry `crates-io` </code></pre></div> </details> </li> <li> <b>2.3.0</b> - 2025-06-25 </li> <li> <b>2.2.2</b> - 2025-05-20 </li> </ul> from <a href="https://redirect.github.com/tauri-apps/plugins-workspace/releases">@tauri-apps/plugin-dialog GitHub release notes</a> </details> </details> --- > [!IMPORTANT] > > - Check the changes in this PR to ensure they won't cause issues with your project. > - This PR was automatically created by Snyk using the credentials of a real user. --- **Note:** _You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs._ **For more information:** <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiI1YzRiYzliOC02NjRjLTQ5MzMtOWQ3NC00ZGVlMDE0NzY1ZDMiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjVjNGJjOWI4LTY2NGMtNDkzMy05ZDc0LTRkZWUwMTQ3NjVkMyJ9fQ==" width="0" height="0"/> > - 🧐 [View latest project report](https://app.snyk.io/org/blankll/project/d19c39b4-9b25-4232-b09a-2d71e94c8a24?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 📜 [Customise PR templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template) > - 🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/blankll/project/d19c39b4-9b25-4232-b09a-2d71e94c8a24/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 🔕 [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.snyk.io/org/blankll/project/d19c39b4-9b25-4232-b09a-2d71e94c8a24/settings/integration?pkg=@tauri-apps/plugin-dialog&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades) [//]: # 'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"@tauri-apps/plugin-dialog","from":"2.2.2","to":"2.3.1"}],"env":"prod","hasFixes":false,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":[],"prId":"5c4bc9b8-664c-4933-9d74-4dee014765d3","prPublicId":"5c4bc9b8-664c-4933-9d74-4dee014765d3","packageManager":"npm","priorityScoreList":[],"projectPublicId":"d19c39b4-9b25-4232-b09a-2d71e94c8a24","projectUrl":"https://app.snyk.io/org/blankll/project/d19c39b4-9b25-4232-b09a-2d71e94c8a24?utm_source=github&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":[],"type":"auto","upgrade":[],"upgradeInfo":{"versionsDiff":2,"publishedDate":"2025-07-20T21:41:14.635Z"},"vulns":[]}' Co-authored-by: snyk-bot <[email protected]>
Fixed:
#2593
Key Changes
upload
methoddownload
orupload
commandfile_to_body
functionScreenshots
