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

bug: Method is undefined when uploading multipart/form-data #6726

Closed
altinselimi opened this issue Jul 13, 2023 · 7 comments
Closed

bug: Method is undefined when uploading multipart/form-data #6726

altinselimi opened this issue Jul 13, 2023 · 7 comments
Labels
needs reproduction needs reproducible example to illustrate the issue

Comments

@altinselimi
Copy link

altinselimi commented Jul 13, 2023

Bug Report

Capacitor Version

Latest Dependencies:

  @capacitor/cli: 5.2.0
  @capacitor/core: 5.2.0
  @capacitor/android: 5.2.0
  @capacitor/ios: 5.2.0

Installed Dependencies:

  @capacitor/cli: 5.2.0
  @capacitor/core: 5.2.0
  @capacitor/android: 5.2.0
  @capacitor/ios: 5.2.0

[success] iOS looking great! 👌
[error] Missing <manifest package=""> attribute in app/src/main```

### Platform(s)
iOS



### Current Behavior
I am using CapacitorHTTP plugin to make http calls. That automatically works with Axios so I assume the existing code does not need to be changed. Its a simple HTTP POST request that sends a file. But when I check out in Safari inspector, it says that the method is UNDEFINED, and Im guessing its going as GET because then its throwing a 'resource exceeds maximum size' error.



### Expected Behavior
Attachment should be successfully uploaded and there should be no `resource exceeds maximum size` error. Also the method of the request should be POST.


### Code Reproduction
https://github.com/altinselimi/capacitor-repro-bug


### Other Technical Details

`npm --version` output: 9.5.0

`node --version` output: v18.15.0

`pod --version` output (iOS issues only): 1.12.1

### Additional Context
I have tried using both Axios syntax:
`Axios.post({...})` and `Axios({method: 'post' ,...})` but none of them seem to work.


@ionitron-bot ionitron-bot bot added the triage label Jul 13, 2023
@altinselimi
Copy link
Author

Here is a screenshot:
Screenshot

@altinselimi
Copy link
Author

This has completely broken all POST requests, which were working fine previously

@mikelnorth
Copy link

mikelnorth commented Jul 14, 2023

Seeing the same thing using XMLHttpRequest. Can not send POST requests

  const request = new XMLHttpRequest();
    request.open(
      'POST',
      `https://exampleurl`
    );

Network shows GET instead of POST

Platform
IOS
Android

@jcesarmobile jcesarmobile added the needs reproduction needs reproducible example to illustrate the issue label Jul 17, 2023
@ionitron-bot
Copy link

ionitron-bot bot commented Jul 17, 2023

This issue needs more information before it can be addressed. In particular, the reporter needs to provide a minimal sample app that demonstrates the issue. If no sample app is provided within 15 days, the issue will be closed.
Please see the Contributing Guide for how to create a Sample App.
Thanks! Ionitron 💙

@ionitron-bot ionitron-bot bot removed the triage label Jul 17, 2023
@Ionitron Ionitron added needs reply needs reply from the user and removed needs reply needs reply from the user labels Jul 17, 2023
@5uper

This comment was marked as abuse.

@jcesarmobile
Copy link
Member

fixed in #6740

@ionitron-bot
Copy link

ionitron-bot bot commented Aug 16, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Aug 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs reproduction needs reproducible example to illustrate the issue
Projects
None yet
Development

No branches or pull requests

5 participants