{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/4581","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/4581/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/4581/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/4581/events","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/issues/4581","id":281678341,"number":4581,"title":"Firestore: invalid metadata error with grpcio 1.8.0 works with 1.7.3","user":{"login":"szferi","id":965099,"avatar_url":"https://avatars2.githubusercontent.com/u/965099?v=4","gravatar_id":"","url":"https://api.github.com/users/szferi","html_url":"https://github.com/szferi","followers_url":"https://api.github.com/users/szferi/followers","following_url":"https://api.github.com/users/szferi/following{/other_user}","gists_url":"https://api.github.com/users/szferi/gists{/gist_id}","starred_url":"https://api.github.com/users/szferi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szferi/subscriptions","organizations_url":"https://api.github.com/users/szferi/orgs","repos_url":"https://api.github.com/users/szferi/repos","events_url":"https://api.github.com/users/szferi/events{/privacy}","received_events_url":"https://api.github.com/users/szferi/received_events","type":"User","site_admin":false},"labels":[{"id":709549811,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels/api:%20firestore","name":"api: firestore","color":"f8f8f8","default":false},{"id":544604243,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels/priority:%20p2","name":"priority: p2","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-12-13T09:25:50Z","updated_at":"2017-12-13T17:11:04Z","closed_at":null,"author_association":"NONE","body":"The last update of grpcio 1.8.0 makes the firestore service fail with the following trace:\r\n```\r\nE1213 10:00:33.957789953    5598 ev_epollex_linux.cc:1482]   Skipping epollex becuase GRPC_LINUX_EPOLL is not defined.\r\nE1213 10:00:33.957804187    5598 ev_epoll1_linux.cc:1261]    Skipping epoll1 becuase GRPC_LINUX_EPOLL is not defined.\r\nE1213 10:00:33.957817171    5598 ev_epollsig_linux.cc:1761]  Skipping epollsig becuase GRPC_LINUX_EPOLL is not defined.\r\nTypeError: Expected str, got unicode\r\nException TypeError: 'Expected str, got unicode' in 'grpc._cython.cygrpc._store_c_metadata' ignored\r\nE1213 10:00:33.959709563    5598 call.cc:1001]               validate_metadata: {\"created\":\"@1513155633.959693129\",\"description\":\"Metadata keys cannot be zero length\",\"file\":\"src/core/lib/surface/validate_metadata.cc\",\"file_line\":66}\r\nTraceback (most recent call last):\r\n  File \"t.py\", line 11, in <module>\r\n    db.collection('foo').document('foo').set({'foo': 'bar'})\r\n  File \"/home/szferi/envs/navega2/local/lib/python2.7/site-packages/google/cloud/firestore_v1beta1/document.py\", line 224, in set\r\n    write_results = batch.commit()\r\n  File \"/home/szferi/envs/navega2/local/lib/python2.7/site-packages/google/cloud/firestore_v1beta1/batch.py\", line 135, in commit\r\n    transaction=None, options=self._client._call_options)\r\n  File \"/home/szferi/envs/navega2/local/lib/python2.7/site-packages/google/cloud/firestore_v1beta1/gapic/firestore_client.py\", line 851, in commit\r\n    return self._commit(request, options)\r\n  File \"/home/szferi/envs/navega2/local/lib/python2.7/site-packages/google/gax/api_callable.py\", line 452, in inner\r\n    return api_caller(api_call, this_settings, request)\r\n  File \"/home/szferi/envs/navega2/local/lib/python2.7/site-packages/google/gax/api_callable.py\", line 438, in base_caller\r\n    return api_call(*args)\r\n  File \"/home/szferi/envs/navega2/local/lib/python2.7/site-packages/google/gax/api_callable.py\", line 376, in inner\r\n    return a_func(*args, **kwargs)\r\n  File \"/home/szferi/envs/navega2/local/lib/python2.7/site-packages/google/gax/retry.py\", line 68, in inner\r\n    return a_func(*updated_args, **kwargs)\r\n  File \"/home/szferi/envs/navega2/local/lib/python2.7/site-packages/grpc/_channel.py\", line 484, in __call__\r\n    credentials)\r\n  File \"/home/szferi/envs/navega2/local/lib/python2.7/site-packages/grpc/_channel.py\", line 477, in _blocking\r\n    _check_call_error(call_error, metadata)\r\n  File \"/home/szferi/envs/navega2/local/lib/python2.7/site-packages/grpc/_channel.py\", line 86, in _check_call_error\r\n    raise ValueError('metadata was invalid: %s' % metadata)\r\nValueError: metadata was invalid: [('google-cloud-resource-prefix', u'projects/platform-dev-187006/databases/(default)'), (u'x-goog-api-client', 'gl-python/2.7.13 gccl/0.28.0 gapic/0.28.0 gax/0.15.16 grpc/1.8.0')]\r\n\r\n```\r\nIf I downgrade it to 1.7.3 it works just fine.\r\n\r\n### OS type and version\r\nLinux, Ubuntu 17.04\r\n### Python version and virtual environment information `python --version`\r\nPython 2.7.13\r\n### Relevant package versions\r\ngoogle-api-core==0.1.2\r\ngoogle-auth==1.2.1\r\ngoogle-cloud-core==0.28.0\r\ngoogle-cloud-firestore==0.28.0\r\ngoogle-cloud-storage==1.6.0\r\ngoogle-gax==0.15.16\r\ngoogle-resumable-media==0.3.1\r\ngoogleapis-common-protos==1.5.3\r\ngrpcio==1.8.0\r\nfirebase-admin==2.6.0\r\n\r\n### Code example\r\n```\r\nimport firebase_admin\r\nfrom firebase_admin import credentials\r\nfrom firebase_admin import firestore\r\n\r\nfb_cred = credentials.Certificate('./platform-dev-service-account.json')    \r\nfirebase_admin.initialize_app(fb_cred)\r\ndb = firestore.client()\r\ndb.collection('foo').document('foo').set({'foo': 'bar'})\r\n```"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/comments/351457899","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/issues/4581#issuecomment-351457899","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/4581","id":351457899,"user":{"login":"igorpeshansky","id":7594381,"avatar_url":"https://avatars1.githubusercontent.com/u/7594381?v=4","gravatar_id":"","url":"https://api.github.com/users/igorpeshansky","html_url":"https://github.com/igorpeshansky","followers_url":"https://api.github.com/users/igorpeshansky/followers","following_url":"https://api.github.com/users/igorpeshansky/following{/other_user}","gists_url":"https://api.github.com/users/igorpeshansky/gists{/gist_id}","starred_url":"https://api.github.com/users/igorpeshansky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorpeshansky/subscriptions","organizations_url":"https://api.github.com/users/igorpeshansky/orgs","repos_url":"https://api.github.com/users/igorpeshansky/repos","events_url":"https://api.github.com/users/igorpeshansky/events{/privacy}","received_events_url":"https://api.github.com/users/igorpeshansky/received_events","type":"User","site_admin":false},"created_at":"2017-12-13T17:11:04Z","updated_at":"2017-12-13T17:11:04Z","author_association":"MEMBER","body":"This is an issue with `api_core`/`core`, and seems to have been triggered by #4280 allowing a broken dependency in."}}
{"actor":{"display_login":"igorpeshansky"}}