Support

The vast majority of the code in the Google Cloud Libraries is autogenerated. If you're running into problems, it probably isn't in that code (although that's always a possibility). The problems we see being reported usually fall into a few different buckets, described below. Additionally, the troubleshooting page has guides for logging and debugging.

The Google Cloud Libraries for .NET follow the Google Open Source .NET Support Policy.

Authentication issues

Authentication is a complex topic. We would advise reading the general Google Cloud Authentication documentation first in order to determine what authentication strategy is most suitable for your application. After that, the .NET Authentication documentation should help you implement that strategy.

If either it's unclear how to implement your chosen authentication strategy, or you have code which you expect to work but which doesn't, it's worth trying to isolate that aspect from any other application code. Creating a small console application which initializes appropriate credentials and then uses them in a single API call can help to make things much clearer.

Network/environmental issues

Often users report issues which turn out to be due to unusual network environments (in particular proxies which may not fully implement HTTP/2.0) or other unexpected platforms. Please review the list of supported platforms before reporting an issue; while unsupported platforms may work in some situations, we cannot offer help if you run into problems.

If a problem looks like it may be network-related, it's worth attempting to reproduce the issue in a different network environment. For example, if you're seeing a problem when running behind a corporate firewall, try to reproduce it when running on a different network or within a Google Cloud VM or container. (Google Cloud Functions are very simple to create and deploy, as a quick way of performing a single API call as a test.)

API-specific (server) issues

Sometimes APIs don't behave as you might expect them to even when the client library is "working" perfectly, in terms of accurately providing your requests to the API server and returning the response to your code.

We know that what ultimately matters is whether or not your application behaves as you want it to, but for most autogenerated libraries, the maintainers of the libraries don't know the details of how to use the APIs. Each API has its own dedicated support page with details of the best ways of getting support for that API, as well as troubleshooting tips and common error messages. See the Speech-to-Text API support page for an example of this.

If you're not sure whether the problem is caused by the client library or the Cloud API, there are a few ways you can test this:

  • If you can find the method you want to call in the "REST reference" part of the API, you may be able to try to call the method directly in the browser. For example, when calling the Text-to-Speech API's ListVoices method, the "Try it!" button on the REST voices allows you to test the call.
  • You can try some of the .NET samples for the API, initially "just as they are" and then adapted to your use case, to see if you can reproduce the problem.
  • If you're proficient in another language, you can try a client library for that language for the same API.

We understand that it's not always easy to tell what's a library problem and what's an API problem; if you're not sure, feel free to report a problem as described below. Please be aware that if the library appears to be behaving properly, the client libraries team is unlikely to be able to provide API-specific guidance, and may well suggest that you follow one of the API-specific support routes.

Reporting a problem

If none of the above advice helps to resolve your issue, please ask for help. If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Otherwise, please either file an issue on GitHub or ask a question on Stack Overflow. In most cases creating a GitHub issue will result in a quicker turnaround time, but if you believe your question is likely to help other users in the future, Stack Overflow is a good option. When creating a Stack Overflow question, please use the google-cloud-platform tag and either c# or .net.

Although there are multiple GitHub repositories associated with the Google Cloud Libraries, we recommend filing an issue in https://github.com/googleapis/google-cloud-dotnet unless you are certain that it belongs elsewhere. The maintainers may move it to a different repository where appropriate, but you will be notified of this via the email associated with your GitHub account.

When filing an issue or asking a Stack Overflow question, please include as much of the following information as possible. This will enable us to help you quickly.

A minimal example

Unless your question is specifically about integrating with ASP.NET Core or some other framework, it's usually best to reproduce the problem in a console application. This should be as small as you can make it, with no business logic (both to protect the confidentiality of your work, and to avoid that business logic from distracting from the question). As of .NET 6, the console application template is really minimal, which helps to focus on the code that's failing.

Please include details of what you expect the code to do, and what it actually does. If the problem involves errors (whether exceptions or compile-time errors), please give full details. All errors and code should be provided as text, not as screenshots. If you want to show some information from a debugger, it may be useful to include a screenshot as well, but that should be in addition to text.

Please be careful not to include any confidential information in your example. If your actual code hard-codes the project ID, please replace it with "my-project-id" or something similar when you post the code. Alternatively, use environment variables or command line arguments to specify any confidential information. You should check for any confidential information in exceptions as well, both in the error messages and the stack traces.

It's not always easy (or even possible) to reproduce the problem in a minimal or reliable way - transient errors can be very hard to track down. We understand, and just ask that you take whatever diagnostics steps you can go through, as well as explaining all the information you have.

Library, platform and other environmental information

Please specify which Google Cloud Libraries you're using, as well as their versions. Additionally, include information about which version of .NET you're using. Platform information such as operating system version should be included, along with information about "where" the code is running (on your developer laptop, in your company data center, in Google Cloud Run etc).

One simple way of providing the library and .NET version information is to include the project file content alongside the code. That doesn't generally specify the operating system or where the code is running, however - so please still provide those details.

Example

We follow the same process described above for diagnosing problems ourselves. Here's an example that would make a good GitHub issue or Stack Overflow post - it's an example of real code we used when investigating an issue before a release.


I'm trying to use self-signed JWTs with the Google.Cloud.BigQuery.V2 library. Some operations (creating datasets and tables) work fine, but inserting data by uploading a CSV file fails with an exception. (Developer laptop, not behind any proxies, running Windows 11.)

Source code for a sample console application is below; the project ID is accepted via the only command-line argument. My default application credentials are a service account with appropriate permissions.

using Google.Cloud.BigQuery.V2;
using System.Text;

var client = new BigQueryClientBuilder
{
    ProjectId = args[0],
    UseJwtAccessWithScopes = true
}.Build();

var dataset = client.CreateDataset("jwt_test");
var schema = new TableSchemaBuilder
{
    { "name", BigQueryDbType.String },
    { "score", BigQueryDbType.Int64 },
}.Build();
var table = dataset.CreateTable("test_table", schema);

var csv = "xyz,20\nabc,10";
var stream = new MemoryStream(Encoding.UTF8.GetBytes(csv));

// This is the line that throws an exception
table.UploadCsv(stream).PollUntilCompleted().ThrowOnAnyError();

Project file:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Google.Cloud.BigQuery.V2" Version="3.1.0" />
    <!-- Deliberate upgrade to use self-signed JWTs -->
    <PackageReference Include="Google.Api.Gax.Rest" Version="4.3.0-test01" />
  </ItemGroup>
</Project>

Exception:

Unhandled exception. The service bigquery has thrown an exception.
HttpStatusCode is Forbidden.
Google.Apis.Requests.RequestError
The request is missing a valid API key. [403]
Errors [
        Message[The request is missing a valid API key.] Location[ - ] Reason[forbidden] Domain[global]
]

Google.GoogleApiException: The service bigquery has thrown an exception. HttpStatusCode is Forbidden. The request is missing a valid API key.
   at Google.Cloud.BigQuery.V2.BigQueryClientImpl.UploadData(JobConfigurationLoad loadConfiguration, Stream input, String contentType, JobCreationOptions options)
   at Google.Cloud.BigQuery.V2.BigQueryClientImpl.UploadCsv(TableReference tableReference, TableSchema schema, Stream input, UploadCsvOptions options)
   at Google.Cloud.BigQuery.V2.BigQueryTable.UploadCsv(Stream input, UploadCsvOptions options)
   at Program.<Main>$(String[] args) in [...]\Program.cs:line 21

If I set UseJwtAccessWithScopes = false when building the client, this code works fine. Why does UseJwtAccessWithScopes = true cause a failure?