question

rpahut avatar image
rpahut asked

Random SecurityExceptions despite having the INTERNET permission

We are seeing numerous crash reports from some instances of our app running on FireOS (based android 5.1.1) with a stack trace pointing to a SecurityException

java.lang.SecurityException: Permission denied (missing INTERNET permission?)
 at java.net.InetAddress.lookupHostByName(InetAddress.java:480)
...

and not much information besides that. The repeated reports coming from same users seem to indicate that crash only happens occasionaly, probably allowing to use the app.

Trace shows a http request invoked by okhttp3 on a separate thread, with no indication of where in our app it originates from. At any rate, the app does in fact have the INTERNET permission and is working fine under normal circumstances. We were unable to reproduce the case locally (other than by completely removing the INTERNET permission from application manifest), or attribute the crash to any of our actions.

There also doesn't seem to be a way to stop the exception from crashing the app, as that would require modifying third-party libs using internet aswell. So at this point we seem to have exhausted all means of resolving the problem from our side. Any help would be appreciated.

fire tabletandroidpermissions
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rpahut avatar image
rpahut answered

This is going nowhere, is it?

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Liam Nilsson avatar image
Liam Nilsson answered

Surprised to see no solution for this. Could it be that your ISP is using a proxy without you noticing? Ive heard of similar cases before. Have a look at your IP here and see if it matches your location.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.