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

fix(core): fix raw invoke body for isolation pattern #10167

Merged
merged 11 commits into from
Jul 12, 2024

Conversation

amrbashir
Copy link
Member

The isolation pattern requests are made using JSON but the payload could be raw bytes, so we send the original Content-Type from frontend and make sure to deserialize the payload using that one instead of Content-Type from request headers

The `isolation` pattern requests are made using JSON but the payload could be raw bytes, so we send the original `Content-Type`  from frontend and make sure to deserialize the payload using that one instead of `Content-Type` from request headers
@amrbashir amrbashir requested a review from a team as a code owner July 2, 2024 04:15
@amrbashir
Copy link
Member Author

@lucasfernog do you have any idea why is the macOS test failing?

@FabianLars
Copy link
Member

the embed-plist crate can only be used once per binary (by design). So maybe we have to add an option to the generate_context macro to disable it for these test 🤔 (Or imo better yet, if we disable it in test env directly but idk if that works across crates)

Copy link
Contributor

github-actions bot commented Jul 12, 2024

Package Changes Through 8c96c77

There are 9 changes which include tauri-cli with prerelease, @tauri-apps/cli with prerelease, tauri with prerelease, tauri-bundler with prerelease, @tauri-apps/api with prerelease, tauri-macros with prerelease, tauri-codegen with prerelease, tauri-runtime-wry with prerelease, tauri-utils with prerelease

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.0.0-beta.14 2.0.0-beta.15
tauri-utils 2.0.0-beta.18 2.0.0-beta.19
tauri-bundler 2.0.1-beta.17 2.0.1-beta.18
tauri-runtime 2.0.0-beta.19 2.0.0-beta.20
tauri-runtime-wry 2.0.0-beta.19 2.0.0-beta.20
tauri-codegen 2.0.0-beta.18 2.0.0-beta.19
tauri-macros 2.0.0-beta.18 2.0.0-beta.19
tauri-plugin 2.0.0-beta.18 2.0.0-beta.19
tauri-build 2.0.0-beta.18 2.0.0-beta.19
tauri 2.0.0-beta.23 2.0.0-beta.24
@tauri-apps/cli 2.0.0-beta.21 2.0.0-beta.22
tauri-cli 2.0.0-beta.21 2.0.0-beta.22

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Copy link
Member

@lucasfernog lucasfernog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you forgot to verify this on an actual app - the JS side was encoding the payload to string

@amrbashir
Copy link
Member Author

amrbashir commented Jul 12, 2024

I did test it on an actual app, otherwise I wouldn't have found the problem and its fix.

I did notice that it was encoding to a string and didn't understand why so I left it as is because the failing code I was testing, worked fine with it.

@lucasfernog
Copy link
Member

gooood, well done

@lucasfernog lucasfernog merged commit 4c23972 into dev Jul 12, 2024
24 checks passed
@lucasfernog lucasfernog deleted the fix/core/isolation-raw-request-deser branch July 12, 2024 12:52
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.

3 participants