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

Uncaught RuntimeException in wp-content/plugins/wp-to-twitter/vendor_prefixed/vendor/noweh/twitter-api-v2-php/src/Media.php:61 #16

Open
bramus opened this issue Dec 4, 2024 · 6 comments

Comments

@bramus
Copy link

bramus commented Dec 4, 2024

Describe the bug
Whenever the plugin tries to post something, it throws an exception

To Reproduce
Steps to reproduce the behavior:

  1. Write a blog post
  2. Set a featured image
  3. Hit publish

Desktop (please complete the following information):
Any OS

Smartphone (please complete the following information):
Any device

Additional context

Version info:

WordPress version 6.7.1
Current plugin: XPoster - Share to X and Mastodon (version 4.2.6)
PHP version 8.0.30

Stack Trace:

An error of type E_ERROR was caused in line 61 of the file /www/wordpress/wp-content/plugins/wp-to-twitter/vendor_prefixed/vendor/noweh/twitter-api-v2-php/src/Media.php. Error message: Uncaught RuntimeException in /www/wordpress/wp-content/plugins/wp-to-twitter/vendor_prefixed/vendor/noweh/twitter-api-v2-php/src/Media.php:61
Stack trace:
#0 /www/wordpress/wp-content/plugins/wp-to-twitter/wpt-post-to-twitter.php(36): WpToTwitter_Vendor\Noweh\TwitterApi\Media->upload('/9j/4AAQSkZJRgA...')
#1 /www/wordpress/wp-content/plugins/wp-to-twitter/wp-to-twitter.php(415): wpt_upload_twitter_media(Object(WpToTwitter_Vendor\Noweh\TwitterApi\Client), false, 34961, Array, 34959)
#2 /www/wordpress/wp-content/plugins/wp-to-twitter/wp-to-twitter.php(318): wpt_post_to_twitter('Control the Vie...', false, 34959, true)
#3 /www/wordpress/wp-content/plugins/wp-to-twitter/wp-to-twitter.php(1042): wpt_post_to_service('Control the Vie...', false, 34959, true)
#4 /www/wordpress/wp-content/plugins/wp-to-twitter/wp-to-twitter.php(2125): wpt_tweet(34959, 'instant', Object(WP_Post), true, Object(WP_Post))
#5 /www/wordpress/wp-content/plugins/wp-to-twitter/wp-to-twitter.php(2079): wpt_twit_instant(34959, Object(WP_Post), true, Object(WP_Post))
#6 /www/wordpress/wp-includes/class-wp-hook.php(324): wpt_twit(34959, Object(WP_Post), true, Object(WP_Post))
#7 /www/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(34959, Array)
#8 /www/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#9 /www/wordpress/wp-includes/post.php(5781): do_action('wp_after_insert...', 34959, Object(WP_Post), true, Object(WP_Post))
#10 /www/wordpress/wp-includes/post.php(5074): wp_after_insert_post(Object(WP_Post), true, Object(WP_Post))
#11 /www/wordpress/wp-includes/post.php(5162): wp_insert_post(Array, false, true)
#12 /www/wordpress/wp-admin/includes/post.php(453): wp_update_post(Array)
#13 /www/wordpress/wp-admin/post.php(227): edit_post()
#14 {main}
  thrown
@bramus
Copy link
Author

bramus commented Dec 4, 2024

Checking things in the XPoster Pro settings, I see the connection to X is set up but incorrectly configured

Last Status Update: 403 (No post) » Forbidden: Your client app is not configured with the appropriate oauth1 app permissions for this endpoint.

Either way, the exception should be caught by the plugin.

@joedolson
Copy link
Owner

Can you tell me what type of image you set as the featured image?

@bramus
Copy link
Author

bramus commented Dec 5, 2024

Nothing special. The most recent post I published has https://www.bram.us/wordpress/wp-content/uploads/2024/12/AQ5RAHpMaM.jpg set as the featured image. It’s a thumbnail saved straight from YouTube.

This used to work before X changed their API requirements.

@joedolson
Copy link
Owner

What version of XPoster Pro do you have? I haven't been able to reproduce this yet. The actual exception is happening in an upstream library, so I'd prefer to go in the direction of preventing the error.

But

@bramus
Copy link
Author

bramus commented Dec 6, 2024

Latest ones: XPoster 4.2.6 (noticed the update to 4.3.0 went out the other day) + XPoster Pro 3.0.0

@joedolson
Copy link
Owner

So XPoster Pro 3.0.0 is very old; that was the terminal release of WP Tweets Pro. You'll want to switch over to XPoster Pro: https://xposterpro.com. I sent out an email to all active license holders at the time I made the switch to host Pro on a different website, but you may not have seen that.

Use the discount code REBRAND2023 to get a 23% discount on the new account. All existing licenses administered through joedolson.com were cancelled in 2023.

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