Vocal Remover

FREEMIUM
(Ким) Firdavs Shodiyev | Оновлено a month ago | Music
Популярність

9.2 / 10

Затримки

10,195ms

Рівень обслуговування

71%

Health Check

100%

Повернутися до всіх обговорень

Getting Internal Server Error 500

Rapid account: Info Oc K Sw I Kt F
info-ocKSwIKtF
24 days ago

Getting internal server wjile running on flutter, ApI working on postman & curl btw, Any solution to reslove this issue

Future<void> uploadFile(String audioFilePath, BuildContext context) async {
print(audioFilePath);

var dio = Dio();

var formData = FormData.fromMap({
  'fileName': await MultipartFile.fromFile(
    audioFilePath,
    filename: 'vibe.mp3',
    contentType: MediaType('audio', 'mpeg'),
  ),
});

try {
  var response = await dio.post(
    'https://vocal-remover.p.rapidapi.com/api/v2/FileUpload',
    data: formData,
    options: Options(
      method: 'POST',
      headers: {
        'X-RapidAPI-Host': 'vocal-remover.p.rapidapi.com',
        'X-RapidAPI-Key':
            'a4b9ff9474msh1e793djsn7af3d879b8fa',
      },
    ),
  );

  if (response.statusCode == 200) {
    print(response.data);
  } else {
    print(response.statusMessage);
  }
} catch (e) {
  print('Error uploading file: $e');
}

}

Rapid account: Firdavscoder 1
firdavscoder1 Commented 23 days ago
Rapid account: Info Oc K Sw I Kt F
info-ocKSwIKtF Commented 23 days ago

hi, I have done everything there is, looks like the api is not compatible with dart, my guess is headers are being handled case sensitively by the server (i.e. it is not in compliance with the RFC), dart force converts everything in headers to lowercase, i have checked the log and request from postman is working because headers are on original case but when using flutter it gets converted to lowercase

Also when requesting from dart request body is 100 and from postman its 99,
ps - one more person in discussion also mentioned same error, ie -internal server error 500

Rapid account: Info Oc K Sw I Kt F
info-ocKSwIKtF Commented 24 days ago

Is there any specific file upload requirements. this is the response body returned by server

<!doctype html><html lang=“en”><head><title>HTTP Status 500 – Internal Server Error</title><style type=“text/css”>body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1><hr class=“line” /><p><b>Type</b> Exception Report</p><p><b>Message</b> The multi-part request contained parameter data (excluding uploaded files) that exceeded the limit for maxPostSize set on the associated connector</p><p><b>Description</b> The server encountered an unexpected condition that prevented it from fulfilling the request.</p><p><b>Exception</b></p><pre>java.lang.IllegalStateException: The multi-part request contained parameter data (excluding uploaded files) that exceeded the limit for maxPostSize set on the associated connector org.apach

Rapid account: Firdavscoder 1
firdavscoder1 Commented 24 days ago

Hi. It is not due to API error but rather you might not request data correctly. Ask any flutter experts to solve this issue.

Приєднуйтесь до обговорення — додайте повідомлення нижче:

Вхід / Реєстрація, щоб публікувати нові повідомлення