Search code examples
javaeclipsegoogle-app-enginegoogle-plugin-eclipsegoogle-cloud-tools

Deploying App Engine app with p12 file using Cloud Tools for Eclipse


I'm trying to deploy App Engine service to Standard Environment using Eclipse and Cloud Tools For Eclipse but when I add a .p12 file to war subfolder I'm receiving following error:

gcloud crashed (MultiError): One or more errors occurred:
last_result=(None, (<class 'apitools.base.py.exceptions.InvalidUserInputError'>, InvalidUserInputError('Invalid MIME type: "x-pkcs12"',), <traceback object at 0x00000000063755C8>)), last_retrial=3, time_passed_ms=33,time_to_wait=0

There is also following info in console:

{"timestamp": "2018-04-04T13:14:32.580Z", "verbosity": "ERROR", "version": "0.0.1", "message": "gcloud crashed (MultiError): One or more errors occurred:\nlast_result=(None, (<class 'apitools.base.py.exceptions.InvalidUserInputError'>, InvalidUserInputError('Invalid MIME type: \"x-pkcs12\"',), <traceback object at 0x000000000771EE48>)), last_retrial=3, time_passed_ms=37,time_to_wait=0"}

Eclipse Version: Oxygen.1a Release (4.7.1a)
Google Cloud Tools for Eclipse 1.6.0

What can be reason of this error? Should I perform some additional steps to upload .p12 file to App Engine app?
Without .p12 file every deploy finishes successfully but I have to use this file when working with Service Account


Solution

  • There seems to exist some Python version with a bad mimetypes library. It returns x-pkcs12 in place of application/x-pkcs12 for .p12 files.

    https://issuetracker.google.com/35906610

    I expect using the latest Python version or a different implementation will fix the issue.

    In your case, I think either your Cloud SDK is too old or your Python runtime on your system that the Cloud SDK is picking up has the bad mimetypes library.