ERROR: 400: failedPrecondition - Precondition check failed

2,534 views
Skip to first unread message

Kim Nilsson

unread,
Nov 9, 2020, 11:37:03 AM11/9/20
to GAM for G Suite
What could cause this, so long into the process?

Getting Forward Enabled for someo...@my.domain (2966/6281)
ERROR: 400: failedPrecondition - Precondition check failed.

There is nothing special about this user, nor the next user in alphabetical order.

Command I ran, some hours ago...
gam all users print forwards enabledonly todrive

I have one just like it, still running, for another domain.
Currently at 7965/16866. Would really like to see it finish. :-)

Steve Larsen

unread,
Nov 9, 2020, 11:56:32 AM11/9/20
to GAM for G Suite
Any chance you are sending the logs of the command anywhere? Does the command halt there or proceed to the next user? If run against that specific user is is successful?

Although gam uses the google-api-python-client someone was recently reporting a similar issue with the go client.

Kim Nilsson

unread,
Nov 9, 2020, 1:02:34 PM11/9/20
to Google Apps Manager
Hi, Steve!

As I wrote, the command is a simple as it gets.

gam all users print forwards enabledonly todrive

And I have run the exact same command on another domain, and it has passed 14k users without issue (so far).

Kim Nilsson

unread,
Nov 9, 2020, 1:08:01 PM11/9/20
to Google Apps Manager
Sorry, forgot to answer your questions about what happened next.
The process stopped.

Manual run of the halted user, and of the next user both run without incident.

Kim Nilsson

unread,
Nov 9, 2020, 1:10:07 PM11/9/20
to Google Apps Manager
Also, I've even run the process again, with a smaller selection, containing both those users, without incident.

Kim Nilsson

unread,
Nov 11, 2020, 2:41:18 AM11/11/20
to GAM for G Suite
@Ross, 5.24.05 failed with this error.
The error message is correct.
The next user in alphabetical order doesn't have Gmail enabled.
However, that didn't cause a crash the other day.

Getting Forward Enabled for us...@my.domain (463/6281)
Traceback (most recent call last):
  File "gam.py", line 4170, in callGAPI
  File "googleapiclient/_helpers.py", line 134, in positional_wrapper
  File "googleapiclient/http.py", line 907, in execute
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://gmail.googleapis.com/gmail/v1/users/me/settings/autoForwarding?prettyPrint=false&alt=json returned "Mail service not enabled">

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "gam.py", line 48981, in ProcessGAMCommand
  File "gam.py", line 46815, in printShowForward
  File "gam.py", line 4172, in callGAPI
  File "gam.py", line 4109, in checkGAPIError
UnboundLocalError: local variable 'lmessage' referenced before assignment

Ross Scroggs

unread,
Nov 11, 2020, 9:13:21 AM11/11/20
to google-ap...@googlegroups.com
5.24.06 fixes this error.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/d1906762-e2f3-4f9e-a38a-ab14d5c897c5n%40googlegroups.com.

Kim Nilsson

unread,
Nov 11, 2020, 9:33:57 AM11/11/20
to GAM for G Suite
Alright! Started a run.
Reply all
Reply to author
Forward
0 new messages