Okhttp: Fatal Exception: java.lang.SecurityException: getServiceStateForSubscriber

Created on 24 Dec 2020  路  2Comments  路  Source: square/okhttp

We recently face an issue which only happening on certain devices (realme pro 2, vivo, and
Oppo R15 Pro) which belong to same brand which is OPPO.

we will also report this issue to oppo developer at https://developers.oppomobile.com/wiki/doc/index#id=88.
and open an issue here also, to make it searchable.

stacktrace
```
Fatal Exception: java.lang.SecurityException: getServiceStateForSubscriber
at android.os.Parcel.createException(Parcel.java:2087)
at android.os.Parcel.readException(Parcel.java:2055)
at android.os.Parcel.readException(Parcel.java:2003)
at com.android.internal.telephony.ITelephony$Stub$Proxy.getServiceStateForSubscriber(ITelephony.java:10723)
at android.telephony.TelephonyManager.getServiceStateForSubscriber(TelephonyManager.java:9373)
at android.telephony.PhoneNumberUtils.isEmergencyNumberInternal_P(PhoneNumberUtils.java:2124)
at android.telephony.PhoneNumberUtils.isEmergencyNumberInternal(PhoneNumberUtils.java:2074)
at android.telephony.PhoneNumberUtils.isEmergencyNumberInternal(PhoneNumberUtils.java:1923)
at android.telephony.PhoneNumberUtils.isEmergencyNumber(PhoneNumberUtils.java:1815)
at android.telephony.PhoneNumberUtils.isEmergencyNumber(PhoneNumberUtils.java:1793)
at okhttp3.internal.http1.Http1Codec.openResponseBody(Http1Codec.java:142)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:124)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:254)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:200)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
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:919)
````

bug

Most helpful comment

i sent email to [email protected] report this bug.

All 2 comments

i sent email to [email protected] report this bug.

Closing out here, but big thanks for reporting. Agree it's worth having a stacktrace searchable in google for this.

Was this page helpful?
0 / 5 - 0 ratings