Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed text while loading app in android #1

Closed
wants to merge 1 commit into from
Closed

Changed text while loading app in android #1

wants to merge 1 commit into from

Conversation

vkupar
Copy link

@vkupar vkupar commented Aug 21, 2016

"Made with Exponent" changed "Made with ❤"
P.S. >> I don't have java knowledge to make this optional but I changed text...

"Made with Exponent" changed "Made with ❤"
P.S. >> I don't have java knowledge to make this optional but I changed text...
@vkupar
Copy link
Author

vkupar commented Aug 21, 2016

If you have knowledge of java and doesn't like what I done. please make this text optional. developer can show or hide text: "Made with Exponent" or write whatever developer's like...

@jesseruder
Copy link
Contributor

@Vatex we're going to make this text optional soon so I don't think we want to change what it says. thanks!

@jesseruder jesseruder closed this Aug 21, 2016
@ChenLi0830
Copy link

Hey @jesseruder, I was wondering has this made optional yet?

@ChenLi0830
Copy link

Hey @jesseruder, I found it, thanks for the great work on Exponent!

expbot pushed a commit that referenced this pull request Jun 19, 2018
* [turtle] [xdl] [tools-public] move ios app signing from turtle to xdl

* [www] leave errored group expanded only if build is not successful

* [xdl] [tools-public] [turtle] move creating android keystore to xdl

* [xdl] [tools-public] [turtle] refactor client builder

* [tools-public] [turtle] use flag instead of number arg

* [www] revert some changes

* Put job on queue when build is triggered

* node env in message group

* [turtle-js] add boilerplate for new turtle node.js project

* [turtle-js] add module-resolver for babel

* [turtle-js] running turtle with proper NODE_ENV set

* [turtle-js] add config module

* [turtle-js] add eslint

* [turtle][www] Consume jobs from queue

* [turtle]Prettier

* [turtle-js] use config instead of env vars explicitly

* [turtle-js] simplify getting queue url

* [turtle-js] get rid of test code

* [turtle-js] add logger

* [turtle-js] change queue name

* [tools][turtle-js] update update-local-secrets script; use queue url from config

* [turtle-js] refactor aws module using promises

* [www][turtle-js] add validator for jobs objects; add builders boilerplate

* [turtle][www] Android build

* [www] use config var instead of fetching queue url

* [www] fetch ios credentials identified by bundleIdentifier

* [www] use new turtle only for 30% of builds

* [turtle-js] add jest

* wip

* [www] Fix sending to SQS

* [turtle][www] add logging mechanism for s3 log upload and output queue

* [xdl][tools-public][turtle-js] finish ios simulator builder

* [turtle-js] minor fixes

* [turtle-js] use api env vars config

* [turtle-js] working on ios archive builder

* [turtle-js] add plumber to prevent killing gulp process when error occurs

* [turtle-js] finish ios archive builder

* [turtle][www] Communication turtle -> www

* cleanup

* [turtle-js] add fake upload flag (for local builds)

* [xdl][turtle-js] add configuring xdl's logger

* [turtle][www] Upload to s3

* [www][turtle] Fix logs and create android credentials

* [www][turtle] omit started status

* [turtle-js] refactor ios builder

* [turtle] not dupa

* [turtle-js] fix imports

* [turtle-js] use same uploader for android and ios builders

* [www][turtle-js] improve logs

* [www][turtle] fix android keystore creating and signing

* [exp][www] Sent-to-queue is pending

* [turtle] suppress change msg visibility logging

* [turtle] send error on error

* [xdl] add sharp to dev dependencies

* [www] fix link to local build

* [turtle] Add build phase to android builder logger

* [turtle] Retry SQS calls

* [xdl] fix logger's extra fields

* [xdl][turtle-js] better ios builder logs

* [turtle][tf] Add Loggly integration

* [turtle] refactor

* [turtle-js] use correct function from xdl

* [xdl] don't pass FASTLANE_PASSWORD to fastlane

* [exp][www] add env var to force turtle version

* [turtle] Fix loggly integration and probably add sentry

* [turtle][www] Review changes

* [xdl][turtle-js] code review changes #1

* [turtle] Gracefully exit on SIGINT and SIGTERM

* [turtle][www] update credentials only if they does not exist

* [turtle] node version and comment

* [turtle][www] data validation and builder choose based on message

* [turtle] small improvments

* [turtle] review improvments

* [www] Retry sending to SQS

* [turtle-js][www] build jobs with old and new turtle in parallel

* [turtle-js] extract context factory to separate file

* [turtle][www] fix redlock; fix shell app builder

* [www] better slack report

* [xdl] add build phases for fastlane commands logs

* [turtle-js] add script for creating workingdir

* [xdl] add provisioning profile validation

* [turtle-js] add filtering secrets from logs

* [turtle-js] improve turtle logs

* [turtle-js] get rid of .secrets.local-common

* [turtle-js] better variable name

* [turtle-js] refactor promises -> async/await

* [turtle] Introduce Typescript

* [turtle-js] remove babel-plugin-transform-object-rest-spread

* Revert "[turtle-js] get rid of .secrets.local-common"

This reverts commit 9128c59ce514f68d5da5959705acd66c02aa2a32.

* [turtle-js] remove source_up & source_local from .secrets.local-common

* [turtle-js][www] use experienceName instead of fullExperienceName

* [turtle-js] remove redundant job properties

* [turtle-js] add boilerplate for turtle command

* [turtle-js] turtle cli - wip (ios archive builder works)

* [turtle-js] refactor function for generating ios credentials object; ensure simulator builder is working properly

* [turtle-js] add cli for building android standalone app

* [turtle-js] add npm watch script

* [turtle-js] refactor cli builders

* [turtle] Setup CI

* [circleci][turtle-js] finish android builder deployment process

* [circleci] change branch for new_turtle_android_staging job

* [xdl][turtle-js] temporarily change xdl to swmansion/xdl (REVERT ME)

* [turtle-js] alias xdl -> swmansion/xdl (REVERT ME)

* [turtle-js] add tsconfig and gulpfile to tarball

* [turtle-js] use --inspect only for development

* [circleci] uncomment commented jobs

* [turtle-js] change swmansion/xdl -> xdl

* [xdl][turtle-js] remove filtering secrets from logs; ensure secrets are not present in logs

* [www] add generating artifactId

* [circleci] change EXPO_CI_DEP_DIRS for shell_app_base_android_new

fbshipit-source-id: 0ca2c34
@ghost ghost mentioned this pull request Nov 18, 2019
sjchmiela added a commit that referenced this pull request Sep 29, 2020
# Why

One of the reasons for #10284.

# How

One of the crashes was coming from native:
```
2020-09-25 14:30:36.831 17563-17563/? A/DEBUG:       #00 pc 00066604  /data/app/~~WpbR_l3nGtiGFWRkbZPEJg==/host.exp.exponent-8fNpD6xuMcBS80u997afBA==/lib/x86/libexpo-gl.so (expo::gl_cpp::EXGLContext::EXGLContext(facebook::jsi::Runtime&, unsigned int)+164) (BuildId: 7e5a0967a575c573c4727065d29b4c52a818e77a)
2020-09-25 14:30:36.831 17563-17563/? A/DEBUG:       #1 pc 000664c0  /data/app/~~WpbR_l3nGtiGFWRkbZPEJg==/host.exp.exponent-8fNpD6xuMcBS80u997afBA==/lib/x86/libexpo-gl.so (expo::gl_cpp::EXGLContext::ContextCreate(facebook::jsi::Runtime&)+384) (BuildId: 7e5a0967a575c573c4727065d29b4c52a818e77a)
2020-09-25 14:30:36.831 17563-17563/? A/DEBUG:       #2 pc 00046e90  /data/app/~~WpbR_l3nGtiGFWRkbZPEJg==/host.exp.exponent-8fNpD6xuMcBS80u997afBA==/lib/x86/libexpo-gl.so (UEXGLContextCreate+32) (BuildId: 7e5a0967a575c573c4727065d29b4c52a818e77a)
2020-09-25 14:30:36.831 17563-17563/? A/DEBUG:       #3 pc 00125860  /data/app/~~WpbR_l3nGtiGFWRkbZPEJg==/host.exp.exponent-8fNpD6xuMcBS80u997afBA==/lib/x86/libexpo-gl.so (Java_expo_modules_gl_cpp_EXGL_EXGLContextCreate+32) (BuildId: 7e5a0967a575c573c4727065d29b4c52a818e77a)
```

After ensuring `expo-gl` won't try to create a context for an invalid JS context reference the crash stopped occurring.

Mounting a `GLView` resulted in an unhandled Promise rejection:
```
[Unhandled promise rejection: TypeError: Cannot read property '-1' of undefined]
* /Users/sjchmiela/Applications/expo/packages/expo-gl/build/GLView.js:332:15 in getGl
* http://192.168.0.112:19000/__generated__/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:292922:50 in createContextAsync$
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:45:39 in tryCatch
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:274:21 in invoke
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:97:20 in prototype.method
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:45:39 in tryCatch
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:135:19 in invoke
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:145:12 in PromiseImpl.resolve.then$argument_0
* /Users/sjchmiela/Applications/expo/react-native-lab/react-native/node_modules/promise/setimmediate/core.js:37:11 in tryCallOne
* /Users/sjchmiela/Applications/expo/react-native-lab/react-native/node_modules/promise/setimmediate/core.js:123:14 in setImmediate$argument_0
```

so I decided to make it more readable. Now it's

```
[Unhandled promise rejection: Error: GL is currently not available. (Have you enabled remote debugging? GL is not available while debugging remotely.)]
* /Users/sjchmiela/Applications/expo/packages/expo-gl/build/GLView.js:333:9 in getGl
* http://192.168.0.112:19000/__generated__/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:292922:50 in createContextAsync$
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:45:39 in tryCatch
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:274:21 in invoke
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:97:20 in prototype.method
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:45:39 in tryCatch
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:135:19 in invoke
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:145:12 in PromiseImpl.resolve.then$argument_0
* /Users/sjchmiela/Applications/expo/react-native-lab/react-native/node_modules/promise/setimmediate/core.js:37:11 in tryCallOne
* /Users/sjchmiela/Applications/expo/react-native-lab/react-native/node_modules/promise/setimmediate/core.js:123:14 in setImmediate$argument_0
```

# Test Plan

I have ensured that debugging remotely doesn't crash the application if this is the only reason to do so.
sjchmiela added a commit that referenced this pull request Sep 29, 2020
One of the reasons for #10284.

One of the crashes was coming from native:
```
2020-09-25 14:30:36.831 17563-17563/? A/DEBUG:       #00 pc 00066604  /data/app/~~WpbR_l3nGtiGFWRkbZPEJg==/host.exp.exponent-8fNpD6xuMcBS80u997afBA==/lib/x86/libexpo-gl.so (expo::gl_cpp::EXGLContext::EXGLContext(facebook::jsi::Runtime&, unsigned int)+164) (BuildId: 7e5a0967a575c573c4727065d29b4c52a818e77a)
2020-09-25 14:30:36.831 17563-17563/? A/DEBUG:       #1 pc 000664c0  /data/app/~~WpbR_l3nGtiGFWRkbZPEJg==/host.exp.exponent-8fNpD6xuMcBS80u997afBA==/lib/x86/libexpo-gl.so (expo::gl_cpp::EXGLContext::ContextCreate(facebook::jsi::Runtime&)+384) (BuildId: 7e5a0967a575c573c4727065d29b4c52a818e77a)
2020-09-25 14:30:36.831 17563-17563/? A/DEBUG:       #2 pc 00046e90  /data/app/~~WpbR_l3nGtiGFWRkbZPEJg==/host.exp.exponent-8fNpD6xuMcBS80u997afBA==/lib/x86/libexpo-gl.so (UEXGLContextCreate+32) (BuildId: 7e5a0967a575c573c4727065d29b4c52a818e77a)
2020-09-25 14:30:36.831 17563-17563/? A/DEBUG:       #3 pc 00125860  /data/app/~~WpbR_l3nGtiGFWRkbZPEJg==/host.exp.exponent-8fNpD6xuMcBS80u997afBA==/lib/x86/libexpo-gl.so (Java_expo_modules_gl_cpp_EXGL_EXGLContextCreate+32) (BuildId: 7e5a0967a575c573c4727065d29b4c52a818e77a)
```

After ensuring `expo-gl` won't try to create a context for an invalid JS context reference the crash stopped occurring.

Mounting a `GLView` resulted in an unhandled Promise rejection:
```
[Unhandled promise rejection: TypeError: Cannot read property '-1' of undefined]
* /Users/sjchmiela/Applications/expo/packages/expo-gl/build/GLView.js:332:15 in getGl
* http://192.168.0.112:19000/__generated__/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:292922:50 in createContextAsync$
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:45:39 in tryCatch
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:274:21 in invoke
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:97:20 in prototype.method
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:45:39 in tryCatch
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:135:19 in invoke
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:145:12 in PromiseImpl.resolve.then$argument_0
* /Users/sjchmiela/Applications/expo/react-native-lab/react-native/node_modules/promise/setimmediate/core.js:37:11 in tryCallOne
* /Users/sjchmiela/Applications/expo/react-native-lab/react-native/node_modules/promise/setimmediate/core.js:123:14 in setImmediate$argument_0
```

so I decided to make it more readable. Now it's

```
[Unhandled promise rejection: Error: GL is currently not available. (Have you enabled remote debugging? GL is not available while debugging remotely.)]
* /Users/sjchmiela/Applications/expo/packages/expo-gl/build/GLView.js:333:9 in getGl
* http://192.168.0.112:19000/__generated__/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:292922:50 in createContextAsync$
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:45:39 in tryCatch
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:274:21 in invoke
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:97:20 in prototype.method
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:45:39 in tryCatch
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:135:19 in invoke
* /Users/sjchmiela/Applications/expo/node_modules/regenerator-runtime/runtime.js:145:12 in PromiseImpl.resolve.then$argument_0
* /Users/sjchmiela/Applications/expo/react-native-lab/react-native/node_modules/promise/setimmediate/core.js:37:11 in tryCallOne
* /Users/sjchmiela/Applications/expo/react-native-lab/react-native/node_modules/promise/setimmediate/core.js:123:14 in setImmediate$argument_0
```

I have ensured that debugging remotely doesn't crash the application if this is the only reason to do so.
Simek referenced this pull request in Simek/expo Oct 14, 2021
lukmccall added a commit that referenced this pull request Apr 21, 2022
…bject` (#17127)

# Why

Fixes ENG-4713.
Fixes:
```
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG: Abort message: '/Users/lukasz/work/expo/android/ReactAndroid/../ReactCommon/jsi/JSCRuntime.cpp:394: virtual facebook::jsc::JSCRuntime::~JSCRuntime(): assertion "objectCounter_ == 0 && "JSCRuntime destroyed with a dangling API object"" failed'
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:     x0  0000000000000000  x1  0000000000005cd1  x2  0000000000000006  x3  0000006f7acdc3f0
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:     x4  0080808080808080  x5  0080808080808080  x6  0080808080808080  x7  8080808080808000
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:     x8  00000000000000f0  x9  57ea5f66b3577129  x10 0000000000000000  x11 ffffff80fffffbdf
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:     x12 0000000000000001  x13 0000001614a34420  x14 002a651836a2a326  x15 0000000000000050
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:     x16 00000070183b0ba8  x17 000000701838bc10  x18 0000000000000001  x19 0000000000005ae4
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:     x20 0000000000005cd1  x21 00000000ffffffff  x22 000000001406cdd8  x23 000000001406cdd8
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:     x24 0000006f90c00880  x25 0000006f7acdcc90  x26 0000000018380001  x27 0000000000000000
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:     x28 0000006f7acdcb30  x29 0000006f7acdc470
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:     lr  000000701833bf30  sp  0000006f7acdc3d0  pc  000000701833bf5c  pst 0000000000001000
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG: backtrace:
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #00 pc 0000000000078f5c  /apex/com.android.runtime/lib64/bionic/libc.so (abort+168) (BuildId: 86c2e03db5ccf75a523a17b3ca80de5c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #1 pc 0000000000079328  /apex/com.android.runtime/lib64/bionic/libc.so (__assert2+40) (BuildId: 86c2e03db5ccf75a523a17b3ca80de5c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #2 pc 0000000000053b90  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libjscexecutor.so (facebook::jsc::JSCRuntime::~JSCRuntime()+136) (BuildId: ca89a6ba66281f0321d6776ea6996fc7c4a2d232)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #3 pc 0000000000053be0  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libjscexecutor.so (facebook::jsc::JSCRuntime::~JSCRuntime()+16) (BuildId: ca89a6ba66281f0321d6776ea6996fc7c4a2d232)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #4 pc 0000000000040018  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libjscexecutor.so (BuildId: ca89a6ba66281f0321d6776ea6996fc7c4a2d232)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #5 pc 000000000003fd44  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libjscexecutor.so (BuildId: ca89a6ba66281f0321d6776ea6996fc7c4a2d232)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #6 pc 000000000004de4c  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libjscexecutor.so (facebook::react::JSIExecutor::~JSIExecutor()+476) (BuildId: ca89a6ba66281f0321d6776ea6996fc7c4a2d232)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #7 pc 000000000004de7c  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libjscexecutor.so (facebook::react::JSIExecutor::~JSIExecutor()+16) (BuildId: ca89a6ba66281f0321d6776ea6996fc7c4a2d232)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #8 pc 0000000000217a0c  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #9 pc 0000000000217978  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #10 pc 0000000000226d14  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #11 pc 0000000000226cdc  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #12 pc 0000000000226c4c  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #13 pc 0000000000226c00  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #14 pc 0000000000226bd8  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #15 pc 000000000022591c  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #16 pc 00000000001913f4  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #17 pc 000000000018c64c  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (std::__ndk1::function<void ()>::operator()() const+20) (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #18 pc 00000000001951c8  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #19 pc 0000000000195164  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #20 pc 0000000000195118  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #21 pc 00000000001950f0  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #22 pc 0000000000194034  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #23 pc 00000000001913f4  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #24 pc 000000000018c64c  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (std::__ndk1::function<void ()>::operator()() const+20) (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #25 pc 000000000018e938  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #26 pc 000000000018e894  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #27 pc 000000000018e848  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #28 pc 000000000018e820  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #29 pc 000000000018d528  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #30 pc 00000000001913f4  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #31 pc 000000000018c64c  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (std::__ndk1::function<void ()>::operator()() const+20) (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #32 pc 00000000001c9d2c  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (facebook::react::JNativeRunnable::run()+28) (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #33 pc 00000000001c9ee4  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (facebook::jni::detail::MethodWrapper<void (facebook::react::JNativeRunnable::)(), &(facebook::react::JNativeRunnable::run()), facebook::react::JNativeRunnable, void>::dispatch(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject>)+180) (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #34 pc 00000000001c9f64  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (facebook::jni::detail::CallWithJniConversions<void ()(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject>), void, facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject*>::call(facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject*, void ()(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject>))+72) (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #35 pc 00000000001c9d74  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (facebook::jni::detail::FunctionWrapper<void ()(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject>), facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject*, void>::call(_JNIEnv*, _jobject*, void ()(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::react::JNativeRunnable, facebook::react::Runnable>::JavaPart, facebook::react::Runnable, void>::_javaobject>))+56) (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #36 pc 00000000001c9cfc  /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/lib/arm64/libreactnativejni.so (facebook::jni::detail::MethodWrapper<void (facebook::react::JNativeRunnable::)(), &(facebook::react::JNativeRunnable::run()), facebook::react::JNativeRunnable, void>::call(_JNIEnv, _jobject*)+36) (BuildId: 8045280c95324fd7b2b53ee996c58fc1cf663d2c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #37 pc 00000000002d4044  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #38 pc 00000000020580ec  /memfd:jit-cache (deleted) (android.os.Handler.handleCallback+140)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #39 pc 0000000002056b68  /memfd:jit-cache (deleted) (android.os.Handler.dispatchMessage+104)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #40 pc 000000000020a0a0  /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #41 pc 00000000000174e4  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/base.apk!classes2.dex] (com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage+0)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #42 pc 0000000002024b88  /memfd:jit-cache (deleted) (android.os.Looper.loopOnce+1832)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #43 pc 0000000002024274  /memfd:jit-cache (deleted) (android.os.Looper.loop+532)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #44 pc 00000000002caa7c  /apex/com.android.art/lib64/libart.so (art_quick_osr_stub+60) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #45 pc 0000000000779fb0  /apex/com.android.art/lib64/libart.so (MterpMaybeDoOnStackReplacement+860) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #46 pc 00000000002c99d0  /apex/com.android.art/lib64/libart.so (MterpHelpers+240) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #47 pc 000000000046c392  /system/framework/framework.jar (android.os.Looper.loop+186)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #48 pc 000000000076ce1c  /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+2120) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #49 pc 00000000002c5014  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #50 pc 0000000000017672  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~Rzw_hzRTWeyDEjVSTjfOHA==/host.exp.exponent-iMghO3MvMe7o86t03WvFVg==/base.apk!classes2.dex] (com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run+74)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #51 pc 000000000027d840  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.3351068054637636664)+644) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #52 pc 000000000035a9e4  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+148) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #53 pc 000000000040b05c  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1452) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #54 pc 00000000003d537c  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+4912) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #55 pc 00000000002c5094  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #56 pc 00000000000eda70  /apex/com.android.art/javalib/core-oj.jar (java.lang.Thread.run+8)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #57 pc 000000000027d840  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.3351068054637636664)+644) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #58 pc 000000000027c9e8  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1176) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #59 pc 00000000002d4178  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #60 pc 00000000002ca764  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #61 pc 000000000030e980  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+156) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #62 pc 00000000003c1db4  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValuesart::ArtMethod*(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+380) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #63 pc 00000000004578ec  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+992) (BuildId: 34e3dd028e2e682b63a512d6a4f1b5eb)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #64 pc 00000000000de0d4  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: 86c2e03db5ccf75a523a17b3ca80de5c)
2022-04-19 12:01:12.545 23863-23863/? A/DEBUG:       #65 pc 000000000007a890  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 86c2e03db5ccf75a523a17b3ca80de5c)
```

# How

The reanimated codebase contains a reference cycle between the `NativeReanimatedModule` and the runtime which makes deallocation of the  `NativeReanimatedModule` impossible. Also, the event handler is storing a reference to the `NativeReanimatedModule` that isn't ever cleaned. 

# Test Plan

- NCL ✅
lukmccall added a commit that referenced this pull request Jul 5, 2022
# Why

Fixes:
```
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG: Cause: null pointer dereference
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG:     x0  00000000000e9510  x1  0000007854ed0ce8  x2  00ffffffffffffff  x3  000000000293067e
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG:     x4  0000000000000000  x5  0000007854ed0d60  x6  0000000000000000  x7  000000783b4293f4
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG:     x8  7b2548531c03bf1d  x9  7b2548531c03bf1d  x10 0000000000000000  x11 7b2548531c03bf1d
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG:     x12 000000000293067e  x13 00000364b2a2ce67  x14 00043d5421ab39a5  x15 0000000034155555
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG:     x16 00000078499a8b48  x17 000000797657646c  x18 0000007840758000  x19 b40000783adab800
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG:     x20 0000007854ed0f60  x21 0000000000000000  x22 0000007854ed0fa0  x23 b4000078ba8256c0
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG:     x24 b4000078ba8256d0  x25 0000000000000001  x26 0000007854ed8000  x27 00000078d3617000
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG:     x28 0000000000000000  x29 0000007854ed0f30
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG:     lr  00000078497141d8  sp  0000007854ed0d90  pc  00000078497141dc  pst 0000000060001000
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG: backtrace:
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG:       #00 pc 00000000000291dc  /data/app/~~da9OPGbojr0zfLcsKHsdEg==/expo.modules.test-5d9CHLA06HOroDg-jCTR5w==/lib/arm64/libhermes.so (BuildId: 4fbed506ba7b5e91b09f3a3ace7967fb54b2332c)
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG:       #1 pc 0000000000083e78  /data/app/~~da9OPGbojr0zfLcsKHsdEg==/expo.modules.test-5d9CHLA06HOroDg-jCTR5w==/lib/arm64/libexpo-modules-core.so (expo::JavaScriptRuntime::JavaScriptRuntime()+672) (BuildId: b6fae6fab54155ca35d5beea1df9d39fab7dd6a4)
2022-06-29 16:42:23.594 16410-16410/? A/DEBUG:       #2 pc 0000000000076468  /data/app/~~da9OPGbojr0zfLcsKHsdEg==/expo.modules.test-5d9CHLA06HOroDg-jCTR5w==/lib/arm64/libexpo-modules-core.so (std::__ndk1::shared_ptr<expo::JavaScriptRuntime> std::__ndk1::shared_ptr<expo::JavaScriptRuntime>::make_shared<>()+92) (BuildId: b6fae6fab54155ca35d5beea1df9d39fab7dd6a4)
```
This error occurs when you're trying to run Android tests on Hermes.

# How

The Hermes library included in the test environment wasn't correct. From RN 0.69, the so file is located inside the `react-native` package. Unforunelty, the provided Hermes library doesn't contain header files. That's why we're still using the `hermes-engine` package to obtain those files.

# Test Plan

- run Android tests ✅
igoro00 referenced this pull request in igoro00/expo Oct 6, 2022
Kudo added a commit that referenced this pull request Nov 22, 2022
# Why

try to fix the android expo go 2.26.4 crash 

```
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> host.exp.exponent <<<

backtrace:
  #00  pc 0x00000000000b2bdc  /data/app/host.exp.exponent-7YRLiOv6bTg4h8glrIL41g==/split_config.arm64_v8a.apk!libc++_shared.so
  #1  pc 0x00000000000aec8c  /data/app/host.exp.exponent-7YRLiOv6bTg4h8glrIL41g==/split_config.arm64_v8a.apk!libc++_shared.so (__gxx_personality_v0+348)
  #2  pc 0x00000000000224e8  /data/app/host.exp.exponent-7YRLiOv6bTg4h8glrIL41g==/split_config.arm64_v8a.apk!libfbjni.so
```

related to #20019

# How

just noticed the fbjni is built by ndk r23 and it is [email protected]. the
file is overwritten by reanimated because reanimated extracts fbjni to
`react-native/ReactAndroid/src/main/jni/first-party/fbjni`, which is
also the fbjni extraction path from ReactAndroid.

i'm not 100% sure this is the root cause for the crash, but inconsistent
ndk versions would cause crashes for sure. this pr tries to downgrade
reanimated fbjni to 0.2.2. i don't update the vendoring tool because
react-native 0.71 would have [email protected].

# Test Plan

`./gradlew :app:assembleVersionedDebug`, unzip the apk and check the
fbjni ndk version by
[parse_elfnote.py](https://android.googlesource.com/platform/ndk/+/master/parse_elfnote.py)
Kudo added a commit that referenced this pull request Nov 22, 2022
# Why

try to fix the android expo go 2.26.4 crash

```
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> host.exp.exponent <<<

backtrace:
  #00  pc 0x00000000000b2bdc  /data/app/host.exp.exponent-7YRLiOv6bTg4h8glrIL41g==/split_config.arm64_v8a.apk!libc++_shared.so
  #1  pc 0x00000000000aec8c  /data/app/host.exp.exponent-7YRLiOv6bTg4h8glrIL41g==/split_config.arm64_v8a.apk!libc++_shared.so (__gxx_personality_v0+348)
  #2  pc 0x00000000000224e8  /data/app/host.exp.exponent-7YRLiOv6bTg4h8glrIL41g==/split_config.arm64_v8a.apk!libfbjni.so
```

related to #20019

# How

just noticed the fbjni is built by ndk r23 and it is [email protected]. the
file is overwritten by reanimated because reanimated extracts fbjni to
`react-native/ReactAndroid/src/main/jni/first-party/fbjni`, which is
also the fbjni extraction path from ReactAndroid.

i'm not 100% sure this is the root cause for the crash, but inconsistent
ndk versions would cause crashes for sure. this pr tries to downgrade
reanimated fbjni to 0.2.2. i don't update the vendoring tool because
react-native 0.71 would have [email protected].

# Test Plan

`./gradlew :app:assembleVersionedDebug`, unzip the apk and check the
fbjni ndk version by
[parse_elfnote.py](https://android.googlesource.com/platform/ndk/+/master/parse_elfnote.py)

(cherry picked from commit 5fd207e)
Kudo added a commit that referenced this pull request Apr 25, 2023
# Why

fix android instrumentation test error:
expo-modules-core: https://github.com/expo/expo/actions/runs/4770550299/jobs/8481882792
expo-updates: https://github.com/expo/expo/actions/runs/4785632925/jobs/8509073622


### expo-modules-core

```
expo.modules.JavaScriptViewModule > should_export_view_prototype[avd-31(AVD) - 12] FAILED 
	io.mockk.MockKException: no answer found for: AppContext(#1).getBackgroundCoroutineScope()
	at io.mockk.impl.stub.MockKStub.defaultAnswer(MockKStub.kt:93)

expo.modules.JavaScriptViewModule > view_functions_should_be_callable[avd-31(AVD) - 12] FAILED 
	io.mockk.MockKException: no answer found for: AppContext(#2).getBackgroundCoroutineScope()
	at io.mockk.impl.stub.MockKStub.defaultAnswer(MockKStub.kt:93)
```

### expo-updates

1. crashes from `mockDelegate.getCheckAutomaticallyConfiguration()`
2. https://github.com/expo/expo/blob/79c05375b8ae9149aa4dff456a3c25641a68f360/packages/expo-updates/android/src/androidTest/java/expo/modules/updates/logging/UpdatesLoggingTest.kt#L106 the line here is two rather than one: 

# How

- [core] answers mocked `getBackgroundCoroutineScope`
- [updates] my hypothesis is that mockk cannot [instantiate abstract classes](mockk/mockk#1080). after #22137, the `UpdatesConfiguration.CheckAutomaticallyConfiguration` is now an anonymous class. the workaround here is having a default implementation for `UpdatesConfiguration.CheckAutomaticallyConfiguration.toJSString()`.
- [updates] fix `@Before` does not be called in `UpdatesLoggingTest`.  in the `@Before` block, the test purges log and will make the test more reliable.

# Test Plan

ci passed
lukmccall added a commit that referenced this pull request Mar 13, 2024
# Why

Fixes:
```
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A  Cmdline: dev.expo.payments
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A  pid: 16094, tid: 16328, name: hades  >>> dev.expo.payments <<<
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A        #1 pc 00000000000d1cc0  /data/app/~~1c_3-TLIV8sFeNnhLnzDiQ==/dev.expo.payments-9iCEqSZyaec4fj16Tu2wjA==/base.apk!libc++_shared.so (BuildId: a777ae836b797ddfce8ce3564b3b5d6565a0ab08)
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A        #2 pc 00000000000d1e74  /data/app/~~1c_3-TLIV8sFeNnhLnzDiQ==/dev.expo.payments-9iCEqSZyaec4fj16Tu2wjA==/base.apk!libc++_shared.so (BuildId: a777ae836b797ddfce8ce3564b3b5d6565a0ab08)
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A        #3 pc 00000000000e6b74  /data/app/~~1c_3-TLIV8sFeNnhLnzDiQ==/dev.expo.payments-9iCEqSZyaec4fj16Tu2wjA==/base.apk!libc++_shared.so (BuildId: a777ae836b797ddfce8ce3564b3b5d6565a0ab08)
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A        #4 pc 00000000000e6b0c  /data/app/~~1c_3-TLIV8sFeNnhLnzDiQ==/dev.expo.payments-9iCEqSZyaec4fj16Tu2wjA==/base.apk!libc++_shared.so (std::terminate()+56) (BuildId: a777ae836b797ddfce8ce3564b3b5d6565a0ab08)
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A        #5 pc 0000000000098658  /data/app/~~1c_3-TLIV8sFeNnhLnzDiQ==/dev.expo.payments-9iCEqSZyaec4fj16Tu2wjA==/base.apk!libexpo-modules-core.so (BuildId: 904b6929e508d683c18fc50088af306b22c5a190)
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A        #6 pc 00000000000a2494  /data/app/~~1c_3-TLIV8sFeNnhLnzDiQ==/dev.expo.payments-9iCEqSZyaec4fj16Tu2wjA==/base.apk!libexpo-modules-core.so (expo::SharedObject::NativeState::~NativeState()+196) (BuildId: 904b6929e508d683c18fc50088af306b22c5a190)
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A        #7 pc 00000000000aec90  /data/app/~~1c_3-TLIV8sFeNnhLnzDiQ==/dev.expo.payments-9iCEqSZyaec4fj16Tu2wjA==/base.apk!libhermes.so (BuildId: c5defc0c4fc083ab1d503086f61e8773657d6b32)
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A        #8 pc 00000000001f6d60  /data/app/~~1c_3-TLIV8sFeNnhLnzDiQ==/dev.expo.payments-9iCEqSZyaec4fj16Tu2wjA==/base.apk!libhermes.so (BuildId: c5defc0c4fc083ab1d503086f61e8773657d6b32)
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A        #9 pc 0000000000200050  /data/app/~~1c_3-TLIV8sFeNnhLnzDiQ==/dev.expo.payments-9iCEqSZyaec4fj16Tu2wjA==/base.apk!libhermes.so (BuildId: c5defc0c4fc083ab1d503086f61e8773657d6b32)
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A        #10 pc 00000000001fe718  /data/app/~~1c_3-TLIV8sFeNnhLnzDiQ==/dev.expo.payments-9iCEqSZyaec4fj16Tu2wjA==/base.apk!libhermes.so (BuildId: c5defc0c4fc083ab1d503086f61e8773657d6b32)
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A        #11 pc 00000000001ff7a8  /data/app/~~1c_3-TLIV8sFeNnhLnzDiQ==/dev.expo.payments-9iCEqSZyaec4fj16Tu2wjA==/base.apk!libhermes.so (BuildId: c5defc0c4fc083ab1d503086f61e8773657d6b32)
2024-03-13 14:48:02.120 16405-16405 DEBUG                   pid-16405                            A        #12 pc 00000000001ff570  /data/app/~~1c_3-TLIV8sFeNnhLnzDiQ==/dev.expo.payments-9iCEqSZyaec4fj16Tu2wjA==/base.apk!libhermes.so (BuildId: c5defc0c4fc083ab1d503086f61e8773657d6b32)
2024-03-13 14:49:13.118   382-382   adbd                    adbd                                 E  failed to connect to socket 'localabstract:/dev.expo.payments-0/platform-1710337751713.sock': could not connect to localabstract address 'localabstract:/dev.expo.payments-0/platform-1710337751713.sock'
```

# How

To deallocate the `SharedObject`, we can temporarily attach the Hades thread (GC thread of Hermes). I haven't found any other solution yet, so let's test it and check the performance overhead of attaching and detaching the thread to the Java VM. If it turns out to be slow, we can look into finding an alternative solution.

# Test Plan

- bare-expo ✅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants