Issue
When running the below code block (from the readme) to instantiate Client struct
let client = Client::default().await.unwrap();
I get the following error:
GAX(Auth(HttpError(reqwest::Error { kind: Decode, source: Error("EOF while parsing a value", line: 1, column: 0) })))
I am using the google_auth
crate from this repository utilising the below code block to set the credentials (from the readme)
let credentials_path = PathBuf::from("./src/keys/dev-key.json");
let service_account = CustomServiceAccount::from_file(credentials_path).expect("Service account threw an error");
let authentication_manager = AuthenticationManager::from(service_account);
let scopes = &["https://www.googleapis.com/auth/cloud-platform"];
Setting the credentials seems to be working fine; when I run the code in debug, I can see the below all populating with the correct values
My environment
rustc --version
rustc 1.62.1 (e092d0b6b 2022-07-16)
cargo --version
cargo 1.62.1 (a748cf5a3 2022-06-08)
My Cargo.toml
file looks like this:
actix-web = "4.1.0"
awc = "3.0.0"
colored = "2.0.0"
dotenv = "0.15.0"
env_logger = "0.9.0"
futures = "0.3.21"
gcp_auth = "0.7.3"
google-cloud-gax = "0.7.0"
google-cloud-googleapis = {version = "0.4.0", features = ["pubsub"]}
google-cloud-pubsub = {version = "0.4.0", features = ["trace"]}
google_auth = "0.2.1"
prost-build = "0.10.4"
protobuf = "3.1.0"
serde = { version = "1.0.140", features = ["derive"] }
serde_json = "1.0.82"
tokio = "1.20.1"
validator = "0.16.0"
validator_derive = "0.16.0"