Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script exits uploading video's over 60 sec #50

Open
ivo-toby opened this issue Nov 11, 2024 · 6 comments
Open

Script exits uploading video's over 60 sec #50

ivo-toby opened this issue Nov 11, 2024 · 6 comments

Comments

@ivo-toby
Copy link

When trying to import a video which has a length over 60 seconds the script fails and exits.

Parse tweet id '763355427925069824'
 Created at 2016-08-10T12:44:51.000Z
 Full text 'test https://t.co/TF8taUGLoT'
 Upload video
 Video job status: 'video duration (63.05 sec) is longer than the maximum allowed duration (60 sec)'. Video will be posted as a link
 JobId:
Saving already imported tweets to tweets_mapping.json
/home/ivo/twitter-to-bluesky/node_modules/@atproto/xrpc/dist/xrpc-client.js:75
                throw new types_1.XRPCError(resCode, error, message, resHeaders);
                      ^

XRPCError: missing jobId
    at AtpAgent.call (/home/ivo/twitter-to-bluesky/node_modules/@atproto/xrpc/dist/xrpc-client.js:75:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async main (/home/ivo/twitter-to-bluesky/app.js:322:62) {
  error: 'missing jobId',
  headers: {
    'content-length': '57',
    'content-type': 'application/json; charset=UTF-8',
    date: 'Mon, 11 Nov 2024 19:33:56 GMT',
    'strict-transport-security': 'max-age=63072000',
    vary: 'Origin'
  },
  success: false,
  status: 400
}

Node.js v22.11.0
@clemensv
Copy link
Contributor

What do you think is the right strategy? Skip the upload or clip the video at 60s?

@marcomaroni-github
Copy link
Owner

For me it is better to intercept the specific error and move on (I see any modification or truncation of the original video as complex and risky), waiting for the limit to be raised, at which point we can try to reimport those specific tweets.

@clemensv
Copy link
Contributor

clemensv commented Nov 14, 2024

@marcomaroni-github The script should warn and skip. Exiting is ugly and the workaround to set "min_date" is too hard to work around for normal users, IMO. Videos seem to be a general source of trouble.

@shanselman
Copy link

Agreed. Just hit this after a decade of tweets LOL...skip and move on @marcomaroni-github

LOVE this utility and THANK YOI for your service

@marcomaroni-github
Copy link
Owner

I agree with you @clemensv and @shanselman and in fact I just merged this PR by @schlazor that mitigate this problem .
Thanks to all.

@ivo-toby
Copy link
Author

Thanks for fixing this so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants