matecat / MateCat

MateCat is an AI driven translation tool for language industry professionals. Matecat makes machine translation post-editing and project outsourcing easy.
http://www.matecat.com
GNU Lesser General Public License v3.0
379 stars 176 forks source link

/action/convertFile/ API returns 500 Internal Server Error #3494

Open knightgao opened 2 months ago

knightgao commented 2 months ago

Description

When uploading a file, the /action/convertFile/ API endpoint returns a 500 Internal Server Error. Additionally, accessing the API documentation page at https://matecat.devgaoy.cn/api/docs returns a 503 Service Unavailable error.

Environment

Steps to Reproduce

  1. Access the MateCat interface
  2. Attempt to upload a file
  3. Observe the 500 error returned from /action/convertFile/

Expected Behavior

The file should be successfully uploaded and converted without errors.

Actual Behavior

The API returns a 500 error with the following response:

{
    "errors": [
        {
            "code": -1000,
            "message": "Oops we got an Error. Contact <a href='mailto:the owner of this MateCat instance.'>the owner of this MateCat instance.<\/a>"
        }
    ],
    "data": []
}
## Additional Information
### Chrome Console Output

file.error: null

upload_main.js:250 FIRE fileuploadstart

upload_main.js:239 FIRE fileuploadsend

upload_main.js:240

  1. [File, valid: true]

upload_main.js:247 16548

upload_main.js:335 FIRE fileuploadcompleted

upload_main.js:411 ACTION: bind fileuploadcompleted

upload_main.js:515 Enforce conversion: true

convertFileRequest.js:33 POST https://matecat.devgaoy.cn/action/convertFile/ 500 (Internal Server Error)

upload_main.js:745 conversion error

### matecat/error.log

[Wed Jul 31 16:16:35.549766 2024] [ssl:warn] [pid 900:tid 900] AH01909: 0.ajax.matecat.devgaoy.cn:443:0 server certificate does NOT include an ID which matches the server name [Wed Jul 31 16:16:35.552779 2024] [ssl:warn] [pid 900:tid 900] AH01906: matecat.devgaoy.cn:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Wed Jul 31 16:16:35.882733 2024] [ssl:warn] [pid 1218:tid 1218] AH01906: 0.ajax.matecat.devgaoy.cn:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Wed Jul 31 16:16:35.882761 2024] [ssl:warn] [pid 1218:tid 1218] AH01909: 0.ajax.matecat.devgaoy.cn:443:0 server certificate does NOT include an ID which matches the server name [Wed Jul 31 16:16:35.885256 2024] [ssl:warn] [pid 1218:tid 1218] AH01906: matecat.devgaoy.cn:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Wed Jul 31 16:24:15.192219 2024] [ssl:warn] [pid 5903:tid 5903] AH01906: 0.ajax.matecat.devgaoy.cn:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Wed Jul 31 16:24:15.192277 2024] [ssl:warn] [pid 5903:tid 5903] AH01909: 0.ajax.matecat.devgaoy.cn:443:0 server certificate does NOT include an ID which matches the server name [Wed Jul 31 16:24:15.194485 2024] [ssl:warn] [pid 5903:tid 5903] AH01906: matecat.devgaoy.cn:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Wed Jul 31 16:24:15.219256 2024] [ssl:warn] [pid 5904:tid 5904] AH01906: 0.ajax.matecat.devgaoy.cn:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Wed Jul 31 16:24:15.219401 2024] [ssl:warn] [pid 5904:tid 5904] AH01909: 0.ajax.matecat.devgaoy.cn:443:0 server certificate does NOT include an ID which matches the server name [Wed Jul 31 16:24:15.221636 2024] [ssl:warn] [pid 5904:tid 5904] AH01906: matecat.devgaoy.cn:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Wed Jul 31 16:25:38.987839 2024] [php7:notice] [pid 6166:tid 6166] [client 152.101.7.81:52382] PHP Notice: Undefined offset: 0 in /home/matecat/matecat/lib/Utils/fileupload/upload.class.php on line 564, referer: https://matecat.devgaoy.cn/ [Wed Jul 31 16:25:38.987881 2024] [php7:warn] [pid 6166:tid 6166] [client 152.101.7.81:52382] PHP Warning: fopen(): Filename cannot be empty in /home/matecat/matecat/lib/Utils/fileupload/upload.class.php on line 564, referer: https://matecat.devgaoy.cn/ [Wed Jul 31 16:52:10.162808 2024] [php7:notice] [pid 6142:tid 6142] [client 152.101.7.81:34924] PHP Notice: Undefined offset: 0 in /home/matecat/matecat/lib/Utils/fileupload/upload.class.php on line 564, referer: https://matecat.devgaoy.cn/ [Wed Jul 31 16:52:10.162853 2024] [php7:warn] [pid 6142:tid 6142] [client 152.101.7.81:34924] PHP Warning: fopen(): Filename cannot be empty in /home/matecat/matecat/lib/Utils/fileupload/upload.class.php on line 564, referer: https://matecat.devgaoy.cn/ [Wed Jul 31 16:52:55.352786 2024] [ssl:warn] [pid 26191:tid 26191] AH01906: 0.ajax.matecat.devgaoy.cn:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Wed Jul 31 16:52:55.352858 2024] [ssl:warn] [pid 26191:tid 26191] AH01909: 0.ajax.matecat.devgaoy.cn:443:0 server certificate does NOT include an ID which matches the server name [Wed Jul 31 16:52:55.355099 2024] [ssl:warn] [pid 26191:tid 26191] AH01906: matecat.devgaoy.cn:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Wed Jul 31 16:52:55.381062 2024] [ssl:warn] [pid 26192:tid 26192] AH01906: 0.ajax.matecat.devgaoy.cn:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?) [Wed Jul 31 16:52:55.381097 2024] [ssl:warn] [pid 26192:tid 26192] AH01909: 0.ajax.matecat.devgaoy.cn:443:0 server certificate does NOT include an ID which matches the server name [Wed Jul 31 16:52:55.383422 2024] [ssl:warn] [pid 26192:tid 26192] AH01906: matecat.devgaoy.cn:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)


### matecat/access.log

152.101.7.81 - - [31/Jul/2024:16:55:13 +0800] "GET /public/build/fonts/icomoon.ttf HTTP/1.1" 200 99090 "https://matecat.devgaoy.cn/public/build/upload.c28265ce9debdec3fd95.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:55:13 +0800] "GET /api/app/languages HTTP/1.1" 200 4199 "https://matecat.devgaoy.cn/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:55:16 +0800] "GET /public/img/matecat-logo-translated.svg HTTP/1.1" 200 5173 "https://matecat.devgaoy.cn/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:55:16 +0800] "GET /api/app/files HTTP/1.1" 200 1068 "https://matecat.devgaoy.cn/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:55:20 +0800] "GET /public/build/images/logo_matecat_big_white.svg HTTP/1.1" 200 8521 "https://matecat.devgaoy.cn/public/build/upload.c28265ce9debdec3fd95.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:55:20 +0800] "GET /lib/Utils/fileupload/ HTTP/1.1" 200 3182 "https://matecat.devgaoy.cn/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:55:21 +0800] "GET /public/img/meta/favicon-32x32.svg HTTP/1.1" 200 1923 "https://matecat.devgaoy.cn/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:55:40 +0800] "-" 408 2484 "-" "-" 152.101.7.81 - - [31/Jul/2024:16:55:41 +0800] "-" 408 2484 "-" "-" 152.101.7.81 - - [31/Jul/2024:16:55:47 +0800] "GET /api/docs HTTP/1.1" 503 1764 "https://matecat.devgaoy.cn/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:55:52 +0800] "GET /public/build/runtime.ada526d8dee8b28970a2.js HTTP/1.1" 200 8315 "https://matecat.devgaoy.cn/api/docs" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:55:52 +0800] "GET /public/build/errorPage.ada526d8dee8b28970a2.js HTTP/1.1" 200 3787 "https://matecat.devgaoy.cn/api/docs" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:55:54 +0800] "GET /public/img/offline.png HTTP/1.1" 200 6167 "https://matecat.devgaoy.cn/api/docs" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:55:52 +0800] "GET /public/build/errorPage.c28265ce9debdec3fd95.css HTTP/1.1" 200 558039 "https://matecat.devgaoy.cn/api/docs" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:55:59 +0800] "GET /public/build/images/logo_matecat_big_white.svg HTTP/1.1" 200 6036 "https://matecat.devgaoy.cn/public/build/errorPage.c28265ce9debdec3fd95.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:56:00 +0800] "GET /img/meta/favicon-32x32.svg HTTP/1.1" 404 2702 "https://matecat.devgaoy.cn/api/docs" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:56:02 +0800] "GET /img/meta/favicon-16x16.svg HTTP/1.1" 404 2702 "https://matecat.devgaoy.cn/api/docs" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36" 152.101.7.81 - - [31/Jul/2024:16:56:14 +0800] "-" 408 2484 "-" "-"