question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Multipart body must have at least one part"

See original GitHub issue

In one of StackOverflow asked question (react-native upload pictures on android) described request with param “FormData”, but I requested GET request without data and got same message!

react-native app with ProGuard enabled = true

App crashed on first request.

06-16 14:00:30.971: E/AndroidRuntime(14321): java.lang.IllegalStateException: Multipart body must have at least one part.
06-16 14:00:30.971: E/AndroidRuntime(14321):    at okhttp3.MultipartBody$Builder.build(SourceFile:327)
06-16 14:00:30.971: E/AndroidRuntime(14321):    at com.facebook.react.modules.network.NetworkingModule.sendRequest(SourceFile:309)
06-16 14:00:30.971: E/AndroidRuntime(14321):    at java.lang.reflect.Method.invoke(Native Method)
06-16 14:00:30.971: E/AndroidRuntime(14321):    at java.lang.reflect.Method.invoke(Method.java:372)
06-16 14:00:30.971: E/AndroidRuntime(14321):    at com.facebook.react.bridge.BaseJavaModule$b.a(SourceFile:345)
06-16 14:00:30.971: E/AndroidRuntime(14321):    at com.facebook.react.cxxbridge.JavaModuleWrapper.invoke(SourceFile:136)
06-16 14:00:30.971: E/AndroidRuntime(14321):    at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
06-16 14:00:30.971: E/AndroidRuntime(14321):    at android.os.Handler.handleCallback(Handler.java:739)
06-16 14:00:30.971: E/AndroidRuntime(14321):    at android.os.Handler.dispatchMessage(Handler.java:95)
06-16 14:00:30.971: E/AndroidRuntime(14321):    at com.facebook.react.bridge.queue.a.dispatchMessage(SourceFile:31)
06-16 14:00:30.971: E/AndroidRuntime(14321):    at android.os.Looper.loop(Looper.java:135)
06-16 14:00:30.971: E/AndroidRuntime(14321):    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(SourceFile:196)
06-16 14:00:30.971: E/AndroidRuntime(14321):    at java.lang.Thread.run(Thread.java:818)

https://stackoverflow.com/questions/44591453/multipart-body-must-have-at-least-one-part

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
iegikcommented, Jun 20, 2017

I tried to pass body as empty FormData, so message about body without any part of it.

0reactions
andreykarnovskiycommented, Nov 8, 2022

Guys, always check module dependencies and add latest version of the library to the module dependencies, otherwise module will use obsolete version and you dont notice it. Оften this is the cause of problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Multipart body must have at least one part" - Stack Overflow
Multipart body must have at least one part. This message is about wrong arguments for fetch function passed from JavaScript code to ...
Read more >
Multipart body must have at least one part"-React Native
Coding example for the question "Multipart body must have at least one part"-React Native.
Read more >
okhttp3.MultipartBody.<init> java code examples | Tabnine
public MultipartBody build() { if (parts.isEmpty()) { throw new IllegalStateException("Multipart body must have at least one part.
Read more >
Why I am getting error "Multipart body must have at least one ...
Hi i am new to DesiDime and while I am submitting a deal the form is showing error as “Multipart body must have...
Read more >
RFC1341(MIME) : 7 The Multipart content type
The body must then contain one or more "body parts," each preceded by an encapsulation boundary, and the last one followed by a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found