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.

Fatal IllegalArgumentException: port out of range

See original GitHub issue

Step 2: Describe your environment

  • Firebase Component: Firebase Installations (dependency for Messaging,…)
  • Component version: 17.0.1 (firebase-bom: 30.0.2)

Step 3: Describe the problem

Steps to reproduce:

Multiple crash reports in Crashlytics (Android 10, 11, 12) The problem is described: https://github.com/square/okhttp/issues/7153

Fatal Exception: java.lang.IllegalArgumentException: port out of range:917187393
       at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:144)
       at java.net.InetSocketAddress.createUnresolved(InetSocketAddress.java:269)
       at sun.net.spi.DefaultProxySelector$1.run(DefaultProxySelector.java:315)
       at sun.net.spi.DefaultProxySelector$1.run(DefaultProxySelector.java:219)
       at java.security.AccessController.doPrivileged(AccessController.java:43)
       at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:218)
       at com.android.okhttp.internal.http.RouteSelector.resetNextProxy(RouteSelector.java:123)
       at com.android.okhttp.internal.http.RouteSelector.<init>(RouteSelector.java:63)
       at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:172)
       at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
       at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
       at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:302)
       at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:245)
       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
       at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262)
       at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219)
       at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30)
       at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.writeRequestBodyToOutputStream(FirebaseInstallationServiceClient.java:234)
       at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.writeGenerateAuthTokenRequestBodyToOutputStream(FirebaseInstallationServiceClient.java:275)
       at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.generateAuthToken(FirebaseInstallationServiceClient.java:410)
       at com.google.firebase.installations.FirebaseInstallations.fetchAuthTokenFromServer(FirebaseInstallations.java:563)
       at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:387)
       at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:374)
       at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2$FirebaseInstallations(FirebaseInstallations.java:13)
       at com.google.firebase.installations.-$$Lambda$FirebaseInstallations$VZq1h0TBcWNH8Y5yY86ujrFFyLo.run(lambda:13)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:923)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vkomysh-vicmancommented, Aug 19, 2022

I can’t reproduce this crash. Trace from crashlytics. Here are some details:

  • This issue has 1384 crash events affecting 33 users (last month)
  • <1second (This crash event happened in the first second of the user’s session.)
  • 90% background
0reactions
yoyomyocommented, Aug 23, 2022

@vkomysh-vicman Thank you for surfacing this crash cluster. We have been aware of it for a while. There are two courses of actions:

  1. Catch the IllegalArgumentException in our SDK and convert it to IOException
  2. Leave the crash as is, as we see in a similar report https://github.com/square/okhttp/issues/7153

We have discussed internally and we believe that it is the best we leave the crash as is without suppressing it. The crash is happening on a background thread so it is not user visible. When the crash does happen during an auth token refresh, a FirebaseInstallationsException will be thrown and clients should be able to recover from that by retrying, at most 7 days later.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.IllegalArgumentException: port out of range:67001
I am facing the below error while running the script. The script is trying to invoke a webservice..and its succesfull in invoking the...
Read more >
Upgrade Fails due to java.lang.IllegalArgumentException: port ...
In order to resolve the port out of range error during an upgrade, we'll have to update the port value of the server.xml...
Read more >
java.lang.IllegalArgumentException: port out of range ... - GitHub
This is a combination of a bug/poor handling of bad proxy config in DefaultProxySelector.select, and obviously the bad proxy config with a dodgy ......
Read more >
Reason: java.lang.IllegalArgumentException: port out of range ...
Retention Processor Service Fails with: Reason: java. lang. IllegalArgumentException: port out of range:-1 *|* -1E788F9FF89.
Read more >
java.lang.IllegalArgumentException: Port value out of range ...
After changing the IP address of a RedHat 5 linux server using 'ifconfig', PingFederate failed to start, throwing the following exception: FATAL [org.sourceid....
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