You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @harmonyzhang,
First of all, thank you for this repository, is very useful.
I implemented everything easily and now I'm doing the testing phase, a week ago I launched the tests for the uploadMedia and it worked. Today launching a test with the average upload, it failed.
The exception thrown comes from the library
java.lang.NoSuchMethodError: okhttp3.MultipartBody.create([BLokhttp3/MediaType;)Lokhttp3/RequestBody; at com.whatsapp.api.impl.WhatsappBusinessCloudApi.uploadMedia([WhatsappBusinessCloudApi.java:73]
Hi @harmonyzhang,
First of all, thank you for this repository, is very useful.
I implemented everything easily and now I'm doing the testing phase, a week ago I launched the tests for the uploadMedia and it worked. Today launching a test with the average upload, it failed.
The exception thrown comes from the library
java.lang.NoSuchMethodError: okhttp3.MultipartBody.create([BLokhttp3/MediaType;)Lokhttp3/RequestBody; at com.whatsapp.api.impl.WhatsappBusinessCloudApi.uploadMedia([WhatsappBusinessCloudApi.java:73]
Go to WhatsappBusinessCloudApi.uploadMedia
From the source code I see that there is no method with this signature:
MultipartBody.create(byte[] file, MediaType fileType);
There is a method that has this signature and I think you need to change this line so as not to throw this exception.
For the solution I think it would be enough just to reverse the parameters passed to the method.
I hope you find this observation useful, I remain available for clarification .. Thank you! 😉
The text was updated successfully, but these errors were encountered: