Issues Testing Locally
I'm having issues testing the script locally. I am able to run the development app server on my local machine, however when I make a request, I am getting an error. Any suggestions on how to fix/debug this issue? I've redacted some information using <BRACKETS>.
POST /key?key=<KMS_API_KEY> HTTP/1.1
Authorization: Bearer <INSERTED USER OAUTH TOKEN HERE>
Host: localhost:61668
Connection: close
User-Agent: Paw/3.1.8 (Macintosh; OS X/10.14.4) GCDHTTPRequest
Content-Length: 0
Error
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Transfer-Encoding: chunked
Connection: close
Date: Sat, 15 Jun 2019 00:09:07 GMT
Server: Nathans-MacBook-Pro.local
»cexceptions
RuntimeError
p0
(S"ProtocolBufferDecodeError('Required field: service_name not set.\\n\\tRequired field: method not set.\\n\\tRequired field: request not set.',)"
p1
tp2
Rp3
Hmm... it's not something I've ever seen before. Is that error definitely coming from this project? (you don't have something else running on the same port, or something?) Is there a stack trace that goes with it? How are you actually making that request - using Postman or something?
I believe it is, I've run it several times on different ports with the same issue. I'm making the request using Paw.
Here are some more details/stack trace:
(env) nathans-mbp:firebase-keysafe-master nathanmock$ dev_appserver.py app.yaml
INFO 2019-06-14 19:17:13,464 devappserver2.py:278] Skipping SDK update check.
INFO 2019-06-14 19:17:13,846 api_server.py:275] Starting API server at: http://localhost:61668
INFO 2019-06-14 19:17:13,855 dispatcher.py:256] Starting module "default" running at: http://localhost:8080
INFO 2019-06-14 19:17:13,858 admin_server.py:150] Starting admin server at: http://localhost:8000
INFO 2019-06-14 19:17:16,274 instance.py:294] Instance PID: 52211
ERROR 2019-06-14 19:17:50,740 api_server.py:378] Exception while handling .()
Traceback (most recent call last):
File "/Users/nathanmock/Downloads/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/api_server.py", line 322, in _handle_POST
request.ParseFromString(wsgi_input)
File "/Users/nathanmock/Downloads/google-cloud-sdk/platform/google_appengine/google/net/proto/ProtocolBuffer.py", line 141, in ParseFromString
self.MergeFromString(s)
File "/Users/nathanmock/Downloads/google-cloud-sdk/platform/google_appengine/google/net/proto/ProtocolBuffer.py", line 156, in MergeFromString
raise ProtocolBufferDecodeError, '\n\t'.join(dbg)
ProtocolBufferDecodeError: Required field: service_name not set.
Required field: method not set.
Required field: request not set.
@andygeers any hints/ideas on this issue? I've provided more console output, let me know if anything else would be useful!
I'm really sorry, I really have no clue what this is about. It doesn't seem related to this project - feels like it's something wrong with the Google Cloud SDK? Could try posting an issue there perhaps?
The only other thing to suggest is that it's related to Paw - I'm not familiar with it. Is it definitely making it as an HTTP request? method and request are both things related to HTTP, so it sounds like something is fishy there.