Questions tagged [google-cloud-node]
13 questions
5
votes
2 answers
Unittesting / mocking google datastore in nodejs
const Datastore = require('@google-cloud/datastore');
const datastore = Datastore();
function listTasks(res) {
const query = datastore.createQuery('Test');
datastore.runQuery(query)
.then((results) => {
const tasks = results[0];
…

jcgh582
- 839
- 2
- 13
- 20
3
votes
0 answers
How to authenticate to Cloud Function using a node.js client
I have a node.js application running in GKE that needs to be able to make a server-to-server call to a Cloud Function that has permission configured to only allow the service account configured on the GKE pod to invoke it. So basically, the node.js…

jacob
- 2,762
- 1
- 20
- 49
2
votes
1 answer
Query parameters in LIKE Statement causes slow response
I'm trying to query Google spanner with query parameters using node.js client library.
However, response is very slower with query parameter than without query parameter.
Query has LIKE(forward match) statement. I couldn't find recommended way to…

tahomatx
- 45
- 4
2
votes
1 answer
Getting entity's id inside a transaction
I have a datastore transaction where I create an entity (a user) letting datastore generate the ID for me.
I then would like to use that ID so that I can create another entity (of another kind).
While this is possible with regular datastore 'save'…

sqram
- 7,069
- 8
- 48
- 66
1
vote
2 answers
error "could not load the shared library" api google vms
I'm doing integration with the google api to manage the vms, the code used:
const {google} = require('googleapis');
const compute = google.compute('v1');
async function listVMs() {
const authClient = await google.auth.getClient({
…

Maurício Spagnol
- 35
- 1
- 6
1
vote
1 answer
What index do I need in Google Cloud Datastore to filter based on ID and another property?
I use Google Cloud Datastore to store entities with a generated ID by Datastore as primary key.
In addition, I store other properties for each entity, in this example owner.
An entity looks like this in the Google Cloud Datastore Console:
|Name/ID …

sceee
- 1,681
- 19
- 34
1
vote
2 answers
Can't access correct application default credentials for Dialogflow app
I have created a Dialogflow agent with a concurrent gcloud app. However, when I try to integrate it into a Node.js backend, it seems to be accessing the wrong application default credentials.
I can confirm that it is verifying authentication is…

doctopus
- 5,349
- 8
- 53
- 105
0
votes
1 answer
Requested entity was not found using google-devtools-cloudbuild
I took this sample code right out of google-cloud-node.
I have my ADC set up and working with Owner permissions and every cloud build permission available. The same account can create a build with gcloud submit build.
I took the trigger UUID out of…

jambrose
- 2,553
- 1
- 13
- 9
0
votes
1 answer
How can Upload HTML content on Google Cloud for Node js project?
I'm new to Google Cloud and I want to build 1 website using Node js. For now I just want to upload my HTML template on Google Cloud so I can see only the HTML part of project by using a URL, any help appreciated.
below is app.yalm file's…

sohel shaikh
- 102
- 1
- 12
0
votes
1 answer
Google Cloud Pub/Sub node library error parsing
I'm trying to handle error responses returned from the Google Cloud Pub/Sub api using their node client library. From what I can see, if you use their REST API directly (ie. not through the client library) they return common HTTP error…

ccnixon
- 267
- 1
- 11
0
votes
1 answer
Google Bigquery error "Multiple definitions of field."
I'm using the google cloud node library pushing JSON record to a bigquery table.
I'm getting a lot of PartialFailureError with message "Multiple definitions of field."
"errors": [
{
"message": "Multiple definitions of field.",
"reason":…

boulette
- 113
- 1
- 5
0
votes
1 answer
Perform resumable uploads using google-cloud-node
This code works great for normal uploads, but I am wondering how the resumable upload works when, for example, the user loses connection in the middle of a large upload. Is setting resumable to true in the writeStream options the only thing…

PandaScript
- 55
- 1
- 10
0
votes
1 answer
Google Cloud Storage removes entity/user after successful upload
I've been developing an Express/Firebase application for a few weeks now. All has worked fine until I ran into the following issue:
TypeError: firebase.storage is not a function
A quick search led me to TypeError: firebase.storage is not a function.…

Cisco
- 20,972
- 5
- 38
- 60