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

send_video seems to sometimes silently result in "Video not found"? #418

Open
Meorge opened this issue Oct 29, 2024 · 2 comments
Open

send_video seems to sometimes silently result in "Video not found"? #418

Meorge opened this issue Oct 29, 2024 · 2 comments

Comments

@Meorge
Copy link
Contributor

Meorge commented Oct 29, 2024

I wish I had more useful information to share on this, but unfortunately I don't.

I've found that, very occasionally, when I use the send_video method, the resulting video will be missing on Bluesky - the post itself appears, but the video says "Video not found". Here is an example of this happening today. As you can see in the follow-up reply, by using the web client manually, I was able to upload the video just fine.

I was hoping that my logs might have caught an error or something useful, but they appear to be just fine - everything is returning 200 OK status codes:

2024-10-29 15:02:22,624 - HTTP Request: POST https://bsky.social/xrpc/com.atproto.server.createSession "HTTP/1.1 200 OK"
2024-10-29 15:02:22,903 - HTTP Request: GET https://amanita.us-east.host.bsky.network/xrpc/app.bsky.actor.getProfile?actor=turnabout-ca-dmv.meorge.com "HTTP/1.1 200 OK"
2024-10-29 15:02:23,009 - HTTP Request: GET https://amanita.us-east.host.bsky.network/xrpc/app.bsky.feed.getAuthorFeed?actor=ca-dmv-bot.bsky.social&filter=posts_with_media&limit=20 "HTTP/1.1 200 OK"
2024-10-29 15:02:28,043 - HTTP Request: POST https://amanita.us-east.host.bsky.network/xrpc/com.atproto.repo.uploadBlob "HTTP/1.1 200 OK"
2024-10-29 15:02:28,851 - HTTP Request: POST https://amanita.us-east.host.bsky.network/xrpc/com.atproto.repo.createRecord "HTTP/1.1 200 OK"
2024-10-29 15:02:28,949 - HTTP Request: POST https://amanita.us-east.host.bsky.network/xrpc/com.atproto.repo.createRecord "HTTP/1.1 200 OK"
2024-10-29 15:02:28,949 - Post for plate "LMAO EVO" is done!

Luckily, this issue only happens every once in a while, and it's not a big hassle to upload the video manually. Please let me know if you have ideas for ways I could test or diagnose it. I'll try to add to this thread if I gather more useful information as well.

@MarshalX
Copy link
Owner

Well, this is video processing problem on bsky side. Nothing to do from the client IMO. But what I can recommend. Migrate from send_video to proper video service. Pull processing state, etc. Why i suggest that: you can got the error code and error message why processing fails sometimes. Also, it is possible that video service just do not pick up processing. job from send_video method sometimes. This is also about server-side bug.

Here is how to work with video service: #400 (comment). You should implement create job and get job status by yourself. Pretty in the same manner

Let me know about your findings! And feel free to enrich my code snippet with full video flow uploading. We could add it as official SDK example

@Meorge
Copy link
Contributor Author

Meorge commented Oct 30, 2024

Thanks for the confirmation! I agree that it probably makes sense to work on making the video API more proper than it is currently - that could eliminate bugs, as well as help us debug when things like this do happen.

I have a few other things going on right now, and the current function works the vast majority of the time, but I'll keep this in mind for something to work on soon when I have more time for it. 😄

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

2 participants