Issues connecting via Cronet -> demo:app
See original GitHub issueHi!
Thanks again for your work on this project. I’ve been setting up a test environment here, to experiment with Android + Cronet HTTP/3 libs for a mobile app.
I am simply using http3_server.py with the demo:app ASGI module, but cannot get Cronet to even negotiate a connection. Here is the error:
Exception in CronetUrlRequest: net::ERR_QUIC_PROTOCOL_ERROR, ErrorCode=10, InternalErrorCode=-356, Retryable=false, QuicDetailedErrorCode=25
Here’s the relevant Cronet code:
private void callCronet() {
CronetEngine.Builder myBuilder = new CronetEngine.Builder(this);
cronetEngine = myBuilder
.addQuicHint("quic.example.com", 8443, 8443)
.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_IN_MEMORY, 100 * 1024)
.enableHttp2(true)
.enableQuic(true)
.build();
Executor executor = Executors.newSingleThreadExecutor();
UrlRequest.Callback callback = new MyUrlRequestCallback();
UrlRequest.Builder builder = cronetEngine.newUrlRequestBuilder("https://quic.example.com:8443", callback, executor);
UrlRequest urlRequest = builder.build();
urlRequest.getStatus(new UrlRequest.StatusListener() {
@Override
public void onStatus(int status) {
Log.e(TAG, status + " ");
}
});
urlRequest.start();
}
private void callQuicCronet() {
CronetEngine.Builder myBuilder = new CronetEngine.Builder(this);
cronetEngine = myBuilder
.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_IN_MEMORY, 100 * 1024)
.enableHttp2(true)
.enableQuic(true)
.addQuicHint("quic.tech", 8443, 8443)
.build();
Executor executor = Executors.newSingleThreadExecutor();
UrlRequest.Callback callback = new MyUrlRequestCallback();
UrlRequest.Builder builder = cronetEngine.newUrlRequestBuilder("https://quic.tech:8443", callback, executor);
UrlRequest urlRequest = builder.build();
urlRequest.getStatus(new UrlRequest.StatusListener() {
@Override
public void onStatus(int status) {
Log.e(TAG, status + " ");
}
});
urlRequest.start();
}
We are able to connect without issue to the public QUIC endpoints above; for this local setup we have signed Let’s Encrypt certs and are using the following command line to serve a one line index.html from examples/htdocs:
python3 examples/http3_server.py --certificate certs/fullchain1.pem --private-key certs/privkey1.pem --host quic.example.com --port 8443 -v -q quiclog "demo:app"
Any ideas?
Thanks in advance!
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Perform network operations using Cronet - Android Developers
Asynchronous requests Network requests issued using the Cronet Library are asynchronous by default. Your worker threads aren't blocked while ...
Read more >hQUIC Kit - Huawei Developer
Learn to integrate hQUIC Kit for faster network connection, stronger packet loss resistance, and higher throughput.
Read more >arrow_drop_down - Monorail
Issue 2479: i build apprtc for android native , but i didn`t demo app with peerconnection to connect with https://apprtc.appspot.com/?r=.
Read more >Quick Start Guide to Using Cronet
Cronet is the networking stack of Chromium put into a library for use on mobile. ... Typical errors include hostname // not resolved,...
Read more >RELEASENOTES.md - google/ExoPlayer - Sourcegraph
Fix session tracking problem with fast seeks in `PlaybackStatsListener` ... demo app use the Cronet and IMA extensions by default.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I can only speak for
quic.aiortc.orgwhich runs:python examples/http3_server.py --certificate demo/ssl_cert.pem --private-key demo/ssl_key.pem --port 443 --quic-log examples/htdocs/logsThanks jlaine. We’ve got a different approach for Android that I am exploring today, I will keep you posted with developments. Thanks for your help.