I am running robo tests on a variety of devices in the Firebase Test Lab (e.g. Pixel 3, Api Level 28). The test devices cannot load data from the Firebase real-time database, because of an invalid app check token.
Relevant logs include:
09-17 21:33:30.327: D/WebSocket(1870): ws_0 - websocket opened
09-17 21:33:30.327: D/WebSocket(1870): ws_0 - Reset keepAlive
09-17 21:33:30.327: D/WebSocket(1870): ws_0 - ws message: {"t":"c","d":{"t":"s","d":"Invalid appcheck token"}}
09-17 21:33:30.328: D/WebSocket(1870): ws_0 - Reset keepAlive. Remaining: 44999
09-17 21:33:30.328: D/WebSocket(1870): ws_0 - HandleNewFrameCount: 1
09-17 21:33:30.328: D/WebSocket(1870): ws_0 - handleIncomingFrame complete frame: {t=c, d={t=s, d=Invalid appcheck token}}
09-17 21:33:30.328: D/Connection(1870): conn_0 - Got control message: {t=s, d=Invalid appcheck token}
09-17 21:33:30.328: D/Connection(1870): conn_0 - Connection shutdown command received. Shutting down...
09-17 21:33:30.328: W/PersistentConnection(1870): pc_0 - Firebase Database connection was forcefully killed by the server. Will not attempt reconnect. Reason: Invalid appcheck token
09-17 21:33:30.328: D/PersistentConnection(1870): pc_0 - Connection interrupted for: server_kill
09-17 21:33:30.329: D/Connection(1870): conn_0 - closing realtime connection
09-17 21:33:30.329: D/WebSocket(1870): ws_0 - websocket is being closed
09-17 21:33:30.329: D/PersistentConnection(1870): pc_0 - Got on disconnect due to OTHER
The same build runs on my phone (Pixel 3) and loads all data successfully.
I wondered if I needed to do something similar to what is described in "Use the debug provider for unit testing in a CI environment" (https://firebase.google.com/docs/app-check/android/debug-provider), but that doesn't make sense to me-- these are physical devices, right? (Furthermore, it's completely unclear to me how I'd go about following those steps from the Firebase console).
I'd greatly appreciate any hints or advice! Thank you.