I have this simple code using Firestore-PHP
<?php
require 'vendor/autoload.php';
use Google\Cloud\Firestore\FirestoreClient;
putenv('GOOGLE_APPLICATION_CREDENTIALS='.realpath("key.json"));
$db = new FirestoreClient();
$docRef = $db->collection('orders')->document('1562292363537');
$snapshot = $docRef->snapshot();
?>
All my PHP calls to Firestore started getting this error suddenly: (403:Forbidden)
Uncaught Google\Cloud\Core\Exception\ServiceException: {
"message": "403:Forbidden",
"code": 14,
"status": "UNAVAILABLE",
"details": [
{
"@type": "content-length",
"data": "0"
},
{
"@type": "date",
"data": "Sun, 12 Dec 2021 00:00:36 GMT"
},
{
"@type": "alt-svc",
"data": "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\""
}
]
I'm having this issue with two different projects, and using the latest Google-Cloud-SDK available.
I tried to create a new service account key with full permissions But there's no benefit.
This error started as the same time App Check started showing this graph:
Although App check is Unenforced in the settings
Is there anyway to fix this issue please ?