question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NullReferenceException during DatastoreDb.Create in F# .NET Core app

See original GitHub issue

In an empty F# .NET Core application this line of code throws a NullReferenceException:

let db = DatastoreDb.Create "<some-project-id>"

These are the exception details:

Exception message: Object reference not set to an instance of an object.

Exception type: System.NullReferenceException

Stack trace:    at Google.Api.Gax.Grpc.UserAgentBuilder.AppendDotNetEnvironment()
   at Google.Api.Gax.Grpc.ServiceSettingsBase..ctor()
   at Google.Cloud.Datastore.V1.DatastoreClientImpl..ctor(DatastoreClient grpcClient, DatastoreSettings settings)
   at Google.Cloud.Datastore.V1.DatastoreClient.Create(Channel channel, DatastoreSettings settings)
   at Google.Cloud.Datastore.V1.DatastoreDb.Create(String projectId, String namespaceId, DatastoreClient client)
   at Program.subscribeToMailingList(Subscriber subscriber)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
dustinmoriscommented, Mar 11, 2017

Ok makes sense. Well… that is sort of the beauty of OpenSource 😃 I love FSharp and the gcloud, this SDK is brilliant and my project relies on it and I don’t want to be blocked until this is resolved, so it was kind of my duty to investigate until I can keep moving, right? 😉

Also happy to help where I can!

1reaction
jskeetcommented, Mar 11, 2017

Thanks very much for reporting this. It sounds like Microsoft.Extensions.PlatformAbstractions.PlatformServices.Default is probably returning null. We’ll look into it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I resolve null reference exception in ASP.net Core ...
Why am I getting a null reference exception at @Html.DisplayNameFor(model => model.Contacts) and how can I fix it? ... What is being passed...
Read more >
How to fix "System.NullReferenceException" When ...
I'm using ASP.net Core App to connect to MSSQL database. I checked the connection when - Connect to Database and the database is...
Read more >
System.NullReferenceException message in creating ...
Hi everyone, I created a localdb sql server file(School.mdf) in the App_Data folder in an MVC project using .Net Framework 4.8.
Read more >
NullReferenceException when opening file
NET Core 3.1 solution with C# classes and a SQL project with sql file. When I close the tab and open the file...
Read more >
Issues with System.NullReferenceException occurrence ...
NET Core 3.1 is breaking when starting the web application because of a NullReferenceException, but this one is thrown in the IISHttpServer.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found