| #
c8de5cfa |
| 10-Jul-2023 |
Kudo Chien <[email protected]> |
[go] fix network inspector crash on android (#23436)
# Why
another fix for android expo go for network inspector
```
Fatal Exception: java.lang.IllegalStateException: network interceptor or.c
[go] fix network inspector crash on android (#23436)
# Why
another fix for android expo go for network inspector
```
Fatal Exception: java.lang.IllegalStateException: network interceptor or.c0@2ba75f9 must call proceed() exactly once
```
# How
looks like #23350 does not fix the root cause, i can finally reproduce the problem and getting the backtrace:
okhttp internally will catch the IOException and cancel the request. however, calling through the `RNObject` with reflection, we will catch the `InvocationTargetException` and suppress the exception.
to make okhttp interceptor works expectedly, we should throw out the IOException, so this pr introduces a `RNObject.callWithThrowable` to throw out the exceptions.
# Test Plan
it seems easier to reproduce this problem from clean state:
```sh
$ adb shell pm clear host.exp.exponent
$ adb shell am start -n host.exp.exponent/.experience.HomeActivity
# on sdk49 blank project, press `a` to launch app in android expo-go
```
show more ...
|