Glad you found the issue, David! We would greatly appreciate it if you added this information to our docs; I'm sure others will have the same question at some point.
*April Kyle Nassi, Program Manager* Google, Inc. | Open Source Strategy | Developer Relations 345 Spear Street, San Francisco, CA 94105 <https://maps.google.com/?q=345+Spear+Street,+San+Francisco,+CA+94105&entry=gmail&source=g> ana...@google.com | @thisisnotapril <https://twitter.com/thisisnotapril> On Sat, Dec 1, 2018 at 5:08 AM David Collins <da...@designtrail.net> wrote: > It turns out that tracing actually is being enabled. The issue is that - > on the Android platform - gRPC uses Android's 'logcat' functionality > instead of standard output. So the trace info is never sent to stdout: it > has to be viewed using > > adb logcat GRPC > > I am embarrassed I didn't think of this sooner [:blush:]. > > Diagnosing the connection issues didn't take long once the trace output > was visible. It turns out that gRPC couldn't find the PEM file containing > the SSL root certificates. Resolving this just required > > wget https://pki.google.com/roots.pem > export GRPC_DEFAULT_SSL_ROOTS_FILE_PATH=./roots.pem > > On Friday, 30 November 2018 10:09:22 UTC, David Collins wrote: >> >> Hi Michael. I have tried upper-case values for GRPC_VERBOSITY also - but >> still no trace info is displayed. I appreciate the suggestion. >> >> On Friday, 30 November 2018 01:06:19 UTC, Michael Lumish wrote: >>> >>> Have you tried "GRPC_VERBOSITY=DEBUG"? Our environment variables are >>> unfortunately case-sensitive with varying casing conventions >>> >>> On Thu, Nov 29, 2018 at 4:18 PM David Collins <da...@designtrail.net> >>> wrote: >>> >>>> Hi all, >>>> >>>> I have cross-compiled version 1.17.0 of the libgrpc++ library for the >>>> Android platform. When I link against this library in a test program for >>>> Android, the program runs successfully, but I can't view the extra logs and >>>> traces to debug. >>>> >>>> Specifically, I have tried >>>> >>>> GRPC_VERBOSITY=debug GRPC_TRACE=api ./grpc-test >>>> >>>> as well as variations on the above - e.g. using 'info' instead of >>>> 'debug' for the verbosity level. The program runs, but no trace info is >>>> displayed. >>>> >>>> I am logging in to the Android console via `adb shell` to run the >>>> program. I have tried this on both a 32-bit ARM architecture (running >>>> Android 4.4) and an x86 emulator (need to check the Android version) - >>>> without success. When I compile the same program for my Linux desktop, I >>>> can view the debug trace without problem. >>>> >>>> The libgrpc++ library is being compiled with debugging enabled, and I >>>> can actually debug the program using gdb + gdbserver. In some cases I would >>>> just prefer to debug using the 'trace' features of the library rather than >>>> gdb however. >>>> >>>> My ultimate problem is that the library is failing to communicate with >>>> Google's TTS API. I am using `GoogleDefaultCredentials()` to retrieve >>>> credentials (and the GOOGLE_APPLICATION_CREDENTIALS environment variable is >>>> set correctly). When I try to invoke any method on the TextToSpeech::Stub, >>>> the request times out with the channel in state >>>> GRPC_CHANNEL_TRANSIENT_FAILURE. (I have used `set_deadline()` and >>>> `set_wait_for_ready(true)`). >>>> >>>> The same program works as expected on Debian Linux. If I could view the >>>> trace on Android, it might help me to diagnose why it's failing there. >>>> >>>> Can anyone think of a reason why the trace might not be activated on >>>> Android? >>>> >>>> Incidentally, I have run a separate gRPC program on my Android device >>>> without problem - in this instance communicating with an insecure test >>>> server (using `InsecureChannelCredentials()`). Perhaps it's a >>>> SSL/TLS-related issue. >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "grpc.io" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to grpc-io+u...@googlegroups.com. >>>> To post to this group, send email to grp...@googlegroups.com. >>>> Visit this group at https://groups.google.com/group/grpc-io. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/grpc-io/3599dfc6-bc6a-470e-a339-364117a95fae%40googlegroups.com >>>> <https://groups.google.com/d/msgid/grpc-io/3599dfc6-bc6a-470e-a339-364117a95fae%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- > You received this message because you are subscribed to the Google Groups " > grpc.io" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to grpc-io+unsubscr...@googlegroups.com. > To post to this group, send email to grpc-io@googlegroups.com. > Visit this group at https://groups.google.com/group/grpc-io. > To view this discussion on the web visit > https://groups.google.com/d/msgid/grpc-io/35261526-0bb7-4db0-90ed-c2939edae01c%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/35261526-0bb7-4db0-90ed-c2939edae01c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To post to this group, send email to grpc-io@googlegroups.com. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CAAgWDxLOO2ecQ%2BGih353JM6FVnPapApzUqS51qUbizPO0hwZxw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.