Skip to content

Firestore transaction fails after long delay when wifi network is changed in background #4905

Closed
@Gagnant

Description

@Gagnant

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 11.3 (11C29)
  • Firebase SDK version: 6.9.0
  • Firebase Component: Firestore
  • Component version: 6.9.0
  • Installation method: Carthage

[REQUIRED] Step 2: Describe the problem

After changing a wifi network in the background and then executing firestore transaction in the foreground, it fails after a noticeable delay of ~20 seconds. After that, transactions are executed as regular.

Steps to reproduce:

  1. Move the app to the background.
  2. Change wifi network.
  3. Return to the application (move to foreground).
  4. Execute firestore transaction.

Observed Results:

The first transaction fails with a timeout error after ~20 seconds. After that, transactions are executed as regular.

Expected Results:

Transaction succeeds after a short delay.

Relevant Code:

2020-02-13 17:07:18.547536+0200 xxx [1317:296953] dnssd_clientstub read_all(7) DEFUNCT
2020-02-13 17:07:18.913236+0200 xxx [1317:298728] 6.9.0 - [Firebase/Analytics][I-ACS033003] Scheduling user engagement timer
2020-02-13 17:07:18.913635+0200 xxx [1317:298728] 6.9.0 - [Firebase/Analytics][I-ACS002002] Engagement timer scheduled to fire in approx. (s): 3600
2020-02-13 17:07:23.475445+0200 xxx [1317:298326] Change device property transaction started!
2020-02-13 17:07:41.729386+0200 xxx [1317:297210] dnssd_clientstub write_all(20) DEFUNCT
2020-02-13 17:07:41.729653+0200 xxx [1317:297210] dnssd_clientstub deliver_request ERROR: write_all(20, 65 bytes) failed
2020-02-13 17:07:41.729892+0200 xxx [1317:297210] dnssd_clientstub write_all(20) DEFUNCT
2020-02-13 17:07:41.731598+0200 xxx [1317:298326] Change device property transaction failed!
2020-02-13 17:07:41.734143+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282517330'): operation of type 1 failed
2020-02-13 17:07:41.734526+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282517330'): finishing the underlying call
2020-02-13 17:07:41.735600+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282517330'): fast finishing 0 completion(s)
2020-02-13 17:07:41.736226+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282507a80'): operation of type 1 failed
2020-02-13 17:07:41.736332+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282507a80'): finishing the underlying call
2020-02-13 17:07:41.736616+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282507a80'): fast finishing 0 completion(s)
2020-02-13 17:07:41.737334+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282517330'): finishing and notifying observers
2020-02-13 17:07:41.737646+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282517330'): shutting down; completions: 0, is finished: true
2020-02-13 17:07:41.738134+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282517330'): fast finishing 0 completion(s)
2020-02-13 17:07:41.738465+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] WatchStream (135f065e8) Stream error: 'Unavailable: Operation timed out'
2020-02-13 17:07:41.738927+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282517330'): destroying stream
2020-02-13 17:07:41.739487+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] WatchStream (135f065e8) backoff
2020-02-13 17:07:41.739712+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282507a80'): finishing and notifying observers
2020-02-13 17:07:41.739985+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282507a80'): shutting down; completions: 0, is finished: true
2020-02-13 17:07:41.740589+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282507a80'): fast finishing 0 completion(s)
2020-02-13 17:07:41.740759+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] RPC BatchGetDocuments completed. Error: 14: Operation timed out
2020-02-13 17:07:41.740922+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] RPC BatchGetDocuments returned headers (whitelisted):
2020-02-13 17:07:41.741095+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] GrpcStream('282507a80'): destroying stream
2020-02-13 17:07:41.741454+0200 xxx [1317:298325] 6.9.0 - [Firebase/Firestore][I-FST000001] WatchStream (135f065e8) start

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions