Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud Functions Invoker allUsers fail

When installing the firebase extension "Run Payments with Stripe" it fail.stripe fail.png

 

And then I try to go to cloud function to assign cloud functions invoker for "allUsers" it fail again.

invoke fail.png

 

 

But the above issues is only happen in one Google Workspace account, in another account is working fine even I create new firebase project and install the stripe extension at the same time in two different account. 1 account is success, 1 account is fail.

Solved Solved
0 2 1,507
1 ACCEPTED SOLUTION

Hi @jacky2,

Welcome to Google Cloud Community!

The error message 

Invalid state. The operation failed with precondition error. This is usually because the system is not in a state required for the operation's execution.

comes directly from the Firebase Native SDKs and doesn’t provide helpful information that could help with troubleshooting. However, it is highly likely that an organizational policy within the failing Google Workspace account is the root cause of the issue.

Recommendations: perform the steps mentioned below and see if it also applies to your environment

  •  Update the organization policy (not project permission): follow the guide from @jaakdentrekhaak.
    1. Go to IAM and admin > IAM (link)
    2. Make sure the organization is selected in the dropdown at the top (not a project)
    3. For the profile with the “Organization Administrator”, click on the pencil “Edit principal”
    4. Click on “ADD ANOTHER ROLE”
    5. Choose “Organization Policy Administrator” (necessary to edit policies in the next step)
    6. Go to IAM and admin > Organization policies (link)
    7. Click on “Domain restricted sharing”
    8. Click on “MANAGE POLICY”, leave everything as default and remove any existing rules.
    9. Click “ADD A RULE” and add choose “Allow all”
    10. Finally click “SET POLICY”

  • Make sure to add “allUsers” correctly: follow the guide for your Firebase project using Cloud Function 1st gen from @Hideyasu.T.

I hope the above information is helpful.

View solution in original post

2 REPLIES 2

Hi @jacky2,

Welcome to Google Cloud Community!

The error message 

Invalid state. The operation failed with precondition error. This is usually because the system is not in a state required for the operation's execution.

comes directly from the Firebase Native SDKs and doesn’t provide helpful information that could help with troubleshooting. However, it is highly likely that an organizational policy within the failing Google Workspace account is the root cause of the issue.

Recommendations: perform the steps mentioned below and see if it also applies to your environment

  •  Update the organization policy (not project permission): follow the guide from @jaakdentrekhaak.
    1. Go to IAM and admin > IAM (link)
    2. Make sure the organization is selected in the dropdown at the top (not a project)
    3. For the profile with the “Organization Administrator”, click on the pencil “Edit principal”
    4. Click on “ADD ANOTHER ROLE”
    5. Choose “Organization Policy Administrator” (necessary to edit policies in the next step)
    6. Go to IAM and admin > Organization policies (link)
    7. Click on “Domain restricted sharing”
    8. Click on “MANAGE POLICY”, leave everything as default and remove any existing rules.
    9. Click “ADD A RULE” and add choose “Allow all”
    10. Finally click “SET POLICY”

  • Make sure to add “allUsers” correctly: follow the guide for your Firebase project using Cloud Function 1st gen from @Hideyasu.T.

I hope the above information is helpful.

Thank you so much. I have been searching the web for the past hour. Not even these Ai could help. You really helped me today.

Top Solution Authors