Repository navigation
Labels
Description
- Operating System version: Kubuntu 25.10
- Firebase SDK version: 9.7.0
- Library version: _____
- Firebase Product: messaging
When sending a message with Firebase using Apache Httpclient 5.6, all calls fail with an exception trying to read the response. The calls do come through, but the response cannot be read. This is very likely because Httpclient 5.6 has built-in support for decompression, while Firebase performs its own decompression. This probably causes the data to be decompressed twice.
Exception in thread "main" com.google.firebase.messaging.FirebaseMessagingException: Unknown error while making a remote service call: Not in GZIP format
at com.google.firebase.messaging.FirebaseMessagingException.withMessagingErrorCode(FirebaseMessagingException.java:51)
at com.google.firebase.messaging.FirebaseMessagingClientImpl$MessagingErrorHandler.createException(FirebaseMessagingClientImpl.java:293)
at com.google.firebase.messaging.FirebaseMessagingClientImpl$MessagingErrorHandler.createException(FirebaseMessagingClientImpl.java:282)
at com.google.firebase.internal.AbstractHttpErrorHandler.handleIOException(AbstractHttpErrorHandler.java:63)
at com.google.firebase.internal.ErrorHandlingHttpClient.send(ErrorHandlingHttpClient.java:111)
at com.google.firebase.internal.ErrorHandlingHttpClient.sendAndParse(ErrorHandlingHttpClient.java:72)
at com.google.firebase.messaging.FirebaseMessagingClientImpl.sendSingleRequest(FirebaseMessagingClientImpl.java:127)
at com.google.firebase.messaging.FirebaseMessagingClientImpl.send(FirebaseMessagingClientImpl.java:113)
at com.google.firebase.messaging.FirebaseMessaging$1.execute(FirebaseMessaging.java:142)
at com.google.firebase.messaging.FirebaseMessaging$1.execute(FirebaseMessaging.java:139)
at com.google.firebase.internal.CallableOperation.call(CallableOperation.java:36)
at com.google.firebase.messaging.FirebaseMessaging.send(FirebaseMessaging.java:109)
at com.google.firebase.messaging.FirebaseMessaging.send(FirebaseMessaging.java:91)
at nl.topicus.GoogleFirebaseApp.pushToGoogle(GoogleFirebaseApp.java:110)
at nl.topicus.GoogleFirebaseApp.main(GoogleFirebaseApp.java:79)
Caused by: java.util.zip.ZipException: Not in GZIP format
at java.base/java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:197)
at java.base/java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:81)
at java.base/java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:112)
at com.google.api.client.http.GzipSupport.newGzipInputStream(GzipSupport.java:13)
at com.google.api.client.http.HttpResponse.getContent(HttpResponse.java:364)
at com.google.firebase.internal.ErrorHandlingHttpClient.send(ErrorHandlingHttpClient.java:101)
... 10 more
Reacted by Johan Dorland and Mark Sullivan
Activity
marksulls commentedon Feb 3, 2026
I am getting the same issue. I copied the default
HttpClient/HttpTransportconfiguration out of theApiClientUtils.getDefaultTransport()method and then addeddisableContentCompression()to theHttpAsyncClientBuilder. This seems to fix the issue, although I only tested it on creating tenants.I am not suggesting this is the best way to fix this, but it at least seems to confirm @papegaaij assumption about the cause. Downgrading to version 9.6.0 also works...
jonathanedey commentedon Feb 3, 2026
Hey folks, thanks for flagging this. We are looking into this issue and can confirm the double compression happening here.
For now developers wanting to use Apache HttpClient 5.6+, similar to what @marksulls said, we recommend applying the
disableContentCompression()method to your default or custom clients.We'll update here once we have a fix.