• I tried exporting my site to s3 but this error occured.
    BAD RESPONSE STATUS FROM API (403)
    Deployment: error encountered
    Exception: BAD RESPONSE STATUS FROM API (403) in /var/www/html/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/SitePublisher.php:2

    It just suddenly happened.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Leon Stafford

    (@leonstafford)

    Hi @quintcyril is this the first time to try the S3 export or were you successful before and this error has just occurred today?

    If this is first time attempting, please try unchecking the 4 boxes for Public ACL settings in the S3 bucket’s properties, this is a common issue, there may be better explanation on our own forum or GitHub Issues.

    Basically, we set each object we upload to S3 as public-read, so need those permissions relaxed.

    Thread Starter quintcyril

    (@quintcyril)

    Hi @leonstafford, thank you so much for responding, I had this problem for 2 days now. It’s not my first time exporting. It always has been successfull. It just happened suddenly and I had a hard time figuring out.

    • This reply was modified 4 years, 7 months ago by quintcyril.
    Thread Starter quintcyril

    (@quintcyril)

    @leonstafford S3 credentials is also okay and the 4 boxes are unchecked.

    This is the full error I guess
    Uploading /var/www/html/wp-content/uploads/wp-static-html-output-1597217983/%e3%83%86%e3%82%b9%e3%83%88/2/index.html to %e3%83%86%e3%82%b9%e3%83%88/2/ in S3
    PUT’ing file to %e3%83%86%e3%82%b9%e3%83%88/2/index.html in S3
    Using S3 Endpoint blog.ffm.jp.s3.ap-northeast-1.amazonaws.com
    S3 URL: https://blog.ffm.jp.s3.ap-northeast-1.amazonaws.com/%e3%83%86%e3%82%b9%e3%83%88/2/index.html
    API response code: 403
    API response body: <?xml version=”1.0″ encoding=”UTF-8″?>
    <Error>SignatureDoesNotMatch<Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><AWSAccessKeyId>AKIA4ZSR7WEPUD343BNG</AWSAccessKeyId><StringToSign>AWS4-HMAC-SHA256
    20200812T074013Z
    20200812/ap-northeast-1/s3/aws4_request
    4579fb752a9d8be7bb40f9dc7e6811d5546a354f8edd0585b043b1f762b5586a</StringToSign><SignatureProvided>11f3091997024172bfc4b5114a9f4f254ad4329f81b783ab9d0d0d7d222dbb2e</SignatureProvided><StringToSignBytes>41 57 53 34 2d 48 4d 41 43 2d 53 48 41 32 35 36 0a 32 30 32 30 30 38 31 32 54 30 37 34 30 31 33 5a 0a 32 30 32 30 30 38 31 32 2f 61 70 2d 6e 6f 72 74 68 65 61 73 74 2d 31 2f 73 33 2f 61 77 73 34 5f 72 65 71 75 65 73 74 0a 34 35 37 39 66 62 37 35 32 61 39 64 38 62 65 37 62 62 34 30 66 39 64 63 37 65 36 38 31 31 64 35 35 34 36 61 33 35 34 66 38 65 64 64 30 35 38 35 62 30 34 33 62 31 66 37 36 32 62 35 35 38 36 61</StringToSignBytes><CanonicalRequest>PUT
    /%E3%83%86%E3%82%B9%E3%83%88/2/index.html

    content-type:text/html
    date:20200812T074013Z
    host:blog.ffm.jp.s3.ap-northeast-1.amazonaws.com
    x-amz-acl:public-read
    x-amz-content-sha256:7158940679a06dd3d37a41f794aef0b96d77872711c423d9a8ea4484b73bc741

    content-type;date;host;x-amz-acl;x-amz-content-sha256
    7158940679a06dd3d37a41f794aef0b96d77872711c423d9a8ea4484b73bc741</CanonicalRequest><CanonicalRequestBytes>50 55 54 0a 2f 25 45 33 25 38 33 25 38 36 25 45 33 25 38 32 25 42 39 25 45 33 25 38 33 25 38 38 2f 32 2f 69 6e 64 65 78 2e 68 74 6d 6c 0a 0a 63 6f 6e 74 65 6e 74 2d 74 79 70 65 3a 74 65 78 74 2f 68 74 6d 6c 0a 64 61 74 65 3a 32 30 32 30 30 38 31 32 54 30 37 34 30 31 33 5a 0a 68 6f 73 74 3a 62 6c 6f 67 2e 66 66 6d 2e 6a 70 2e 73 33 2e 61 70 2d 6e 6f 72 74 68 65 61 73 74 2d 31 2e 61 6d 61 7a 6f 6e 61 77 73 2e 63 6f 6d 0a 78 2d 61 6d 7a 2d 61 63 6c 3a 70 75 62 6c 69 63 2d 72 65 61 64 0a 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 3a 37 31 35 38 39 34 30 36 37 39 61 30 36 64 64 33 64 33 37 61 34 31 66 37 39 34 61 65 66 30 62 39 36 64 37 37 38 37 32 37 31 31 63 34 32 33 64 39 61 38 65 61 34 34 38 34 62 37 33 62 63 37 34 31 0a 0a 63 6f 6e 74 65 6e 74 2d 74 79 70 65 3b 64 61 74 65 3b 68 6f 73 74 3b 78 2d 61 6d 7a 2d 61 63 6c 3b 78 2d 61 6d 7a 2d 63 6f 6e 74 65 6e 74 2d 73 68 61 32 35 36 0a 37 31 35 38 39 34 30 36 37 39 61 30 36 64 64 33 64 33 37 61 34 31 66 37 39 34 61 65 66 30 62 39 36 64 37 37 38 37 32 37 31 31 63 34 32 33 64 39 61 38 65 61 34 34 38 34 62 37 33 62 63 37 34 31</CanonicalRequestBytes><RequestId>CAC26CE1323B6987</RequestId><HostId>pTuJn+jnPBX8C0MZoivMtp9JobKtFZmhDqUcXTQo8BBpT7N5lVb8dEvYV+0syhMswne4pX/+4gg=</HostId></Error>
    BAD RESPONSE STATUS FROM API (403)
    Deployment: error encountered
    Exception: BAD RESPONSE STATUS FROM API (403) in /var/www/html/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/SitePublisher.php:2
    Stack trace:
    #0 /var/www/html/wp-content/plugins/static-html-output-plugin/plugin/deployers/S3.php(2): WP2Static_SitePublisher->checkForValidResponses(403, Array)
    #1 /var/www/html/wp-content/plugins/static-html-output-plugin/plugin/deployers/S3.php(2): WP2Static_S3->put_s3_object(‘%e3%83%86%e3%82…’, ‘<!DOCTYPE html>…’, ‘text/html’)
    #2 /var/www/html/wp-content/plugins/static-html-output-plugin/plugin/deployers/S3.php(2): WP2Static_S3->upload_files()
    #3 /var/www/html/wp-content/plugins/static-html-output-plugin/plugin/deployers/S3.php(8): WP2Static_S3->__construct()
    #4 /var/www/html/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/Dispatcher.php(2): require_once(‘/var/www/html/w…’)
    #5 /var/www/html/wp-content/plugins/static-html-output-plugin/wp2static.php(17): require_once(‘/var/www/html/w…’)
    #6 /var/www/html/wp-settings.php(371): include_once(‘/var/www/html/w…’)
    #7 /var/www/html/wp-config.php(91): require_once(‘/var/www/html/w…’)
    #8 /var/www/html/wp-load.php(37): require_once(‘/var/www/html/w…’)
    #9 /var/www/html/wp-admin/admin-ajax.php(22): require_once(‘/var/www/html/w…’)
    #10 {main}

    Then along the process of exporting the admin-ajax.php suddenly errors 500 internal

    Plugin Author Leon Stafford

    (@leonstafford)

    Hi @quintcyril – OK, this now looks more like an issue with the encoded Japanese(?) chars in filenames.

    Unfortunately, the only way I can recommend today for these is to use ZIP export method, then use AWS’s CLI tool to do aws s3 sync to get the files in. This works fine, there’s an open issue around this in one of the GitHub repositories and no quick fix in sight.

    Thread Starter quintcyril

    (@quintcyril)

    omg @leonstafford thanks for this. I found out it errors when there is japanese character in the slug, it’s okay for post title and japanese in content.

    • This reply was modified 4 years, 7 months ago by quintcyril.
    Plugin Author Leon Stafford

    (@leonstafford)

    Don’t worry, @quintcyril, I feel your pain!

    This was my day(s) debugging it a cpl months ago:

    https://github.com/WP2Static/static-html-output-plugin/issues/58

    The open issue for this is at https://github.com/WP2Static/static-html-output-plugin/issues/15

    Thread Starter quintcyril

    (@quintcyril)

    Good Day @leonstafford. Off topic. Is it okay to use the 6.6.20 version of wp2static? It’s the newest version right?.

    Plugin Author Leon Stafford

    (@leonstafford)

    @quintcyril 6.6.21 here: https://github.com/WP2Static/static-html-output-plugin/files/4822705/static-html-output-plugin-6.6.21.zip

    Probably best to deactivate and uninstall any other ones first. Note, this one will show as “Static HTML Output”, not WP2Static.

    If you need native Windows filesystem support, ie, for XAMPP, there’s another version I can share. Those changes aren’t yet released anywhere.

    Hi Leon,
    Could I have a copy of the Windows version? I suspect this may be an issue my end too with paths.
    Many thanks

    Plugin Author Leon Stafford

    (@leonstafford)

    Of course, here you go!

    https://github.com/WP2Static/static-html-output-plugin/files/4943854/gulshanwinziptest.zip

    Known to work with Zip and BunnyCDN deployment methods so far, I haven’t tested the others.

    Please let me know if that helps

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Uncaught Exception: Exception: BAD RESPONSE STATUS FROM API (403)’ is closed to new replies.