fsexportbigquery: Error when mirroring data to BigQuery ApiError: Precondition check failed.
See original GitHub issue[REQUIRED] Step 2: Describe your configuration
- Extension name: `firestore-bigquery-export
- Extension version:
0.1.21
- Configuration values (redact info where appropriate):
- Cloud Functions location: us-central1
- BigQuery Dataset location: us
- Collection path: ----
- Wildcard Column field with Parent Firestore Document IDs (Optional): false
- Dataset ID: ----
- Table ID: —
- BigQuery SQL table Time Partitioning option type: MONTH
- BigQuery Time Partitioning column name (Optional): Parameter not set
- Firestore Document field name for BigQuery SQL Time Partitioning field option (Optional): createdAt
- BigQuery SQL Time Partitioning table schema field(column) type (Optional): TIMESTAMP
[REQUIRED] Step 3: Describe the problem
Looking at the logs of the extension, it has been throwing these errors multiple times per day. See fulls stack trace below
Error when mirroring data to BigQuery ApiError: Precondition check failed.
at new ApiError (/workspace/node_modules/@firebaseextensions/firestore-bigquery-change-tracker/node_modules/@google-cloud/common/build/src/util.js:58:15)
at Util.parseHttpRespBody (/workspace/node_modules/@firebaseextensions/firestore-bigquery-change-tracker/node_modules/@google-cloud/common/build/src/util.js:193:38)
at Util.handleResp (/workspace/node_modules/@firebaseextensions/firestore-bigquery-change-tracker/node_modules/@google-cloud/common/build/src/util.js:134:117)
at /workspace/node_modules/@firebaseextensions/firestore-bigquery-change-tracker/node_modules/@google-cloud/common/build/src/util.js:432:22
at onResponse (/workspace/node_modules/@firebaseextensions/firestore-bigquery-change-tracker/node_modules/retry-request/index.js:228:7)
at /workspace/node_modules/@firebaseextensions/firestore-bigquery-change-tracker/node_modules/teeny-request/build/src/index.js:233:13
at processTicksAndRejections (internal/process/task_queues.js:95:5) {
code: 412,
errors: [
{
message: 'Precondition check failed.',
domain: 'global',
reason: 'failedPrecondition'
}
],
response: Gunzip {
_writeState: Uint32Array(2) [ 16110, 0 ],
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [],
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: false,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
destroyed: true,
errored: null,
closed: true,
closeEmitted: true,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: false,
dataEmitted: true,
decoder: null,
encoding: null,
[Symbol(kPaused)]: false
},
_events: [Object: null prototype] {
prefinish: [Function: prefinish],
error: [Array],
data: [Function (anonymous)],
end: [Function (anonymous)]
},
_eventsCount: 4,
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: true,
ended: true,
finished: true,
destroyed: true,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: false,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 0,
prefinished: true,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
errored: null,
closed: true
},
allowHalfOpen: true,
bytesWritten: 171,
_handle: null,
_outBuffer: <Buffer 7b 0a 20 20 22 65 72 72 6f 72 22 3a 20 7b 0a 20 20 20 20 22 63 6f 64 65 22 3a 20 34 31 32 2c 0a 20 20 20 20 22 6d 65 73 73 61 67 65 22 3a 20 22 50 72 ... 16334 more bytes>,
_outOffset: 274,
_chunkSize: 16384,
_defaultFlushFlag: 2,
_finishFlushFlag: 2,
_defaultFullFlushFlag: 3,
_info: undefined,
_maxOutputLength: 4294967295,
_level: -1,
_strategy: 0,
statusCode: 412,
statusMessage: 'Precondition Failed',
request: {
agent: [Agent],
headers: [Object],
href: 'https://bigquery.googleapis.com/bigquery/v2/projects/-----/datasets/--------/tables/-----_raw_latest?'
},
body: '{\n' +
' "error": {\n' +
' "code": 412,\n' +
' "message": "Precondition check failed.",\n' +
' "errors": [\n' +
' {\n' +
' "message": "Precondition check failed.",\n' +
' "domain": "global",\n' +
' "reason": "failedPrecondition"\n' +
' }\n' +
' ],\n' +
' "status": "FAILED_PRECONDITION"\n' +
' }\n' +
'}\n',
headers: {
'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"',
'cache-control': 'private',
'content-encoding': 'gzip',
'content-type': 'application/json; charset=UTF-8',
date: 'Thu, 17 Mar 2022 18:13:53 GMT',
etag: 'hRYIRTQGOE4iLx5JAW+7Qg==',
server: 'ESF',
'transfer-encoding': 'chunked',
vary: 'Origin, X-Origin, Referer',
'x-content-type-options': 'nosniff',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '0'
},
toJSON: [Function: toJSON],
[Symbol(kCapture)]: false,
[Symbol(kTransformState)]: {
afterTransform: [Function: bound afterTransform],
needTransform: false,
transforming: false,
writecb: null,
writechunk: null,
writeencoding: 'buffer'
},
[Symbol(kError)]: null
}
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:11 (1 by maintainers)
Top Results From Across the Web
BigQuery PATCH Precondition check failed
I'm using BigQuery Python Client version google-cloud-bigquery==2.15.0 and sometimes when I update (PATCH) a table via:.
Read more >What is this error PRECONDITION FAILED - GCP
Hi@Genashtim,. The condition set in the request's If-Match or If-None-Match HTTP request header was not met. See the ETag section of the ...
Read more >BigQuery - Supermetrics Support
How to create a BigQuery transfer · How to enroll a data source in BigQuery · How to enroll a connector in a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@clivi-kj you can downgrade using the firebase cli.
One way is doing this:
Downgrading from 0.1.22 to 0.1.20 helped me too. Here’s the before and after: