question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTTP2 not working with different mixes of library and OS versions

See original GitHub issue

In my application I’m still using branch 3.12.x because I still need to support older versions than Android 5.0. Today I’ve realized that HTTP2 connections were not working on Android 10.

Here you can find the log from a Caddy server with different requests made by my app. The only differences between executions were the modification of OkHttp version. I’ve tried from an old 3.12.x version where HTTP2 were working fine to the latest version of that branch, 3.14.x and 4.x

[19/Mar/2020:20:16:34 +0100] "POST /redacted HTTP/2.0" 200 8143 "-" "okhttp/3.12.6"
[19/Mar/2020:20:16:34 +0100] "POST /redacted HTTP/2.0" 200 99 "-" "okhttp/3.12.6"
[19/Mar/2020:20:16:34 +0100] "POST /redacted HTTP/2.0" 200 370 "-" "okhttp/3.12.6"

[19/Mar/2020:20:19:43 +0100] "POST /redacted HTTP/2.0" 200 99 "-" "okhttp/3.12.7"
[19/Mar/2020:20:19:43 +0100] "POST /redacted HTTP/2.0" 200 8142 "-" "okhttp/3.12.7"
[19/Mar/2020:20:19:43 +0100] "POST /redacted HTTP/2.0" 200 370 "-" "okhttp/3.12.7"

[19/Mar/2020:20:22:03 +0100] "POST /redacted HTTP/2.0" 200 99 "-" "okhttp/3.12.8"
[19/Mar/2020:20:22:03 +0100] "POST /redacted HTTP/2.0" 200 8142 "-" "okhttp/3.12.8"
[19/Mar/2020:20:22:04 +0100] "POST /redacted HTTP/2.0" 200 370 "-" "okhttp/3.12.8"

[19/Mar/2020:20:23:16 +0100] "POST /redacted HTTP/1.1" 200 8143 "-" "okhttp/3.12.9"
[19/Mar/2020:20:23:17 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/3.12.9"
[19/Mar/2020:20:23:17 +0100] "POST /redacted HTTP/1.1" 200 370 "-" "okhttp/3.12.9"

[19/Mar/2020:20:13:40 +0100] "POST /redacted HTTP/1.1" 200 8142 "-" "okhttp/3.12.10"
[19/Mar/2020:20:14:10 +0100] "POST /redacted HTTP/1.1" 200 370 "-" "okhttp/3.12.10"
[19/Mar/2020:20:14:11 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/3.12.10"

[19/Mar/2020:20:25:17 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/3.14.7"
[19/Mar/2020:20:25:17 +0100] "POST /redacted HTTP/1.1" 200 8142 "-" "okhttp/3.14.7"
[19/Mar/2020:20:25:17 +0100] "POST /redacted HTTP/1.1" 200 370 "-" "okhttp/3.14.7"

[19/Mar/2020:20:27:44 +0100] "POST /redacted HTTP/1.1" 200 8143 "-" "okhttp/3.14.6"
[19/Mar/2020:20:27:44 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/3.14.6"
[19/Mar/2020:20:27:44 +0100] "POST /redacted HTTP/1.1" 200 370 "-" "okhttp/3.14.6"

[19/Mar/2020:20:30:28 +0100] "POST /redacted HTTP/1.1" 200 8144 "-" "okhttp/3.14.5"
[19/Mar/2020:20:30:28 +0100] "POST /redacted HTTP/1.1" 401 120 "-" "okhttp/3.14.5"
[19/Mar/2020:20:30:28 +0100] "POST /redacted HTTP/1.1" 401 120 "-" "okhttp/3.14.5"

[19/Mar/2020:20:32:16 +0100] "POST /redacted HTTP/1.1" 200 8144 "-" "okhttp/3.14.4"
[19/Mar/2020:20:32:16 +0100] "POST /redacted HTTP/1.1" 200 370 "-" "okhttp/3.14.4"
[19/Mar/2020:20:32:16 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/3.14.4"

[19/Mar/2020:20:35:19 +0100] "POST /redacted HTTP/1.1" 200 8143 "-" "okhttp/3.14.3"
[19/Mar/2020:20:35:19 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/3.14.3"
[19/Mar/2020:20:35:19 +0100] "POST /redacted HTTP/1.1" 200 370 "-" "okhttp/3.14.3"

[19/Mar/2020:20:38:46 +0100] "POST /redacted HTTP/1.1" 200 8142 "-" "okhttp/3.14.2"
[19/Mar/2020:20:38:46 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/3.14.2"
[19/Mar/2020:20:38:46 +0100] "POST /redacted HTTP/1.1" 200 369 "-" "okhttp/3.14.2"

[19/Mar/2020:20:41:46 +0100] "POST /redacted HTTP/1.1" 200 8143 "-" "okhttp/3.14.1"
[19/Mar/2020:20:41:46 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/3.14.1"
[19/Mar/2020:20:41:46 +0100] "POST /redacted HTTP/1.1" 200 370 "-" "okhttp/3.14.1"

[19/Mar/2020:20:44:39 +0100] "POST /redacted HTTP/1.1" 200 8144 "-" "okhttp/3.14.0"
[19/Mar/2020:20:44:39 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/3.14.0"
[19/Mar/2020:20:44:40 +0100] "POST /redacted HTTP/1.1" 200 369 "-" "okhttp/3.14.0"

[19/Mar/2020:20:47:51 +0100] "POST /redacted HTTP/1.1" 200 8144 "-" "okhttp/3.13.1"
[19/Mar/2020:20:47:51 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/3.13.1"
[19/Mar/2020:20:47:51 +0100] "POST /redacted HTTP/1.1" 200 370 "-" "okhttp/3.13.1"

[19/Mar/2020:20:58:07 +0100] "POST /redacted HTTP/1.1" 200 8144 "-" "okhttp/4.0.0"
[19/Mar/2020:20:58:07 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/4.0.0"
[19/Mar/2020:20:58:07 +0100] "POST /redacted HTTP/1.1" 200 370 "-" "okhttp/4.0.0"

[19/Mar/2020:21:44:37 +0100] "POST /redacted HTTP/1.1" 200 8143 "-" "okhttp/4.0.1"
[19/Mar/2020:21:44:37 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/4.0.1"
[19/Mar/2020:21:44:37 +0100] "POST /redacted HTTP/1.1" 200 370 "-" "okhttp/4.0.1"

[19/Mar/2020:21:49:17 +0100] "POST /redacted HTTP/1.1" 200 8144 "-" "okhttp/4.1.0"
[19/Mar/2020:21:49:17 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/4.1.0"
[19/Mar/2020:21:49:17 +0100] "POST /redacted HTTP/1.1" 200 370 "-" "okhttp/4.1.0"

[19/Mar/2020:21:52:52 +0100] "POST /redacted HTTP/1.1" 200 8144 "-" "okhttp/4.1.1"
[19/Mar/2020:21:52:52 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/4.1.1"
[19/Mar/2020:21:52:52 +0100] "POST /redacted HTTP/1.1" 200 370 "-" "okhttp/4.1.1"

[19/Mar/2020:21:57:05 +0100] "POST /redacted HTTP/2.0" 200 369 "-" "okhttp/4.2.0"
[19/Mar/2020:21:57:05 +0100] "POST /redacted HTTP/2.0" 200 8143 "-" "okhttp/4.2.0"
[19/Mar/2020:21:57:05 +0100] "POST /redacted HTTP/2.0" 200 99 "-" "okhttp/4.2.0"

[19/Mar/2020:22:01:34 +0100] "POST /redacted HTTP/2.0" 200 99 "-" "okhttp/4.2.1"
[19/Mar/2020:22:01:34 +0100] "POST /redacted HTTP/2.0" 200 8143 "-" "okhttp/4.2.1"
[19/Mar/2020:22:01:34 +0100] "POST /redacted HTTP/2.0" 200 370 "-" "okhttp/4.2.1"

[19/Mar/2020:22:05:54 +0100] "POST /redacted HTTP/2.0" 401 118 "-" "okhttp/4.2.2"
[19/Mar/2020:22:05:56 +0100] "POST /redacted HTTP/2.0" 200 159 "-" "okhttp/4.2.2"
[19/Mar/2020:22:05:58 +0100] "POST /redacted HTTP/2.0" 200 8142 "-" "okhttp/4.2.2"

[19/Mar/2020:21:39:33 +0100] "POST /redacted HTTP/2.0" 200 99 "-" "okhttp/4.3.0"
[19/Mar/2020:21:39:33 +0100] "POST /redacted HTTP/2.0" 200 370 "-" "okhttp/4.3.0"
[19/Mar/2020:21:39:37 +0100] "POST /redacted HTTP/2.0" 200 370 "-" "okhttp/4.3.0"

[19/Mar/2020:21:34:57 +0100] "POST /redacted HTTP/2.0" 200 370 "-" "okhttp/4.3.1"
[19/Mar/2020:21:34:57 +0100] "POST /redacted HTTP/2.0" 200 370 "-" "okhttp/4.3.1"
[19/Mar/2020:21:34:59 +0100] "POST /redacted HTTP/2.0" 200 99 "-" "okhttp/4.3.1"

[19/Mar/2020:21:00:41 +0100] "POST /redacted HTTP/2.0" 200 99 "-" "okhttp/4.4.0"
[19/Mar/2020:21:01:07 +0100] "POST /redacted HTTP/2.0" 200 370 "-" "okhttp/4.4.0"
[19/Mar/2020:21:10:26 +0100] "POST /redacted HTTP/2.0" 200 370 "-" "okhttp/4.4.0"

[19/Mar/2020:22:44:57 +0100] "POST /redacted HTTP/2.0" 200 159 "-" "okhttp/4.4.1"
[19/Mar/2020:22:44:57 +0100] "POST /redacted HTTP/2.0" 200 370 "-" "okhttp/4.4.1"
[19/Mar/2020:22:44:59 +0100] "POST /redacted HTTP/2.0" 200 99 "-" "okhttp/4.4.1"

In summary for Android 10:

  • In 3.12.x it was working fine until 3.12.9 were it does not work anymore.
  • In 3.14.x it seems not to work at all.
  • In 4.x it seems to work properly from 4.2.0 till the latest one.

I’ve also tried the same test with an Android 9 device. These are the relevant log parts.

[19/Mar/2020:22:12:18 +0100] "POST /redacted HTTP/2.0" 200 446 "-" "okhttp/3.12.10"
[19/Mar/2020:22:12:18 +0100] "POST /redacted HTTP/2.0" 200 88 "-" "okhttp/3.12.10"
[19/Mar/2020:22:12:18 +0100] "POST /redacted HTTP/2.0" 200 80 "-" "okhttp/3.12.10"

[19/Mar/2020:22:16:47 +0100] "POST /redacted HTTP/1.1" 200 80 "-" "okhttp/3.14.7"
[19/Mar/2020:22:16:47 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/3.14.7"
[19/Mar/2020:22:16:47 +0100] "POST /redacted HTTP/1.1" 200 399 "-" "okhttp/3.14.7"

[19/Mar/2020:22:21:20 +0100] "POST /redacted HTTP/1.1" 200 80 "-" "okhttp/4.1.1"
[19/Mar/2020:22:21:20 +0100] "POST /redacted HTTP/1.1" 200 99 "-" "okhttp/4.1.1"
[19/Mar/2020:22:21:21 +0100] "POST /redacted HTTP/1.1" 200 399 "-" "okhttp/4.1.1"

[19/Mar/2020:22:41:26 +0100] "POST /redacted HTTP/2.0" 200 80 "-" "okhttp/4.2.0"
[19/Mar/2020:22:41:26 +0100] "POST /redacted HTTP/2.0" 401 119 "-" "okhttp/4.2.0"
[19/Mar/2020:22:41:27 +0100] "POST /redacted HTTP/2.0" 401 117 "-" "okhttp/4.2.0"

[19/Mar/2020:22:43:41 +0100] "POST /redacted HTTP/2.0" 200 80 "-" "okhttp/4.4.1"
[19/Mar/2020:22:43:42 +0100] "POST /redacted HTTP/2.0" 200 399 "-" "okhttp/4.4.1"
[19/Mar/2020:22:43:42 +0100] "POST /redacted HTTP/2.0" 200 99 "-" "okhttp/4.4.1"

In summary for Android 9:

  • 3.12.x is working fine
  • 3.14.x is not working
  • In 4.x the behavior is the same as in Android 10. HTTP2 is not woking until 4.2.0 and it’s working fine from that.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
yschimkecommented, Mar 21, 2020

@niltsiar I don’t intend to fix either issue. There are potential code fixes we could do, but unless someone else wants to agree the path forward and implement one of them, it’s not something I have motivation to do given work, family in lockdown and given the risk/reward of doing fixes like this on maintenance branches.

Closing this umbrella issue, follow up on the specific issues.

BTW you are an Awesome OSS collaborator, really appreciate the time you put into investigating this!

1reaction
swankjessecommented, Mar 20, 2020

Nice analysis.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RFC 7540 - Hypertext Transfer Protocol Version 2 (HTTP/2)
This specification describes an optimized expression of the semantics of the Hypertext Transfer Protocol (HTTP), referred to as HTTP version 2 (HTTP/2).
Read more >
Introduction to HTTP/2 - web.dev
HTTP/2 (or h2) is a binary protocol that brings push, multiplexing streams and frame control to the web.
Read more >
HTTP/2 - Wikipedia
HTTP/2 (originally named HTTP/2.0) is a major revision of the HTTP network protocol used by the World Wide Web. It was derived from...
Read more >
Restrictions and limitations in OneDrive and SharePoint
This article contains information about the restrictions and limitations that apply to files, file names and file types when syncing with OneDrive for...
Read more >
Importing & Loading Source Files in Solidity — Remix
There are two main reasons for loading external files into Remix: to import a library or dependency (for files you will NOT be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found