Couldn't upload photo to firestore using the photoapp

Hi there,

I didn’t receive any error, and I could sign in, go to the camera tab and do all the steps involved in uploading a photo, however, it doesn’t get uploaded and I receive an error as below:

2022-04-12 16:44:27.088127+0300 photoapp[13896:73675] [boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics

2022-04-12 16:44:41.699829+0300 photoapp[13896:73678] [boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics

0.0001682759931816109

2022-04-12 16:44:42.190216+0300 photoapp[13896:73486] GTMSessionFetcher invoking fetch callbacks, data {length = 73, bytes = 0x7b0a2020 22657272 6f72223a 207b0a20 … 2e220a20 207d0a7d }, error Error Domain=com.google.HTTPStatus Code=403 “(null)” UserInfo={data={length = 73, bytes = 0x7b0a2020 22657272 6f72223a 207b0a20 … 2e220a20 207d0a7d }, data_content_type=application/json; charset=UTF-8}

0.0001682759931816109

Is there any suggestion on how to overcome this error?

403 is an HTTPStatus error code, typically that you’re not authorized, I’d check you’re firebase rules set for the database

This is my firebase’s rules:

rules_version = ‘2’;
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if
request.time < timestamp.date(2022, 5, 18);
}
}
}

and this is the storage’s rules:

rules_version = ‘2’;
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if false;
}
}
}