postiz-app icon indicating copy to clipboard operation
postiz-app copied to clipboard

'file_format_check_failed' on Tiktok upload

Open vrisalab opened this issue 6 months ago β€’ 4 comments

πŸ“œ Description

I've successfully set up my tiktok account on postiz, using a sandbox app. I am aware those apps cannot post videos on public accounts, so I've settled for posting drafts. Sadly I encounter the following error when attempting to draft an mp4 h264 video:

postiz           | [0] 0|workers  | [Error] posting on tiktok titok-error-upload {"data":{"fail_reason":"file_format_check_failed","status":"FAILED"},"error":{"code":"ok","message":"","log_id":"20250612033551A7D9C403C69ED91B3FEF"}} <Buffer 7b 22 64 61 74 61 22 3a 7b 22 66 61 69 6c 5f 72 65 61 73 6f 6e 22 3a 22 66 69 6c 65 5f 66 6f 72 6d 61 74 5f 63 68 65 63 6b 5f 66 61 69 6c 65 64 22 2c ... 100 more bytes> BadBody {

This is ffprobe for that video

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'e723bf12bb1072255d29ceab76fb9af33.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2025-06-08T21:43:22.000000Z
  Duration: 00:00:14.75, start: 0.000000, bitrate: 8266 kb/s
  Stream #0:0[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
      Metadata:
        creation_time   : 2025-06-08T21:43:24.000000Z
        handler_name    : #Mainconcept MP4 Sound Media Handler
        vendor_id       : [0][0][0][0]
  Stream #0:1[0x1](eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1080x1920, 7915 kb/s, 59.94 fps, 59.94 tbr, 60k tbn (default)
      Metadata:
        creation_time   : 2025-06-08T21:43:25.000000Z
        handler_name    : ?Mainconcept Video Media Handler
        vendor_id       : [0][0][0][0]
        encoder         : AVC Coding

I also tested it with a private account, and the same error occurs.

πŸ‘Ÿ Reproduction steps

  1. Connect a tiktok account, private or not
  2. Attempt to post a draft
  3. The post fails with 'file_format_check_failed'.

πŸ‘ Expected behavior

The post should appear in the user's drafts

πŸ‘Ž Actual Behavior with Screenshots

Image

πŸ’» Operating system

Linux

πŸ€– Node Version

The one in the latest docker file

πŸ“ƒ Provide any additional context for the Bug.

No response

πŸ‘€ Have you spent some time to check if this bug has been raised before?

  • [x] I checked and didn't find similar issue

Are you willing to submit PR?

None

vrisalab avatar Jun 11 '25 20:06 vrisalab

I'm also experiencing the same problem. Looking at the logs, Tiktok hits the server for the file, but a "file_format_check_failed" error is returned by TikTok.

gyoridavid avatar Jun 14 '25 17:06 gyoridavid

yeah same error for me using Sandbox app. Perhaps due to missing scope permissions or something. Frustrating indeed

rastarr avatar Jun 18 '25 11:06 rastarr

There's a similar situation when posting Instagram videos.

json: `{"error":{"message":"The video file you selected is in a format that we don't support.","type":"OAuthException","code":352,"error_subcode":22070

Nikto655 avatar Jun 22 '25 14:06 Nikto655

Has anyone managed to overcome the problem?

tkowalski29 avatar Jun 23 '25 08:06 tkowalski29

the problem here is that any media is sent as type=image when the provider expect a video

I understand that in the moment the web interface includes the video in the scheduled post, it is failing to set the right "type"

mpadronm avatar Jul 01 '25 02:07 mpadronm

I’m seeing the same issue. Videos that used to publish fine via the API now fail with file_format_check_failed when I query the statusβ€”even when I reuse a file that still uploads successfully through the TikTok Web uploader.

All required scopes are in place. I’m not sure whether this is a backend bug or if TikTok now requires an additional app review.

I’ve opened a support ticket (awaiting ETA). Has anyone here received guidance from TikTok or found a workaround?

mutluch avatar Jul 01 '25 22:07 mutluch

Any news ?

tkowalski29 avatar Jul 06 '25 12:07 tkowalski29

I am also experiencing this problem

MrAssie avatar Jul 06 '25 15:07 MrAssie

I was able to make it work when I changed pull from url to upload file. The issue might be related to pull from url portion only.

mutluch avatar Jul 07 '25 14:07 mutluch

I was able to make it work when I changed pull from url to upload file. The issue might be related to pull from url portion only.

can you tell me where you made the modification in the code. Or send your modified tiktok file?

tkowalski29 avatar Jul 07 '25 17:07 tkowalski29

I was able to make it work when I changed pull from url to upload file. The issue might be related to pull from url portion only.

can you tell me where you made the modification in the code. Or send your modified tiktok file?

Sorry, it's not in this repo. It is a different app having the same issue.

mutluch avatar Jul 07 '25 17:07 mutluch

I was able to make it work when I changed pull from url to upload file. The issue might be related to pull from url portion only.

can you tell me where you made the modification in the code. Or send your modified tiktok file?

Sorry, it's not in this repo. It is a different app having the same issue.

which app?

I am looking for an alternative as well.

tkowalski29 avatar Jul 07 '25 18:07 tkowalski29

I was able to make it work when I changed pull from url to upload file. The issue might be related to pull from url portion only.

can you tell me where you made the modification in the code. Or send your modified tiktok file?

Sorry, it's not in this repo. It is a different app having the same issue.

which app?

I am looking for an alternative as well.

Internal app of our company. Sorry again.

mutluch avatar Jul 07 '25 18:07 mutluch

I’m getting the same error, but it works fine with images on my end. So I’m guessing Postiz is sending a video file to TikTok, but TikTok interprets it as a corrupted image. Any documentation about the sandbox Mode and restrictions according to this mode ? The problem can come from the SandBox Mode maybe, which is restricted...

ohio987 avatar Jul 16 '25 06:07 ohio987

same error

ToxinePAWN avatar Jul 26 '25 15:07 ToxinePAWN

I am having the same issue, the video is being sent as photo in the logs. I have not found a workaround. Its not working via API nor Web UI.

Sarryaz avatar Aug 06 '25 16:08 Sarryaz

Nevermind, I got it working with the latest version. This is my HTTP Body for reference. :)

  "type": "now",
  "date": "{{ $now }}",
  "shortLink": false,
  "tags": [],
  "posts": [
    {
      "integration": { "id": "{{$json.id}}" },
      "value": [
        {
          "content": "Posting a TikTok via API ✨",
          "image": [
            {
              "id": "{{ $('Upload to Postiz').item.json.id }}",
              "path": "{{ $('Upload to Postiz').item.json.path }}"
            }
          ]
        }
      ],
      "settings": {
        "__type": "tiktok",
        "content_posting_method": "DIRECT_POST",
        "privacy_level": "SELF_ONLY",
        "duet": false,
        "stitch": false,
        "comment": true,
        "autoAddMusic": "no",
        "brand_content_toggle": false,
        "brand_organic_toggle": true
      }
    }
  ]
}

Sarryaz avatar Aug 06 '25 16:08 Sarryaz

I tested with a video and now ir is properly sent to Tiktok for revision. I'm not sure if it's entirely fixed tho

vrisalab avatar Aug 06 '25 19:08 vrisalab

After more testing, I haven't encountered any issues with videos or images anymore. I think this is fixed :)

vrisalab avatar Aug 07 '25 20:08 vrisalab

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Nov 05 '25 20:11 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Nov 12 '25 21:11 github-actions[bot]