GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Silent Failure Uploading file to Bucket Configured as a Website · Issue #95 · googleapis/google-cloud-python

Silent Failure Uploading file to Bucket Configured as a Website #95

New issue
Copy link
New issue
Copy link
Closed
Closed
Silent Failure Uploading file to Bucket Configured as a Website#95
Copy link
Assignees
dhermes
Labels
🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
Milestone
Storage Stable

Description

@Zoramite
Zoramite
opened on May 20, 2014
Issue body actions

Testing uploading a file to a bucket it silently fails if the bucket is configured as a website. Here is the sample code being used:

import gcloud.storage
connection = gcloud.storage.get_connection('project-id', '[email protected]', 'key-file.key')
bucket = connection.get_bucket('some.website.com')
path = 'answer.html'
file_key = bucket.new_key(path)
file_key.set_contents_from_string('42')
key = bucket.get_key(path)
print key.get_contents_as_string()

When I run this against a normal bucket the file is saved and read correctly. When run against a bucket that is configured as a website the upload silently fails and is unable to retrieve the value from the bucket to print.

Activity

Next
  1. Zoramite
    added
    bug
    on May 20, 2014
  2. gsalgado commented on Jun 9, 2014

    @gsalgado
    gsalgado
    on Jun 9, 2014
    More actions

    I can't seem to reproduce it. I created a bucket and configured it as a website using bucket.configure_website('index.html'), but even then the key.get_contents_as_string() call succeeded. Am I missing something or is there any chance this was fixed in the meantime?

  3. Zoramite commented on Jun 9, 2014

    @Zoramite
    Zoramite
    on Jun 9, 2014
    Author
    More actions

    I'm doing some more testing on this to make sure, but it may have something to do with using a secondary key for the service account. I had generated a new key for the service account since I didn't have access to the original key and it was giving me some forbidden errors when I try to create a new bucket.

    Should there be a problem using multiple keys for a service account? Or should any of the generated keys work correctly?

  4. Zoramite commented on Jun 10, 2014

    @Zoramite
    Zoramite
    on Jun 10, 2014
    Author
    More actions

    I tested again with a fresh service account, but trying to call bucket.configure_website('index.html') gives an permission error on an existing bucket that is already serving as a website:

    {
     "error": {
      "errors": [
       {
        "domain": "global",
        "reason": "forbidden",
        "message": "Forbidden"
       }
      ],
      "code": 403,
      "message": "Forbidden"
     }
    }
    

    Trying to create a new bucket is giving this error:

    {
     "error": {
      "errors": [
       {
        "domain": "global",
        "reason": "forbidden",
        "message": "The bucket you tried to create is a domain name owned by another user."
       }
      ],
      "code": 403,
      "message": "The bucket you tried to create is a domain name owned by another user."
     }
    }
    

    This is using the service account that I am able to create the same domain buckets in the cloud console just fine, so there shouldn't be any issue with the domain ownership.

  5. dhermes commented on Jan 27, 2015

    @dhermes
    dhermes
    on Jan 27, 2015
    Contributor
    More actions

    Closing this out since we could not reproduce.

    @gsalgado Please re-open if you are still having this issue.

  6. dhermes
    closed this as completedon Jan 27, 2015
  7. jgeewax
    modified the milestone: Storage Stable on Jan 30, 2015
  8. urshala
    added a commit that references this issue on Jan 17, 2020

    Merge pull request googleapis#95 from hellbe/master

    fa28547
  9. yoshi-automation
    added
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Apr 7, 2020
  10. JustinBeckwith
    assigned
    dhermes
    on Feb 1, 2021
  11. atulep
    added 2 commits that reference this issue on Apr 6, 2023

    fix: Remove incorrect comment on enhanced models (#95)

    ca1483f

    fix: Remove incorrect comment on enhanced models (#95)

    7f60ac6
  12. 97 remaining items

  13. parthea
    added 11 commits that reference this issue on Nov 24, 2025

    chore(python): conditionally load credentials in .kokoro/build.sh (#95)

    be0b5a9

    changes without context (#95)

    4c44839

    chore: migrate to owl bot (#95)

    1bef962

    chore: release 1.15.2 (#95)

    2c42972

    test: disambiguate log files for flakybot (#95)

    27a4e3c

    chore: changed convert_external_annotation test (#95)

    b348009

    chore(deps): update dependency google-cloud-logging to >=1.14.0, <2.4 (…

    c735564

    tests: re-enable cross-language conformance tests (#205)

    e9d645d

    chore(deps): update dependency google-cloud-logging to v2 (#95)

    f3eb30e

    Implement hooks. (#95)

    fb8046e

    Add crypt.Signer.from_service_account_file (#95)

    4171a1e
  14. parthea
    added a commit that references this issue on Mar 2, 2026

    Require 200 response for initial resumable upload request. (#95)

    e567cea
  15. parthea
    added 3 commits that reference this issue on Mar 9, 2026

    docs: update to state that repo is now in preview (#95)

    4e2c804

    fix(storage): use OrderedDict while encoding POST policy (#95)

    30c1cef

    docs: remove client-usage sections that no longer apply (#95)

    619b13e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dhermes
    dhermes

Labels

🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    • Storage Stable

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.