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

Not able to decode bucket? #124

Open
safwaan-menk opened this issue Dec 19, 2022 · 1 comment
Open

Not able to decode bucket? #124

safwaan-menk opened this issue Dec 19, 2022 · 1 comment

Comments

@safwaan-menk
Copy link

safwaan-menk commented Dec 19, 2022

I made a service account and gave it the "owner" role so it should have full access. I downloaded the service account json by adding a new key, and set its environment variable on my system to the path where it was downlaoded

Theese are the roles for my service account

image

I am using the below code in my main.rs

use cloud_storage::Client;
use log::info;
use std::error::Error;

#[tokio::main]
// Box is a placeholder for any dynamic object that we might not know the size of at runtime
// can use any anyhow error if we don't care about the type of error we get back
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    env_logger::init();
    info!("Logging started...");
    let client = Client::default();
    let bucket = client.bucket().read("MY--BUCKET--NAME").await?;

    Ok(())
}

where MY--BUCKET--NAME is the name of the cloud storage bucket.

But I am getting the below error

image

Edit: I know I have access and I am using the correct bucket name as well because when I use a random string in the .read() method I get one of these error swhich is expected

image

image

@safwaan-menk safwaan-menk changed the title Not able todecode bucket? Not able to decode bucket? Dec 19, 2022
@junbl
Copy link

junbl commented May 9, 2023

Looks like this is potentially the same issue as #115, which is fixed on master but not released to crates.io. You can use the git version in your Cargo.toml and see if that fixes it:

cloud-storage = { git = "https://github.com/ThouCheese/cloud-storage-rs" }

@ThouCheese any idea when that might be released?

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