• Resolved soapergem

    (@soapergem)


    I have installed WP Offload Media Lite on a new WordPress site, set up a new S3 bucket in my AWS account along with an IAM user that grants full access to that bucket, and proceeded to configure the plugin. I am using S3 for both Storage & Delivery. The Storage Settings are all green as they say “Storage provider is successfully connected and ready to offload new media.” But the Delivery Settings say this: “Offloaded media URLs may be broken. An error was encountered while testing the domain:?Received 403 from endpoint

    First of all, it would be really helpful if your plugin made use of WordPress logging. I tried turning on WP_DEBUG mode and WP_DEBUG_LOG, but your plugin doesn’t issue any debug logs there, so I cannot see what request it is trying to make that receives the 403.

    Secondly, I’m stumped why this isn’t working as best I can tell, the bucket is configured properly. Here is the diagnostic info for my site:

    site_url(): https://beateasel.com
    home_url(): https://beateasel.com
    Database Name: gmyers_beateasel
    Table Prefix: wp_
    WordPress: 6.4.3
    Web Server: Apache
    PHP: 8.2.16
    MySQL: 5.7.23
    ext/mysqli: yes
    PHP Memory Limit: 512M
    WP Memory Limit: 40M
    Memory Usage: 132 MB
    Blocked External HTTP Requests: None
    WP Locale: en_US
    Organize offloads by month/year: Enabled
    WP_DEBUG: No
    WP_DEBUG_LOG: No
    WP_DEBUG_DISPLAY: Yes
    SCRIPT_DEBUG: No
    WP Max Upload Size: 512 MB
    PHP Time Limit: 60
    PHP Error Log: error_log
    WP Cron: Enabled
    fsockopen: Enabled
    allow_url_fopen: Enabled
    OpenSSL: OpenSSL 1.1.1w  11 Sep 2023
    cURL: 8.6.0
    Zlib Compression: Enabled
    PHP GD: bundled (2.1.0 compatible)
    Imagick: Enabled
    Basic Auth: Disabled
    Proxy: Disabled
    
    Total Media Items: 27
    Total Offloaded Media Items: 2
    Total Not Offloaded Media Items: 25
    
    Media Library Items: 27
    Offloaded Media Library Items: 2
    Not Offloaded Media Library Items: 25
    
    Number of Image Sizes: 10
    
    Names and Dimensions of Image Sizes: 
    thumbnail (150x150)
    medium (300x300)
    large (1024x1024)
    1536x1536 (1536x1536)
    2048x2048 (2048x2048)
    mailpoet_newsletter_max (1320x0)
    woocommerce_thumbnail (300x300)
    woocommerce_single (600x0)
    woocommerce_gallery_thumbnail (100x100)
    
    WP_CONTENT_DIR: /home2/gmyers/beateasel.com/wp-content
    WP_CONTENT_URL: https://beateasel.com/wp-content
    UPLOADS: Not defined
    WP_PLUGIN_DIR: /home2/gmyers/beateasel.com/wp-content/plugins
    WP_PLUGIN_URL: https://beateasel.com/wp-content/plugins
    
    AS3CF_PROVIDER: Not defined
    AS3CF_BUCKET: Not defined
    AS3CF_REGION: Not defined
    AS3CF_SETTINGS: Defined
    AS3CF_SETTINGS Keys: access-key-id, provider, secret-access-key
    
    Local URL:
    https://beateasel.com/wp-content/uploads/2024/03/example.jpg
    Offload URL:
    https://s3.amazonaws.com/beateasel.com/wp-content/uploads/2024/03/10232221/example.jpg
    
    OME Metadata Version: 12
    
    Custom tables:
    wp_as3cf_items: Ok
    
    Storage Provider: Amazon S3
    Use Server Roles: Off
    Key File Path: N/A
    Access Keys Set: Yes
    Access Key ID Define: Not defined
    Secret Access Key Define: Not defined
    
    Bucket: beateasel.com
    Region: us-east-1
    Block All Public Access: Disabled
    Object Ownership Enforced: No
    
    Offload Media: On
    Remove Local Media: Off
    Enable Add Prefix to Bucket Path: On
    Custom Prefix for Bucket Path: wp-content/uploads/
    Add Year & Month to Bucket Path: On
    Add Object Version to Bucket Path: On
    
    Delivery Provider: Amazon S3
    Deliver Offloaded Media: On
    
    Force HTTPS: Off
    
    Active Theme Name: Astra
    Active Theme Version: 4.6.8
    Active Theme Folder: astra
    
    Active Plugins:
    Akismet Anti-spam: Spam Protection (v5.3.1) by Automattic - Anti-spam Team
    Astra Pro (v4.6.4) by Brainstorm Force
    Google Listings and Ads (v2.6.1) by WooCommerce
    Jetpack (v13.2) by Automattic
    MailPoet (v4.45.0) by MailPoet
    Pinterest for WooCommerce (v1.3.22) by WooCommerce
    Spectra (v2.12.4) by Brainstorm Force
    Starter Templates (v4.0.13) by Brainstorm Force
    TikTok (v1.2.4) by TikTok
    WP Mail SMTP (v4.0.1) by WP Mail SMTP
    WP Offload Media Lite (v3.2.7) by Delicious Brains
    WPForms Lite (v1.8.7.2) by WPForms
    WooCommerce (v8.6.1) by Automattic
    WooCommerce PayPal Payments (v2.5.4) by WooCommerce
    WooCommerce Shipping & Tax (v2.5.2) by WooCommerce
    WooPayments (v7.3.0) by Automattic

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi @soapergem!

    WP Offload Media Support Team here. Thanks for reaching out with your query! We would be happy to assist.

    So that debug.log captures info why the plugin returns 403, can you kindly click on the “Check again” link under Delivery Settings? See – https://share.zight.com/KouKklNp

    Then please share the debug.log file contents here in your next response. You may remove/sanitize any sensitive data.

    Thread Starter soapergem

    (@soapergem)

    That’s just it, though… the debug.log file is NOT capturing anything related to the WP Offload Media plugin. I made sure that the debug log is turned on, and I can see other, unrelated plugins logging messages there. I clicked that ‘Check again’ link over a dozen times, but your plugin isn’t saving any debug log lines at all.

    So instead I went ahead and added a bucket policy that looks like this:

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "PublicReadGetObject",
                "Effect": "Allow",
                "Principal": "*",
                "Action": "s3:GetObject",
                "Resource": "arn:aws:s3:::beateasel.com/*"
            }
        ]
    }

    And this at least made it so images started displaying. However now the plugin is giving a different error: “Private media is currently exposed through unsigned URLs. Restore privacy by verifying the configuration of private media settings.”

    Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi @soapergem,

    Is your debug.log file still active? It looks like WP Offload Media couldn’t detect it based on your diagnostics.

    Screenshot: https://share.zight.com/7KunrbQo

    Please ensure that the WP_DEBUG constants are above / before the lines that load the wp-settings.php file.

    Regarding the error “Private media is currently exposed through unsigned URLs. Restore privacy by verifying the configuration of private media settings”, that message shows up for when a private file can be accessed using an unsigned URL. This happens during the plugin’s testing of the public and private delivery from the bucket using test files. The debug.log file usually shows what could be causing the issues.

    Also, if you are using custom bucket policies, kindly check our documentation below for the required permissions:

    https://deliciousbrains.com/wp-offload-media/doc/custom-iam-policy-for-amazon-s3/

    Let us know how it goes for you.

    Thread Starter soapergem

    (@soapergem)

    Hi @dbisupport, yes I am sure it is active. When I posted my original post which as you noticed shows WP_DEBUG set to false, I had already gone back and forth a couple of times on changing that setting, and I happened to pull the info at a moment when I had it disabled. But rest assured, I have had both WP_DEBUG and WP_DEBUG_LOG set to true for weeks now, as you can see here: https://i.imgur.com/v7L3Eyv.png

    Despite this, nothing is showing up in the debug log file from your plugin. Please advise.

    Plugin Support Delicious Brains Support

    (@dbisupport)

    Hi @soapergem,

    Thanks for the response.

    Since no errors from our plugin are being logged on your debug.log, could you try opening your browser’s console, then click the “Check again” link? Do you see any errors logged in your console?

    https://deliciousbrains.com/wp-migrate-db-pro/doc/debugging-browser-console-errors/

    Also, if possible, could you please send us a copy of your PHP error logs or server error logs? You may have to ask your hosting provider for help on getting the files.

    It’s also worth checking for plugin/theme conflicts. Please temporarily deactivate all other plugins except WP Offload Media and switch to deactivate to a default theme to verify.

    Thread Starter soapergem

    (@soapergem)

    Alright, after a LOT of trial and error, I found a workaround that fixed my issue. Using phpMyAdmin, I went in and manually updated the plugin settings. This involved first running this query to find the settings object:

    SELECT?*?FROM?wp_options?WHERE?option_name?LIKE?'tantan_wordpress_s3'

    And then in that settings object, I edited the use-bucket-acls boolean property and set to true. Once I updated the row in the database with that new setting value, everything worked fine. I did not see any way to manually configure this particular setting in the UI, hence why I had to go down this path. I’m just posting this here for anyone else’s reference, if you ever encounter a similar problem.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘An error was encountered while testing the domain: Received 403 from endpoint’ is closed to new replies.