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

post transmuted to get in android app? #7191

Closed
2 tasks
bburdette opened this issue Jun 13, 2023 · 2 comments
Closed
2 tasks

post transmuted to get in android app? #7191

bburdette opened this issue Jun 13, 2023 · 2 comments
Labels
platform: Android status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@bburdette
Copy link

Describe the bug
I'm just getting started, so still have a separate rust webserver, and my front end in tauri communicates with that.

The web frontend uses POST to send messages to the server, and receive replies. When I compile my tauri app with cargo run, (ie not android), my separate webserver receives post messages as normal.

But when I run with cargo tauri android dev, then the POSTs are now GETs, which fail with 405.

Steps To Reproduce

  • clone at this commit
  • have nix installed, with flakes enabled.
  • nix develop
  • cd tauri/src-tauri
  • cargo tauri android init
  • cargo tauri android run

Expected behavior
Expected POSTs.

Platform and Versions (please complete the following information):
Host OS:nixos
Target OS:android
Rustc:
cargo mobile doctor:
[bburdette@HOSS:~/code/zknotes/zknotes/tauri/src-tauri]$ cargo mobile doctor

[!] cargo-mobile v0.5.1
• Installed commit message isn't present
✗ The tauri-mobile installation directory is missing! Checked at "/home/bburdette/.cargo/.tauri-mobile"
• NixOS v22.11 (Raccoon
• rustc v1.69.0 (84c898d65 2023-4-16)

[✔] Android developer tools
• SDK v26.1.1 installed at "/nix/store/8xfmkb84dim3rk7lk59kprp1jarzi7c9-androidsdk/libexec/android-sdk"
• NDK v25.2.9519653 installed at
"/nix/store/8xfmkb84dim3rk7lk59kprp1jarzi7c9-androidsdk/libexec/android-sdk/ndk/25.2.9519653"

[✔] Connected devices
• Pixel_2_API_30 (sdk_gphone_x86)

Would you want to assign yourself to resolve this bug?

  • Yes
  • No

Additional context
Add any other context about the problem here.

@amrbashir amrbashir transferred this issue from tauri-apps/cargo-mobile2 Jun 13, 2023
@FabianLars FabianLars added type: bug status: needs triage This issue needs to triage, applied to new issues platform: Android labels Jun 14, 2023
@bburdette
Copy link
Author

great, will give this a try!

@bburdette
Copy link
Author

I'm getting posts now, but actix is returning a 400. Maybe post data is left off?

 INFO 2023-06-22T14:52:35Z: tracing_actix_web::root_span_builder: HTTP request; http.method=POST http.route=/user http.flavor=1.1 http.scheme=http http.host=10.0.0.85:8010 http.client_ip=10.0.0.85 http.user_agent=Mozilla/5.0 (Linux; Android 11; sdk_gphone_x86 Build/RSR1.201013.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/114.0.5735.57 Mobile Safari/537.36 http.target=/user otel.name=HTTP POST /user otel.kind="server" request_id=81fb4fb7-2edc-461b-a03d-939ae05ec36f
 WARN 2023-06-22T14:52:35Z: tracing_actix_web::middleware: Error encountered while processing the incoming HTTP request: Deserialize(Error("EOF while parsing a value", line: 1, column: 0))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Android status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

3 participants