Commit Graph

38536 Commits

Author SHA1 Message Date
Lorenzo Sciandra 49518214da add 0.68.7 changelog (#37106)
Summary:
Adds changelog for new patch.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Changed] - add changelog entry for 0.68.7

Pull Request resolved: https://github.com/facebook/react-native/pull/37106

Test Plan: N/A

Reviewed By: dmytrorykun

Differential Revision: D45313093

Pulled By: cipolleschi

fbshipit-source-id: d84e8d61626181b2ebfad9304c5c9be4b0123015
2023-04-26 12:14:18 -07:00
acdlite aab11c2743 Turn off enableFormActions in Meta build (#26721)
Summary:
This is enabled in the canary channels, but because it's relatively
untested, we'll disable it at Meta until they're ready to start trying
it out. It can change some behavior even if you don't intentionally
start using the API.

The reason it's not a dynamic flag is that it affects the external Fizz
runtime, which currently can't read flags at runtime.

DiffTrain build for commit https://github.com/facebook/react/commit/ed545ae3d3478cd82aa498494025cb3a15188e4c.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45278076

Pulled By: kassens

fbshipit-source-id: e9d56912b339384990edd31c4eba5f784fcef932
2023-04-26 09:55:48 -07:00
sebmarkbage 74754fceaf Replay Client Actions After Hydration (#26716)
Summary:
We used to have Event Replaying for any kind of Discrete event where
we'd track any event after hydrateRoot and before the async code/data
has loaded in to hydrate the target. However, this didn't really work
out because code inside event handlers are expected to be able to
synchronously read the state of the world at the time they're invoked.
If we replay discrete events later, the mutable state around them like
selection or form state etc. may have changed.

This limitation doesn't apply to Client Actions:

- They're expected to be async functions that themselves work
asynchronously. They're conceptually also in the "navigation" events
that happen after the "submit" events so they're already not
synchronously even before the first `await`.
- They're expected to operate mostly on the FormData as input which we
can snapshot at the time of the event.

This PR adds a bit of inline script to the Fizz runtime (or external
runtime) to track any early submit events on the page - but only if the
action URL is our placeholder `javascript:` URL. We track a queue of
these on `document.$$reactFormReplay`. Then we replay them in order as
they get hydrated and we get a handle on the Client Action function.

I add the runtime to the `bootstrapScripts` phase in Fizz which is
really technically a little too late, because on a large page, it might
take a while to get to that script even if you have displayed the form.
However, that's also true for external runtime. So there's a very short
window we might miss an event but it's good enough and better than
risking blocking display on this script.

The main thing that makes the replaying difficult to reason about is
that we can have multiple instance of React using this same queue. This
would be very usual but you could have two different Reacts SSR:ing
different parts of the tree and using around the same version. We don't
have any coordinating ids for this. We could stash something on the form
perhaps but given our current structure it's more difficult to get to
the form instance in the commit phase and a naive solution wouldn't
preserve ordering between forms.

This solution isn't 100% guaranteed to preserve ordering between
different React instances neither but should be in order within one
instance which is the common case.

The hard part is that we don't know what instance something will belong
to until it hydrates. So to solve that I keep everything in the original
queue while we wait, so that ordering is preserved until we know which
instance it'll go into. I ended up doing a bunch of clever tricks to
make this work. These could use a lot more tests than I have right now.

Another thing that's tricky is that you can update the action before
it's replayed but we actually want to invoke the old action if that
happens. So we have to extract it even if we can't invoke it right now
just so we get the one that was there during hydration.

DiffTrain build for commit https://github.com/facebook/react/commit/bf449ee74e5e98af3d08c87bb6a9f22a021f3522.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45274088

Pulled By: kassens

fbshipit-source-id: 7e9d96731f0bc72ea5fa3ffc6ce3f4a1dfe80d90
2023-04-26 09:55:48 -07:00
sebmarkbage c6585993a3 Use require() to implement script src in tests (#26717)
Summary:
We currently use rollup to make an adhoc bundle from the file system
when we're testing an import of an external file.

This doesn't follow all the interception rules that we use in jest and
in our actual builds.

This switches to just using jest require() to load these. This means
that they effectively have to load into the global document so this only
works with global document tests which is all we have now anyway.

DiffTrain build for commit https://github.com/facebook/react/commit/64d6be71224c4241ba8f9d80747d53c0fd6224e7.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45272583

Pulled By: kassens

fbshipit-source-id: bc06743c0997464d0459ecaa1dfefb4d5dc783d0
2023-04-26 09:55:48 -07:00
acdlite b19dd9caa6 Add stub for experimental_useFormStatus (#26719)
Summary:
This wires up, but does not yet implement, an experimental hook called
useFormStatus. The hook is imported from React DOM, not React, because
it represents DOM-specific state — its return type includes FormData as
one of its fields. Other renderers that implement similar methods would
use their own renderer-specific types.

The API is prefixed and only available in the experimental channel.

It can only be used from client (browser, SSR) components, not Server
Components.

DiffTrain build for commit https://github.com/facebook/react/commit/919620b2935ca6bb8dfc96204a7cf8754c006240.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45255513

Pulled By: kassens

fbshipit-source-id: 9ba527201889fb25f130eaef385bbb9efa0b92c4
2023-04-26 09:55:48 -07:00
sebmarkbage 6463ca3544 Go through the toString path for booleanish strings and .name property (#26720)
Summary:
This is consistent with what we used to do but not what we want to do.

DiffTrain build for commit https://github.com/facebook/react/commit/9ece58ebaa46f8b5e90a6ad71be4919e1dc9c563.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45253561

Pulled By: kassens

fbshipit-source-id: c739cff3a13d4ddc0569601a018a53ff5cc21c9b
2023-04-26 09:55:48 -07:00
gabrieldonadel 28e1ca9873 Remove remote debugging from dev menu (#36754)
Summary:
This PR proposes the removal of the ability to use remote JS debugging (a.k.a Chrome Debugging) from the DevMenu.
This change has been suggested previously on the contributor's Discord server and it is motivated by the fact that generally speaking, this feature does not work with the new architecture and most of the popular modules these days. The remote JS debugging is basically broken if you use Turbo Modules, Fabric, or sync native module calls.

People tend to assume that if something is part of the dev tools UI, it is going to work reliably. However, when it comes to remote debugging using JSC that's increasingly unlikely to be the case. Having it continue to exist as an option has created some confusion, or at least that's what we've seen within the Expo community.

### How to manually enable remote debugging

If your project depends on remote debugging, you can still enable it manually through the `NativeDevSettings`. E.g.

```jsx
import NativeDevSettings from 'react-native/Libraries/NativeModules/specs/NativeDevSettings';

export default function App() {
  return (
    <Button
      title="Enable remote debugging"
      onPress={() => NativeDevSettings.setIsDebuggingRemotely(!true)}
    />
  );
}

```

### Next steps

Once this has been released and we are sure that this doesn't cause a lot of problems for people we can remove the ability entirely in a follow-up PR

## Changelog:

[General] [Removed] - Remove remote debugging from the dev menu

Pull Request resolved: https://github.com/facebook/react-native/pull/36754

Test Plan:
Locally run rn-tester using JSC on Android and iOS and open the dev menu

<table>
    <tr><th>iOS</th><th>Android</th></tr>
    <tr>
    <td>
        <img src="https://user-images.githubusercontent.com/11707729/229229079-03f98eed-0765-4cc8-b972-0c4ff041b611.png" />
   </td>
   <td>
   <img src="https://user-images.githubusercontent.com/11707729/229229103-b57e8fd2-9aca-4780-8a8f-0fd5b2e53590.png" />
    </td>
</tr>
</table>

Reviewed By: christophpurrer

Differential Revision: D45278061

Pulled By: huntie

fbshipit-source-id: 842c33102cd34730c14acece8e318cb263e5c9e5
2023-04-26 09:30:20 -07:00
Tim Yung f92d438649 RN: Remove @reactions/component Dependency (#37098)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37098

Removes `reactions/component` as a dependency.

As far as I can see, it is unused by `react-native`.

Changelog:
[Internal]

Reviewed By: GijsWeterings

Differential Revision: D45304937

fbshipit-source-id: de90dce8049af2a7abe7c9cb0222fb4e3b0eb866
2023-04-26 08:49:50 -07:00
Pranav Yadav a58dea1e9e Update Node.js to v16 in all RN packages (#37073)
Summary:
**NOTE**: This is a **BREAKING** change.
TLDR; Enforce minimum Node.js v16 in all RN packages.

This diff **Updates Node.js to v16** across all RN packages.

#### Context:

- For RN development and new project created; bump to node 16 was in https://github.com/facebook/react-native/pull/36217
- Recently `react-native-windows` also; updated node to v16, https://github.com/microsoft/react-native-windows/pull/11500

#### Changes:

- [BREAKING] Update Node.js to v16 across all RN packages under 'packages/' dir

## Changelog:

[GENERAL][BREAKING] - Update Node.js to v16 in all RN packages

Pull Request resolved: https://github.com/facebook/react-native/pull/37073

Test Plan: - `yarn lint && yarn flow && yarn test-ci` --> _should be green_

Reviewed By: cipolleschi

Differential Revision: D45306108

Pulled By: jacdebug

fbshipit-source-id: e3ba7d0151b86a6a0a3d63fb29c2bd887e1ac1e7
2023-04-26 08:24:06 -07:00
Samuel Susla 51ff25937b Add missing header includes (#37086)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37086

changelog: [internal]

Reviewed By: rshest

Differential Revision: D45274839

fbshipit-source-id: 223d6401ebd50d0fa946419b63f792c544afd121
2023-04-26 08:19:22 -07:00
Samuel Susla 2cda4f71b6 Simplify createInitialState interface (#37069)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37069

changelog: [internal]

To create initial C++ state, nothing beside props is needed from `ShadowNodeFragment` and this diff removes it.

It makes creation of state easier as we will no longer need to check if props are nullptr.

Reviewed By: mdvacca

Differential Revision: D45183692

fbshipit-source-id: 81ab8eb3c57f6ff64aaed7c5b395555dce6b60b2
2023-04-26 05:50:49 -07:00
Pieter De Baets a718a88510 Fix mounting tests (#37079)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37079

These tests were crashing when ran internally, due to not having a ReactNativeConfig setup (alternatively, we should make the callsite in [conversions.h](https://github.com/facebook/react-native/blob/5e983d51d8bc2abded5659a77808542c6dc1377a/packages/react-native/ReactCommon/react/renderer/components/view/conversions.h#L412) optional.

Changelog: [Internal]

Reviewed By: cortinico, sammy-SC

Differential Revision: D45271973

fbshipit-source-id: 7f8c180df165a2fadeb198efdc1809e04956307d
2023-04-26 05:48:08 -07:00
Siddarth Kumar c937162cd5 move extendsForProp into parsers-commons (#37052)
Summary:
[Codegen 94] This PR attempts to extracts the logic of `extendsForProp` function from the following locations :
- `parsers/flow/components/extends.js`
- `parsers/typescript/components/props.js`
since they are the same and move the function to `parsers/parsers-commons.js` as requested on https://github.com/facebook/react-native/issues/34872

## Changelog:

[Internal] [Changed] - Move `extendsForProp` to parser-commons and update usages.

Pull Request resolved: https://github.com/facebook/react-native/pull/37052

Test Plan: Run `yarn jest react-native-codegen` and ensure CI is green

Reviewed By: cipolleschi

Differential Revision: D45225880

Pulled By: rshest

fbshipit-source-id: 45199089746d58d9e9494b28040b34c2a0eb31fe
2023-04-26 04:25:54 -07:00
Riccardo Cipolleschi 5ff19f0925 Back out "Reapply Fix escaping in the URL conversion" (#37103)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37103

Re backout the fix as there are some edge cases not handled properly internally.

## Changelog:
[iOS][Fixed] - Revert change in URL escaping

Reviewed By: javache, sammy-SC, rshest

Differential Revision: D45309232

fbshipit-source-id: d9f473d1f6409beb1069d9af7e649ee5b1b06d6e
2023-04-26 03:43:22 -07:00
Lorenzo Sciandra 495506db78 add 0.69.10 changelog (#37082)
Summary:
Adds changelog for new patch.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[Internal] [Changed] - add changelog entry for 0.69.10

Pull Request resolved: https://github.com/facebook/react-native/pull/37082

Test Plan: N/A

Reviewed By: rshest

Differential Revision: D45277997

Pulled By: GijsWeterings

fbshipit-source-id: eb64c8b6b9f0d5c59140e12eb70f16a57eae5f82
2023-04-26 01:11:14 -07:00
Sam Zhou 0e59e2af0c Fix incorrect usage of React.ElementConfig and React.ElementRef in xplat (#37083)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37083

`React.ElementConfig<a polymophic type>` will result in unpredictable behavior in Flow due to some types being unresolved. Since the type is already broken in most cases, I use $FlowFixMe as the type for those type arguments that are currently inferred as empty.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D44774275

fbshipit-source-id: bb950379102d41e729593af644d25670d9071ab4
2023-04-25 19:48:21 -07:00
Sam Goldman b4466c747a Deploy 0.204.1 to xplat
Summary: Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D45279076

fbshipit-source-id: 3f14cd7b57f3e3fb9d5ba2b9c04872a0eff0a3c3
2023-04-25 16:25:27 -07:00
Samuel Susla fc5a7f7567 Remove use of JSI_EXPORT from codegen (#37085)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37085

changelog: [internal]

Props and event emitter does not need to use JSI_EXPORT. Therefore we can remove include of jsi.h as well.

Reviewed By: cortinico, rshest

Differential Revision: D45274824

fbshipit-source-id: dd756258767f787e49d86dc31e18ce581f444362
2023-04-25 12:39:37 -07:00
Samuel Susla 09a810ae7d Call setSurfaceProps when props change in SurfaceHandler (#37087)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37087

changelog: [internal]

Surface props can change during life cycle of a surface. This was supported before the new renderer as well. AppRegistry has a corresponding method for this: `AppRegistry.setSurfaceProps`.
To add support for this, we just need to call into `UIManager::setSurfaceProps`.

Reviewed By: rshest

Differential Revision: D45272046

fbshipit-source-id: d138b57d5c83f554839b0db0e6721045b8dc81ef
2023-04-25 11:47:07 -07:00
sebmarkbage bfeef95c44 Insert temporary input node to polyfill submitter argument in FormData (#26714)
Summary:
Insert temporary input node to polyfill submitter argument in FormData.
This works for buttons too and fixes a bug where the type attribute
wasn't reset.

I also exclude the submitter if it's a function action. This ensures
that we don't include the generated "name" when the action is a server
action. Conceptually that name doesn't exist.

DiffTrain build for commit https://github.com/facebook/react/commit/5e5342b10059bf90738a8d9171fcf0af9d9d5d51.

Changelog: [Internal]

Reviewed By: kassens

Differential Revision: D45240323

fbshipit-source-id: 3e9a8076942abdc24cf25b9dd9f130727ec3c0fd
2023-04-25 11:43:52 -07:00
sebmarkbage 1b41b54897 Update Flight fixture to use use() instead of Promise as a child (#26715)
Summary:
The Promise as a child case seems buggy. It ends up throwing the Promise
as fatal when used in Sync rendering.

DiffTrain build for commit https://github.com/facebook/react/commit/9c58a0b6475509f9124da578207aa0d3b7364035.

Changelog: [Internal]

Reviewed By: kassens

Differential Revision: D45239545

fbshipit-source-id: 1b377ec87bc3d1bbe07d7fd9f68235629adff764
2023-04-25 11:43:52 -07:00
sophiebits 2a82cbab64 Fix escaping in ReactDOMInput code (#26630)
Summary:
JSON.stringify isn't the right thing here. Luckily this doesn't look to have any security impact.

DiffTrain build for commit https://github.com/facebook/react/commit/9ee796430278c6f6e8acec4f54fd9be7f7868c0d.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45238390

fbshipit-source-id: 04e8ce20ae1b7a86fea538f032bc9dc34d41219c
2023-04-25 11:43:52 -07:00
sebmarkbage e22c7b3e58 Restore server controlled form fields to whatever they should be (#26708)
Summary:
Fizz can emit whatever it wants for the SSR version of these fields when
it's a function action so they might not align with what is in the
previous props. Therefore we need to force them to update if we're
updating to a non-function where they might be relevant again.

DiffTrain build for commit https://github.com/facebook/react/commit/2fa632381839c8732dad9107b90911163b7f2b7a.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45238365

fbshipit-source-id: b75b4779bd3759362d69f96994ba781982f650a0
2023-04-25 11:43:52 -07:00
acdlite dc1f728a66 Clean up enableUseHook flag (#26707)
Summary:
This has been statically enabled everywhere for months.

DiffTrain build for commit https://github.com/facebook/react/commit/7ce765ec321a6f213019b56b36f9dccb2a8a7d5c.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45238350

fbshipit-source-id: f4a4efdab91067388dd162bd6fb8c62aafa50531
2023-04-25 11:43:52 -07:00
sebmarkbage 7b39531bc1 Fix File Upload in Node.js (#26700)
Summary:
Use the Blob constructor + append with filename instead of File
constructor. Node.js doesn't expose a global File constructor but does
support it in this form.

Queue fields until we get the 'end' event from the previous file. We
rely on previous files being available by the time a field is resolved.
However, since the 'end' event in Readable is fired after two
micro-tasks, these are not resolved in order.

I use a queue of the fields while we're still waiting on files to
finish. This still doesn't resolve files and fields in order relative to
each other but that doesn't matter for our usage.

DiffTrain build for commit https://github.com/facebook/react/commit/a21d1475ffd7225a463f2d0c0c9b732c8dd795eb.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45238341

fbshipit-source-id: d4ce8cf0201a231263c753989267e85f92908b9e
2023-04-25 11:43:52 -07:00
gnoff 9d980ab251 Flight support for Float (#26502)
Summary:
Stacked on #26557

Supporting Float methods such as ReactDOM.preload() are challenging for
flight because it does not have an easy means to convey direct
executions in other environments. Because the flight wire format is a
JSON-like serialization that is expected to be rendered it currently
only describes renderable elements. We need a way to convey a function
invocation that gets run in the context of the client environment
whether that is Fizz or Fiber.

Fiber is somewhat straightforward because the HostDispatcher is always
active and we can just have the FlightClient dispatch the serialized
directive.

Fizz is much more challenging becaue the dispatcher is always scoped but
the specific request the dispatch belongs to is not readily available.
Environments that support AsyncLocalStorage (or in the future
AsyncContext) we will use this to be able to resolve directives in Fizz
to the appropriate Request. For other environments directives will be
elided. Right now this is pragmatic and non-breaking because all
directives are opportunistic and non-critical. If this changes in the
future we will need to reconsider how widespread support for async
context tracking is.

For Flight, if AsyncLocalStorage is available Float methods can be
called before and after await points and be expected to work. If
AsyncLocalStorage is not available float methods called in the sync
phase of a component render will be captured but anything after an await
point will be a noop. If a float call is dropped in this manner a DEV
warning should help you realize your code may need to be modified.

This PR also introduces a way for resources (Fizz) and hints (Flight) to
flush even if there is not active task being worked on. This will help
when Float methods are called in between async points within a function
execution but the task is blocked on the entire function finishing.

This PR also introduces deduping of Hints in Flight using the same
resource keys used in Fizz. This will help shrink payload sizes when the
same hint is attempted to emit over and over again

DiffTrain build for commit https://github.com/facebook/react/commit/36e4cbe2e918ec9c8a7abbfda28898c835361fb2.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45238328

fbshipit-source-id: 9b4233def44ffb47a6c4321e01f740586b89fe33
2023-04-25 11:43:52 -07:00
acdlite 18a47d585d Change DOM HostContext to number instead of string (#26698)
Summary:
In React DOM, we use HostContext to represent the namespace of whatever
is currently rendering — SVG, Math, or HTML. Because there is a fixed
set of possible values, we can switch this to be a number instead. My
motivation is that I want to start tracking additional information in
this type, and I want to pack all of it into a single number instead of
turning it into an object. For better performance.

(In dev, the host context type is already an object that includes
additional information, but that's dev so who cares.)

Technically, before this change, the host context could be any namespace
URI string, but any value other than SVG or Math was treated the same
way. Only SVG and Math have special behavior. So in the new structure,
there are three enum values: SVG, Math, or None, which represents the
HTML namespace as well as all other possible namespaces.

DiffTrain build for commit https://github.com/facebook/react/commit/8f42196892847a3dd1ab4c84eda0c8d52508ecf6.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45238312

fbshipit-source-id: acf5033808ce81c4854ce2b962b4e7f5140e8c0d
2023-04-25 11:43:52 -07:00
acdlite 56f300888c Add error boundary to Flight fixture (#26695)
Summary:
Errors in form actions are now rethrown during render (#26689), so we
can handle them using an error boundary.

DiffTrain build for commit https://github.com/facebook/react/commit/967d46c76cf9f7f35cf659a6a47c9ad456c685a8.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45238297

fbshipit-source-id: e2db3d9a55671f9f72cf8966e75fe8010e708835
2023-04-25 11:43:52 -07:00
gaearon (Meta Employee) 92712c8e19 Allow Node.js 20 to build (#26693)
Summary:
This is stable and appears to build w/o problem. I don't see why we
should disallow it.

DiffTrain build for commit https://github.com/facebook/react/commit/5d7ebb4b784cb7e41e28653d89054cfe65637a93.

Changelog: [Internal]

Reviewed By: kassens

Differential Revision: D45238282

Pulled By: gaearon

fbshipit-source-id: c1189aaaf211349a0ad919eaca59dd8e8224e5ac
2023-04-25 11:43:52 -07:00
Luna Wei 03a4de9a46 Refactor publish-npm (#37030)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37030

Changelog: [Internal] - Refactor publish-npm logic so its easier to follow

Reviewed By: hoxyq

Differential Revision: D45172195

fbshipit-source-id: 23aa109db17d42f43c348e122a3c2a1974aa61e4
2023-04-25 10:13:34 -07:00
Luna Wei 7b62bcbf9d Tests for publish-npm (#37029)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37029

Changelog: [Internal] - Add tests to publish-npm

Reviewed By: hoxyq

Differential Revision: D45171640

fbshipit-source-id: b70bb478ae6b08891f1e82088bb0e07d5d68b4e5
2023-04-25 10:13:34 -07:00
acdlite c2be0ad40e Rethrow errors from form actions (#26689)
Summary:
This is the next step toward full support for async form actions.

Errors thrown inside form actions should cause the form to re-render and
throw the error so it can be captured by an error boundary. The behavior
is the same if the `<form />` had an internal useTransition hook, which
is pretty much exactly how we implement it, too.

The first time an action is called, the form's HostComponent is
"upgraded" to become stateful, by lazily mounting a list of hooks. The
rest of the implementation for function components can be shared.

Because the error handling behavior added in this commit is just using
useTransition under-the-hood, it also handles pending states, too.
However, this pending state can't be observed until we add a new hook
for that purpose. I'll add this next.

DiffTrain build for commit https://github.com/facebook/react/commit/fd3fb8e3c5d1c977f4bfa73d715143804c69d4b0.

Changelog: [Internal]

Reviewed By: poteto

Differential Revision: D45238266

Pulled By: kassens

fbshipit-source-id: 93fe8581172522f955278918bf97a0eb54daeeed
2023-04-25 09:58:50 -07:00
Genki Kondo 585057d746 Modify ViewManager.receiveCommand to call into delegate (#37070)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37070

This diff fixes an issue where codegened native commands are not able to be triggered, as codegen adds command handling to the delegate. This also brings how receiveCommand is handled into parity with how setProperties is called on the delegate.

Changelog:
[Fixed][Android] - Modify ViewManager.receiveCommand to call into delegate

Reviewed By: javache

Differential Revision: D45236213

fbshipit-source-id: 78f232f288f0a9c5f444e680a9cc49dca1d6af9b
2023-04-25 09:37:25 -07:00
Héctor O. Ramos Ortiz 41c6f0f6d1 Remove stale CODEOWNERS (#36199)
Summary:
The [code owners](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) configuration for this repository is stale, as most of the code owners no longer have write access to this repository. To my understanding, the code owners definition is not taken into account in the open source workflow for this repository. Therefore, instead of assigning new code owners, I'm removing it in this PR.

> **Note:** This has the side effect of no longer assigning me as a reviewer for PRs on this repository that touch the filepaths covered here.

<img width="1212" alt="Screenshot 2023-02-17 at 9 33 56 AM" src="https://user-images.githubusercontent.com/165856/219713156-816c293b-5568-49b6-ac56-06334cb00ca2.png">

## Changelog

[INTERNAL] - Remove CODEOWNERS. This is a GitHub-only change.

Pull Request resolved: https://github.com/facebook/react-native/pull/36199

Test Plan: N/A

Reviewed By: rshest

Differential Revision: D45274456

Pulled By: cortinico

fbshipit-source-id: baaca77f0bc9f64f93fcd24ddb86424d3ad50a43
2023-04-25 09:36:21 -07:00
Riccardo Cipolleschi 5e983d51d8 Reapply Fix escaping in the URL conversion (#36949)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36949

This change is a second attempt at fixing URL encoding and escaping that was already tried [here](https://github.com/facebook/react-native/commit/2b4e1f5ece7d160935b19d4862af8706a44cee59).

We had to roll it back due to some internal tests failing as it looks like Jest is manipulating the URL somehow.

We manage to replicate the issue, which occur when we pre-decode a url even if it is not partially encoded (we were too aggrsssive).

This fix ensure that we pre-decode the urls only if they present some `%` characters.

The problem here was that the e2e tests sends some urls with some `%` symbol which does not belongs to an escape sequence. For example: `anna://launch?height=25%`.

The previous code (v1) was trying to unescape this case. V2 fixes this.

This change should also fix #28508 for good.

## Changelog:
[iOS][Fixed] - Properly escape URLs

Reviewed By: mdvacca

Differential Revision: D45078923

fbshipit-source-id: 010a5c173784f8341a1a08bcbd06a6ad14299c75
2023-04-25 04:43:21 -07:00
tarunrajput c65ab4d097 extract throwIfEventHasNoName into error-utils (#37071)
Summary:
Part of Codegen ☂️ Issue: https://github.com/facebook/react-native/issues/34872

> Extract the typeAnnotation doesn't have a name error ([Flow](https://github.com/facebook/react-native/blob/e133100721939108b0f28dfa9f60ac627c804018/packages/react-native-codegen/src/parsers/flow/components/events.js#L120-L122); [TypeScript](https://github.com/facebook/react-native/blob/e133100721939108b0f28dfa9f60ac627c804018/packages/react-native-codegen/src/parsers/typescript/components/events.js#L138-L140)) in throwIfEventHasNoName function which takes a typeAnnotation and a parser as parameters. Use it in place of the if in the above call sites.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Changed] - Extract throwIfEventHasNoName error from parsers components events in error-utils

Pull Request resolved: https://github.com/facebook/react-native/pull/37071

Test Plan:
`yarn jest react-native-codegen`
<img width="810" alt="image" src="https://user-images.githubusercontent.com/34857453/234091461-67ec4187-1f38-43e0-a4ae-eb3716377665.png">

Reviewed By: cipolleschi

Differential Revision: D45247751

Pulled By: rshest

fbshipit-source-id: ad286bfbb5c9471477981ec26da77a2b0f827732
2023-04-25 04:17:10 -07:00
Nick Gerleman 0e5d54a8ee Cleanup YGNode for explicit per-node config
Summary:
Cleans up some of the changes to UseWebDefaults that were made in the interest of moving it outside of YGConfig. It still exists in YGConfig, but also exists on the node.

We also assert on null config, or when someone tries to change UseWebDefaults after creating a node (since right now YGStyle does not know the difference between unset vs set explicitly to what would normally be default).

Removes a peculiar constructor which was added to avoid config setting.

Reviewed By: rshest

Differential Revision: D45133644

fbshipit-source-id: 2b5e2baeb826653133df9b1175cf5c194e342e3e
2023-04-24 18:48:48 -07:00
Tim Yung ba927004c5 RN: Cleanup NativeExceptionsManager Mock (#37074)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37074

I am exploring ways of cleaning up the React Native Jest `setup.js` logic so that we can enable Flow and make it easier to maintain.

This does a few things:

- Create a new Jest test to verify that mocking works as expected (i.e. `jest.mock(X)` and `import ... from 'X'` does the right thing).
- Move the mock implementation for `NativeExceptionsManager` into a `__mocks__` directory that Jest can find automatically.
- Add `flow strict` and fill out the missing implementation details of the `NativeExceptionsManager` mock.

Changelog:
[General][Added] - Added missing methods to `NativeExceptionsManager` mock in Jest

Reviewed By: fkgozali

Differential Revision: D45244175

fbshipit-source-id: 0f4c8f873f93304509b80a13ed52e96265d10a42
2023-04-24 15:01:51 -07:00
Tim Yung a92c5049ba RN: Delete Misleading jest.setMock(ErrorUtils) (#37072)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37072

Deletes this call to `jest.setMock` for `ErrorUtils`. There is no such manual mock in `__mocks__` adjacent to `ErrorUtils` and this call does nothing.

Changelog:
[Internal]

Reviewed By: fkgozali

Differential Revision: D45234899

fbshipit-source-id: 51a41061761705e4f55120be0dbb77c6515e6a0a
2023-04-24 15:01:51 -07:00
Tim Yung cf631ad59f RN: Object.defineProperties for Jest Globals (#37046)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37046

Changes React Native's `jest/setup.js` so that globals (e.g. `__DEV__`, `performance`, `window`) are defined using `Object.defineProperties` instead of using object property assignment.

This makes the setup logic more resilient to Jest environments (e.g. [`jsdom`](https://github.com/jsdom/jsdom/blob/master/lib/jsdom/browser/Window.js#L422-L424)) where the globals are defined without a setter (i.e. `set` is undefined) or without `writable: true`, because object property assignment to such properties throws an error in strict mode.

Changelog:
[General][Changed] - Jest globals are now defined using `Object.defineProperties` instead of object property assignment

Reviewed By: motiz88

Differential Revision: D45202142

fbshipit-source-id: 5511e374ac6ba051ad0c224b902fb6f20960e9be
2023-04-24 14:10:29 -07:00
kassens (Meta Employee) 3ca188bc68 Remove react-is download hack (#26692)
Summary:
This was added during an upgrade to Jest 24 in
https://github.com/facebook/react/pull/15778

By now we're at Jest 29. I think if CI passes we might not need this
hack anymore.

DiffTrain build for commit https://github.com/facebook/react/commit/c57a0f68a49d0a7fbe45e7b28820478d0fa4e32f.

Reviewed By: poteto

Differential Revision: D45238250

Pulled By: kassens

fbshipit-source-id: 1dfb90dc08a2765a6d499a5754a311ecae002314
2023-04-24 12:57:59 -07:00
Stephanie Nicholson 55508b285a fix up -Wstrict-prototypes breaks
Summary: As title

Differential Revision: D45240712

fbshipit-source-id: bfb30643f11683c3bca3b66a5d602c1fd8e948dd
2023-04-24 11:42:18 -07:00
Pranav Yadav efc6e147f9 merge getExtendsProps & getProps fns - Flow (#36891)
Summary:
[Codegen 102] This PR is subtask of umbrella https://github.com/facebook/react-native/issues/34872. It extracts the code to compute the `extendsProps` and the props properties in Flow in a `getProps() -> {extendsProps, props}` function into the same `index.js` file. This will help unifying the `buildComponentSchema` functions between Flow and TS so we can factor it out in a later step.

## Changelog:

[INTERNAL][CHANGED] - merge `getExtendsProps` & `getProps` fns into `getProps` fn - Flow.

Pull Request resolved: https://github.com/facebook/react-native/pull/36891

Test Plan: - `yarn flow && yarn test react-native-codegen`  --> *should be green.*

Reviewed By: rshest

Differential Revision: D45044653

Pulled By: cipolleschi

fbshipit-source-id: 9fcdaef60dfbc3332d880b19c6e575d948d21986
2023-04-24 10:46:21 -07:00
Nick Gerleman 8812f35313 Remove "activityindicator" subspec from React-Fabric pod (#37044)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37044

This directory doesn't exist.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D45204159

fbshipit-source-id: b6794dc28c01ef1484a256a950fd6775f6323d84
2023-04-24 10:46:16 -07:00
Facebook Community Bot 0ceac71275 Re-sync with internal repository (#37068)
Co-authored-by: Facebook Community Bot <6422482+facebook-github-bot@users.noreply.github.com>
2023-04-24 17:25:19 +01:00
Krystof Woldrich f05d202813 POC: Mixed stack traces for Android and iOS Turbo Modules (#36925)
Summary:
This is a POC of how the platform and native exceptions could be passed to the JS layer to get the full stack trace from a JS call to the platform stack trace where an error occurred. This is a follow-up on [the Better Error Reporting Post](https://github.com/reactwg/react-native-new-architecture/discussions/122).

At the moment this works for sync calls only. The calls are wrapped in try-catch and platform exceptions are passed in JS Error cause with `name`, `message`, and `stack`. Throwables have an extra `stackArray` to pass structured stack information.

## Future:

Extract the error assembly to a separate function and add tests.

How to utilize `callStackReturnAddresses` on iOS and what structure information about the stack could be passed to JS?

RedBox in JS should display the JS Error with cause -> the platform error and its stack trace. Currently, only the JS stack is shown in the RedBox.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[GENERAL][ADDED] - TBA

Pull Request resolved: https://github.com/facebook/react-native/pull/36925

Test Plan:
| iOS | Android |
|--------|--------|
| ![ios-error-cause](https://user-images.githubusercontent.com/31292499/232463156-a4ebc698-ca1f-439f-8f3f-91738b5a0a1c.png) | ![android-error-cause](https://user-images.githubusercontent.com/31292499/232463137-9712d06a-7c02-4483-a136-55e49d71300a.png) |

Example of Throwable in JS:
```json
{
  "name": "Error",
  "message": "Exception in HostFunction: Intentional exception from JVM getObjectThrows with {\"c\":null,\"b\":\"foo\",\"a\":1}",
  "stack": "[native code]\ngetObjectThrows@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:129497:129\nonPress@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:129626:71\n_performTransitionSideEffects@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:51558:22\n_receiveSignal@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:51514:45\nonResponderRelease@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:51377:34\ninvokeGuardedCallbackProd@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:3292:21\ninvokeGuardedCallback@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:3378:42\ninvokeGuardedCallbackAndCatchFirstError@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:3381:36\nexecuteDispatch@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:3445:48\nexecuteDispatchesInOrder@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:3462:26\nexecuteDispatchesAndRelease@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:5186:35\nforEach@[native code]\nforEachAccumulated@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:3904:22\nrunEventsInBatch@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:5204:27\nrunExtractedPluginEventsInBatch@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:5226:25\nhttp://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:5244:42\nbatchedUpdates$1@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:15080:20\nbatchedUpdates@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:5175:36\ndispatchEvent@http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true:5237:23",
  "cause": {
    "name": "java.lang.RuntimeException",
    "message": "Intentional exception from JVM getObjectThrows with {\"c\":null,\"b\":\"foo\",\"a\":1}",
    "stack": "com.facebook.fbreact.specs.SampleTurboModule.getObjectThrows(SampleTurboModule.java:194)\ncom.facebook.jni.NativeRunnable.run(Native Method)\nandroid.os.Handler.handleCallback(Handler.java:942)\nandroid.os.Handler.dispatchMessage(Handler.java:99)\ncom.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)\nandroid.os.Looper.loopOnce(Looper.java:201)\nandroid.os.Looper.loop(Looper.java:288)\ncom.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)\njava.lang.Thread.run(Thread.java:1012)\n",
    "stackArray": [
      {
        "className": "com.facebook.fbreact.specs.SampleTurboModule",
        "fileName": "SampleTurboModule.java",
        "lineNumber": 194,
        "methodName": "getObjectThrows"
      },
      {
        "className": "com.facebook.jni.NativeRunnable",
        "fileName": "NativeRunnable.java",
        "lineNumber": -2,
        "methodName": "run"
      },
      {
        "className": "android.os.Handler",
        "fileName": "Handler.java",
        "lineNumber": 942,
        "methodName": "handleCallback"
      },
      {
        "className": "android.os.Handler",
        "fileName": "Handler.java",
        "lineNumber": 99,
        "methodName": "dispatchMessage"
      },
      {
        "className": "com.facebook.react.bridge.queue.MessageQueueThreadHandler",
        "fileName": "MessageQueueThreadHandler.java",
        "lineNumber": 27,
        "methodName": "dispatchMessage"
      },
      {
        "className": "android.os.Looper",
        "fileName": "Looper.java",
        "lineNumber": 201,
        "methodName": "loopOnce"
      },
      {
        "className": "android.os.Looper",
        "fileName": "Looper.java",
        "lineNumber": 288,
        "methodName": "loop"
      },
      {
        "className": "com.facebook.react.bridge.queue.MessageQueueThreadImpl$4",
        "fileName": "MessageQueueThreadImpl.java",
        "lineNumber": 228,
        "methodName": "run"
      },
      {
        "className": "java.lang.Thread",
        "fileName": "Thread.java",
        "lineNumber": 1012,
        "methodName": "run"
      }
    ]
  },
  "line": 129497,
  "column": 129,
  "sourceURL": "http://10.0.2.2:8081/js/RNTesterApp.android.bundle?platform=android&dev=true&minify=false&app=com.facebook.react.uiapp&modulesOnly=false&runModule=true"
}
```

Example of NSException in JS:

```json
{
  "name": "Error",
  "message": "Exception in HostFunction: Intentional exception from ObjC getObjectThrows",
  "stack": "@[native code]\ngetObjectThrows@http://localhost:8081/js/RNTesterApp.ios.bundle:125422:129\nonPress@http://localhost:8081/js/RNTesterApp.ios.bundle:125549:71\n_performTransitionSideEffects@http://localhost:8081/js/RNTesterApp.ios.bundle:51025:22\n_receiveSignal@http://localhost:8081/js/RNTesterApp.ios.bundle:50981:45\nonResponderRelease@http://localhost:8081/js/RNTesterApp.ios.bundle:50844:34\ninvokeGuardedCallbackProd@http://localhost:8081/js/RNTesterApp.ios.bundle:3232:21\ninvokeGuardedCallback@http://localhost:8081/js/RNTesterApp.ios.bundle:3318:42\ninvokeGuardedCallbackAndCatchFirstError@http://localhost:8081/js/RNTesterApp.ios.bundle:3321:36\nexecuteDispatch@http://localhost:8081/js/RNTesterApp.ios.bundle:3385:48\nexecuteDispatchesInOrder@http://localhost:8081/js/RNTesterApp.ios.bundle:3402:26\nexecuteDispatchesAndRelease@http://localhost:8081/js/RNTesterApp.ios.bundle:5126:35\nforEach@[native code]\nforEachAccumulated@http://localhost:8081/js/RNTesterApp.ios.bundle:3844:22\nrunEventsInBatch@http://localhost:8081/js/RNTesterApp.ios.bundle:5144:27\nrunExtractedPluginEventsInBatch@http://localhost:8081/js/RNTesterApp.ios.bundle:5166:25\n@http://localhost:8081/js/RNTesterApp.ios.bundle:5184:42\nbatchedUpdates$1@http://localhost:8081/js/RNTesterApp.ios.bundle:15020:20\nbatchedUpdates@http://localhost:8081/js/RNTesterApp.ios.bundle:5115:36\ndispatchEvent@http://localhost:8081/js/RNTesterApp.ios.bundle:5177:23",
  "cause": {
    "name": "Excepption",
    "message": "Intentional exception from ObjC getObjectThrows",
    "stack": "0   CoreFoundation                      0x0000000180437330 __exceptionPreprocess + 172\n1   libobjc.A.dylib                     0x0000000180051274 objc_exception_throw + 56\n2   RNTester                            0x0000000103535900 -[RCTSampleTurboModule getObjectThrows:] + 120\n3   CoreFoundation                      0x000000018043d6c0 __invoking___ + 144\n4   CoreFoundation                      0x000000018043aa44 -[NSInvocation invoke] + 276\n5   CoreFoundation                      0x000000018043acdc -[NSInvocation invokeWithTarget:] + 60\n6   RNTester                            0x00000001032b066c ___ZN8facebook5react15ObjCTurboModule23performMethodInvocationERNS_3jsi7RuntimeENS0_26TurboModuleMethodValueKindEPKcP12NSInvocationP14NSMutableArray_block_invoke + 244\n7   RNTester                            0x00000001032afe68 _ZN8facebook5react15ObjCTurboModule23performMethodInvocationERNS_3jsi7RuntimeENS0_26TurboModuleMethodValueKindEPKcP12NSInvocationP14NSMutableArray + 528\n8   RNTester                            0x00000001032b38f0 _ZN8facebook5react15ObjCTurboModule16invokeObjCMethodERNS_3jsi7RuntimeENS0_26TurboModuleMethodValueKindERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEP13objc_selectorPKNS2_5ValueEm + 608\n9   RNTester                            0x0000000103533c18 _ZN8facebook5reactL61__hostFunction_NativeSampleTurboModuleSpecJSI_getObjectThrowsERNS_3jsi7RuntimeERNS0_11TurboModuleEPKNS1_5ValueEm + 112\n10  RNTester                            0x0000000102f1b0c4 _ZZN8facebook5react11TurboModule6createERNS_3jsi7RuntimeERKNS2_10PropNameIDEENKUlS4_RKNS2_5ValueEPS9_mE_clES4_SA_SB_m + 68\n11  RNTester                            0x0000000102f1b074 _ZNSt3__18__invokeB6v15006IRZN8facebook5react11TurboModule6createERNS1_3jsi7RuntimeERKNS4_10PropNameIDEEUlS6_RKNS4_5ValueEPSB_mE_JS6_SC_SD_mEEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSG_DpOSH_ + 72\n12  RNTester                            0x0000000102f1affc _ZNSt3__128__invoke_void_return_wrapperIN8facebook3jsi5ValueELb0EE6__callIJRZNS1_5react11TurboModule6createERNS2_7RuntimeERKNS2_10PropNameIDEEUlS9_RKS3_PSD_mE_S9_SE_SF_mEEES3_DpOT_ + 64\n13  RNTester                            0x0000000102f1afb0 _ZNSt3__110__function12__alloc_funcIZN8facebook5react11TurboModule6createERNS2_3jsi7RuntimeERKNS5_10PropNameIDEEUlS7_RKNS5_5ValueEPSC_mE_NS_9allocatorISF_EEFSB_S7_SD_SE_mEEclB6v15006ES7_SD_OSE_Om + 72\n14  RNTester                            0x0000000102f19f60 _ZNSt3__110__function6__funcIZN8facebook5react11TurboModule6createERNS2_3jsi7RuntimeERKNS5_10PropNameIDEEUlS7_RKNS5_5ValueEPSC_mE_NS_9allocatorISF_EEFSB_S7_SD_SE_mEEclES7_SD_OSE_Om + 68\n15  RNTester                            0x00000001034df970 _ZNKSt3__110__function12__value_funcIFN8facebook3jsi5ValueERNS3_7RuntimeERKS4_PS7_mEEclB6v15006ES6_S8_OS9_Om + 112\n16  RNTester                            0x00000001034df374 _ZNKSt3__18functionIFN8facebook3jsi5ValueERNS2_7RuntimeERKS3_PS6_mEEclES5_S7_S8_m + 72\n17  RNTester                            0x00000001034deaac _ZZN8facebook3jsc10JSCRuntime30createFunctionFromHostFunctionERKNS_3jsi10PropNameIDEjNSt3__18functionIFNS2_5ValueERNS2_7RuntimeERKS8_PSB_mEEEEN20HostFunctionMetadata4callEPK15OpaqueJSContextP13OpaqueJSValueSL_mPKPKSK_PSN_ + 720\n18  JavaScriptCore                      0x000000010a56e754 _ZN3JSCL34callJSNonFinalObjectCallbackObjectEPNS_14JSGlobalObjectEPNS_9CallFrameE + 436\n19  JavaScriptCore                      0x000000010ad60b78 _ZN3JSC14handleHostCallEPNS_14JSGlobalObjectEPNS_9CallFrameENS_7JSValueEPNS_12CallLinkInfoE + 1016\n20  JavaScriptCore                      0x000000010ad169dc operationLinkCall + 156\n21  ???                                 0x0000000280004330 0x0 + 10737435440\n22  JavaScriptCore                      0x000000010a4bba08 llint_entry + 147988\n23  JavaScriptCore                      0x000000010a4bba08 llint_entry + 147988\n24  JavaScriptCore                      0x000000010a4bba08 llint_entry + 147988\n25  JavaScriptCore                      0x000000010a4bb978 llint_entry + 147844\n26  JavaScriptCore                      0x000000010a4bb978 llint_entry + 147844\n27  ???                                 0x0000000280325200 0x0 + 10740716032\n28  ???                                 0x000000028025f558 0x0 + 10739905880\n29  ???                                 0x000000028025ed34 0x0 + 10739903796\n30  ???                                 0x00000002803deac4 0x0 + 10741476036\n31  ???                                 0x00000002802b7d4c 0x0 + 10740268364\n32  ???                                 0x00000002801b2b40 0x0 + 10739198784\n33  ???                                 0x0000000280385c74 0x0 + 10741111924\n34  ???                                 0x0000000280384a7c 0x0 + 10741107324\n35  ???                                 0x0000000280255920 0x0 + 10739865888\n36  ???                                 0x00000002801a7dfc 0x0 + 10739154428\n37  ???                                 0x00000002802c6d00 0x0 + 10740329728\n38  JavaScriptCore                      0x000000010a497550 vmEntryToJavaScript + 256\n39  JavaScriptCore                      0x000000010ac69b2c _ZN3JSC11Interpreter11executeCallEPNS_14JSGlobalObjectEPNS_8JSObjectERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 496\n40  JavaScriptCore                      0x000000010a57fd6c JSObjectCallAsFunction + 612\n41  RNTester                            0x00000001034da610 _ZN8facebook3jsc10JSCRuntime4callERKNS_3jsi8FunctionERKNS2_5ValueEPS7_m + 268\n42  RNTester                            0x00000001034e69c4 _ZNK8facebook3jsi8Function4callERNS0_7RuntimeEPKNS0_5ValueEm + 100\n43  RNTester                            0x00000001034e6954 _ZNK8facebook3jsi8Function4callERNS0_7RuntimeESt16initializer_listINS0_5ValueEE + 112\n44  RNTester                            0x000000010323ea78 _ZNK8facebook5react16UIManagerBinding13dispatchEventERNS_3jsi7RuntimeEPKNS0_11EventTargetERKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEENS0_18ReactEventPriorityERKNS8_8functionIFNS2_5ValueES4_EEE + 656\n45  RNTester                            0x000000010318d5bc _ZZZN8facebook5react9SchedulerC1ERKNS0_16SchedulerToolboxEPNS0_26UIManagerAnimationDelegateEPNS0_17SchedulerDelegateEENK3$_0clERNS_3jsi7RuntimeEPKNS0_11EventTargetERKNSt3__112basic_stringIcNSG_11char_traitsIcEENSG_9allocatorIcEEEENS0_18ReactEventPriorityERKNSG_8functionIFNSA_5ValueESC_EEEENKUlRKNS0_16UIManagerBindingEE_clESY_ + 60\n46  RNTester                            0x000000010318d574 _ZNSt3__18__invokeB6v15006IRZZN8facebook5react9SchedulerC1ERKNS2_16SchedulerToolboxEPNS2_26UIManagerAnimationDelegateEPNS2_17SchedulerDelegateEENK3$_0clERNS1_3jsi7RuntimeEPKNS2_11EventTargetERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS2_18ReactEventPriorityERKNS_8functionIFNSC_5ValueESE_EEEEUlRKNS2_16UIManagerBindingEE_JSZ_EEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOS12_DpOS13_ + 32\n47  RNTester                            0x000000010318d524 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRZZN8facebook5react9SchedulerC1ERKNS4_16SchedulerToolboxEPNS4_26UIManagerAnimationDelegateEPNS4_17SchedulerDelegateEENK3$_0clERNS3_3jsi7RuntimeEPKNS4_11EventTargetERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_18ReactEventPriorityERKNS_8functionIFNSE_5ValueESG_EEEEUlRKNS4_16UIManagerBindingEE_S11_EEEvDpOT_ + 32\n48  RNTester                            0x000000010318d4f8 _ZNSt3__110__function12__alloc_funcIZZN8facebook5react9SchedulerC1ERKNS3_16SchedulerToolboxEPNS3_26UIManagerAnimationDelegateEPNS3_17SchedulerDelegateEENK3$_0clERNS2_3jsi7RuntimeEPKNS3_11EventTargetERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS3_18ReactEventPriorityERKNS_8functionIFNSD_5ValueESF_EEEEUlRKNS3_16UIManagerBindingEE_NSM_IS11_EEFvS10_EEclB6v15006ES10_ + 36\n49  RNTester                            0x000000010318c4d0 _ZNSt3__110__function6__funcIZZN8facebook5react9SchedulerC1ERKNS3_16SchedulerToolboxEPNS3_26UIManagerAnimationDelegateEPNS3_17SchedulerDelegateEENK3$_0clERNS2_3jsi7RuntimeEPKNS3_11EventTargetERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS3_18ReactEventPriorityERKNS_8functionIFNSD_5ValueESF_EEEEUlRKNS3_16UIManagerBindingEE_NSM_IS11_EEFvS10_EEclES10_ + 36\n50  RNTester                            0x000000010323add4 _ZNKSt3__110__function12__value_funcIFvRKN8facebook5react16UIManagerBindingEEEclB6v15006ES6_ + 76\n51  RNTester                            0x000000010321ee80 _ZNKSt3__18functionIFvRKN8facebook5react16UIManagerBindingEEEclES5_ + 32\n52  RNTester                            0x000000010321ee24 _ZNK8facebook5react9UIManager12visitBindingERKNSt3__18functionIFvRKNS0_16UIManagerBindingEEEERNS_3jsi7RuntimeE + 84\n53  RNTester                            0x000000010318ba9c _ZZN8facebook5react9SchedulerC1ERKNS0_16SchedulerToolboxEPNS0_26UIManagerAnimationDelegateEPNS0_17SchedulerDelegateEENK3$_0clERNS_3jsi7RuntimeEPKNS0_11EventTargetERKNSt3__112basic_stringIcNSG_11char_traitsIcEENSG_9allocatorIcEEEENS0_18ReactEventPriorityERKNSG_8functionIFNSA_5ValueESC_EEE + 156\n54  RNTester                            0x000000010318b9f4 _ZNSt3__18__invokeB6v15006IRZN8facebook5react9SchedulerC1ERKNS2_16SchedulerToolboxEPNS2_26UIManagerAnimationDelegateEPNS2_17SchedulerDelegateEE3$_0JRNS1_3jsi7RuntimeEPKNS2_11EventTargetERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS2_18ReactEventPriorityERKNS_8functionIFNSD_5ValueESF_EEEEEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSY_DpOSZ_ + 72\n55  RNTester                            0x000000010318b97c _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRZN8facebook5react9SchedulerC1ERKNS4_16SchedulerToolboxEPNS4_26UIManagerAnimationDelegateEPNS4_17SchedulerDelegateEE3$_0RNS3_3jsi7RuntimeEPKNS4_11EventTargetERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_18ReactEventPriorityERKNS_8functionIFNSF_5ValueESH_EEEEEEvDpOT_ + 64\n56  RNTester                            0x000000010318b930 _ZNSt3__110__function12__alloc_funcIZN8facebook5react9SchedulerC1ERKNS3_16SchedulerToolboxEPNS3_26UIManagerAnimationDelegateEPNS3_17SchedulerDelegateEE3$_0NS_9allocatorISC_EEFvRNS2_3jsi7RuntimeEPKNS3_11EventTargetERKNS_12basic_stringIcNS_11char_traitsIcEENSD_IcEEEENS3_18ReactEventPriorityERKNS_8functionIFNSF_5ValueESH_EEEEEclB6v15006ESH_OSK_SR_OSS_SY_ + 68\n57  RNTester                            0x000000010318a6b0 _ZNSt3__110__function6__funcIZN8facebook5react9SchedulerC1ERKNS3_16SchedulerToolboxEPNS3_26UIManagerAnimationDelegateEPNS3_17SchedulerDelegateEE3$_0NS_9allocatorISC_EEFvRNS2_3jsi7RuntimeEPKNS3_11EventTargetERKNS_12basic_stringIcNS_11char_traitsIcEENSD_IcEEEENS3_18ReactEventPriorityERKNS_8functionIFNSF_5ValueESH_EEEEEclESH_OSK_SR_OSS_SY_ + 68\n58  RNTester                            0x00000001030c2e60 _ZNKSt3__110__function12__value_funcIFvRN8facebook3jsi7RuntimeEPKNS2_5react11EventTargetERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS6_18ReactEventPriorityERKNS_8functionIFNS3_5ValueES5_EEEEEclB6v15006ES5_OS9_SH_OSI_SO_ + 108\n59  RNTester                            0x00000001030c28d4 _ZNKSt3__18functionIFvRN8facebook3jsi7RuntimeEPKNS1_5react11EventTargetERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS5_18ReactEventPriorityERKNS0_IFNS2_5ValueES4_EEEEEclES4_S8_SG_SH_SM_ + 72\n60  RNTester                            0x00000001030c26c4 _ZNK8facebook5react19EventQueueProcessor11flushEventsERNS_3jsi7RuntimeEONSt3__16vectorINS0_8RawEventENS5_9allocatorIS7_EEEE + 516\n61  RNTester                            0x00000001030bd58c _ZNK8facebook5react10EventQueue11flushEventsERNS_3jsi7RuntimeE + 196\n62  RNTester                            0x00000001030bd3d8 _ZNK8facebook5react10EventQueue6onBeatERNS_3jsi7RuntimeE + 44\n63  RNTester                            0x00000001030bf6b0 _ZZN8facebook5react10EventQueueC1ENS0_19EventQueueProcessorENSt3__110unique_ptrINS0_9EventBeatENS3_14default_deleteIS5_EEEEENK3$_0clERNS_3jsi7RuntimeE + 36\n64  RNTester                            0x00000001030bf680 _ZNSt3__18__invokeB6v15006IRZN8facebook5react10EventQueueC1ENS2_19EventQueueProcessorENS_10unique_ptrINS2_9EventBeatENS_14default_deleteIS6_EEEEE3$_0JRNS1_3jsi7RuntimeEEEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSF_DpOSG_ + 32\n65  RNTester                            0x00000001030bf630 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRZN8facebook5react10EventQueueC1ENS4_19EventQueueProcessorENS_10unique_ptrINS4_9EventBeatENS_14default_deleteIS8_EEEEE3$_0RNS3_3jsi7RuntimeEEEEvDpOT_ + 32\n66  RNTester                            0x00000001030bf604 _ZNSt3__110__function12__alloc_funcIZN8facebook5react10EventQueueC1ENS3_19EventQueueProcessorENS_10unique_ptrINS3_9EventBeatENS_14default_deleteIS7_EEEEE3$_0NS_9allocatorISB_EEFvRNS2_3jsi7RuntimeEEEclB6v15006ESG_ + 36\n67  RNTester                            0x00000001030be470 _ZNSt3__110__function6__funcIZN8facebook5react10EventQueueC1ENS3_19EventQueueProcessorENS_10unique_ptrINS3_9EventBeatENS_14default_deleteIS7_EEEEE3$_0NS_9allocatorISB_EEFvRNS2_3jsi7RuntimeEEEclESG_ + 36\n68  RNTester                            0x0000000102c2f1cc _ZNKSt3__110__function12__value_funcIFvRN8facebook3jsi7RuntimeEEEclB6v15006ES5_ + 76\n69  RNTester                            0x0000000102c2f174 _ZNKSt3__18functionIFvRN8facebook3jsi7RuntimeEEEclES4_ + 32\n70  RNTester                            0x000000010306a0cc _ZZNK8facebook5react21AsynchronousEventBeat6induceEvENK3$_0clERNS_3jsi7RuntimeE + 136\n71  RNTester                            0x000000010306a038 _ZNSt3__18__invokeB6v15006IRZNK8facebook5react21AsynchronousEventBeat6induceEvE3$_0JRNS1_3jsi7RuntimeEEEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOS9_DpOSA_ + 32\n72  RNTester                            0x0000000103069fe8 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRZNK8facebook5react21AsynchronousEventBeat6induceEvE3$_0RNS3_3jsi7RuntimeEEEEvDpOT_ + 32\n73  RNTester                            0x0000000103069fbc _ZNSt3__110__function12__alloc_funcIZNK8facebook5react21AsynchronousEventBeat6induceEvE3$_0NS_9allocatorIS5_EEFvRNS2_3jsi7RuntimeEEEclB6v15006ESA_ + 36\n74  RNTester                            0x0000000103068cf8 _ZNSt3__110__function6__funcIZNK8facebook5react21AsynchronousEventBeat6induceEvE3$_0NS_9allocatorIS5_EEFvRNS2_3jsi7RuntimeEEEclESA_ + 36\n75  RNTester                            0x0000000102c2f1cc _ZNKSt3__110__function12__value_funcIFvRN8facebook3jsi7RuntimeEEEclB6v15006ES5_ + 76\n76  RNTester                            0x0000000102c2f174 _ZNKSt3__18functionIFvRN8facebook3jsi7RuntimeEEEclES4_ + 32\n77  RNTester                            0x0000000103169304 _ZZNK8facebook5react16RuntimeScheduler12scheduleWorkENSt3__18functionIFvRNS_3jsi7RuntimeEEEEENK3$_0clES6_ + 64\n78  RNTester                            0x00000001031692b8 _ZNSt3__18__invokeB6v15006IRZNK8facebook5react16RuntimeScheduler12scheduleWorkENS_8functionIFvRNS1_3jsi7RuntimeEEEEE3$_0JS7_EEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSC_DpOSD_ + 32\n79  RNTester                            0x0000000103169268 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRZNK8facebook5react16RuntimeScheduler12scheduleWorkENS_8functionIFvRNS3_3jsi7RuntimeEEEEE3$_0S9_EEEvDpOT_ + 32\n80  RNTester                            0x000000010316923c _ZNSt3__110__function12__alloc_funcIZNK8facebook5react16RuntimeScheduler12scheduleWorkENS_8functionIFvRNS2_3jsi7RuntimeEEEEE3$_0NS_9allocatorISB_EES9_EclB6v15006ES8_ + 36\n81  RNTester                            0x0000000103167fe8 _ZNSt3__110__function6__funcIZNK8facebook5react16RuntimeScheduler12scheduleWorkENS_8functionIFvRNS2_3jsi7RuntimeEEEEE3$_0NS_9allocatorISB_EES9_EclES8_ + 36\n82  RNTester                            0x0000000102c2f1cc _ZNKSt3__110__function12__value_funcIFvRN8facebook3jsi7RuntimeEEEclB6v15006ES5_ + 76\n83  RNTester                            0x0000000102c2f174 _ZNKSt3__18functionIFvRN8facebook3jsi7RuntimeEEEclES4_ + 32\n84  RNTester                            0x00000001033d56e8 _ZZZ28RCTRuntimeExecutorFromBridgeP9RCTBridgeENK3$_0clEONSt3__18functionIFvRN8facebook3jsi7RuntimeEEEEENKUlvE_clEv + 724\n85  RNTester                            0x00000001033d5408 _ZNSt3__18__invokeB6v15006IRZZ28RCTRuntimeExecutorFromBridgeP9RCTBridgeENK3$_0clEONS_8functionIFvRN8facebook3jsi7RuntimeEEEEEUlvE_JEEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSE_DpOSF_ + 24\n86  RNTester                            0x00000001033d53c0 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRZZ28RCTRuntimeExecutorFromBridgeP9RCTBridgeENK3$_0clEONS_8functionIFvRN8facebook3jsi7RuntimeEEEEEUlvE_EEEvDpOT_ + 24\n87  RNTester                            0x00000001033d539c _ZNSt3__110__function12__alloc_funcIZZ28RCTRuntimeExecutorFromBridgeP9RCTBridgeENK3$_0clEONS_8functionIFvRN8facebook3jsi7RuntimeEEEEEUlvE_NS_9allocatorISD_EEFvvEEclB6v15006Ev + 28\n88  RNTester                            0x00000001033d4128 _ZNSt3__110__function6__funcIZZ28RCTRuntimeExecutorFromBridgeP9RCTBridgeENK3$_0clEONS_8functionIFvRN8facebook3jsi7RuntimeEEEEEUlvE_NS_9allocatorISD_EEFvvEEclEv + 28\n89  RNTester                            0x0000000102e4ce8c _ZNKSt3__110__function12__value_funcIFvvEEclB6v15006Ev + 68\n90  RNTester                            0x0000000102e4ce3c _ZNKSt3__18functionIFvvEEclEv + 24\n91  RNTester                            0x000000010349d744 _ZZN8facebook5react8Instance13JSCallInvoker13scheduleAsyncEONSt3__18functionIFvvEEEENK3$_3clEPNS0_10JSExecutorE + 28\n92  RNTester                            0x000000010349d71c _ZNSt3__18__invokeB6v15006IRZN8facebook5react8Instance13JSCallInvoker13scheduleAsyncEONS_8functionIFvvEEEE3$_3JPNS2_10JSExecutorEEEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSD_DpOSE_ + 36\n93  RNTester                            0x000000010349d6c8 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRZN8facebook5react8Instance13JSCallInvoker13scheduleAsyncEONS_8functionIFvvEEEE3$_3PNS4_10JSExecutorEEEEvDpOT_ + 32\n94  RNTester                            0x000000010349d69c _ZNSt3__110__function12__alloc_funcIZN8facebook5react8Instance13JSCallInvoker13scheduleAsyncEONS_8functionIFvvEEEE3$_3NS_9allocatorISA_EEFvPNS3_10JSExecutorEEEclB6v15006EOSE_ + 36\n95  RNTester                            0x000000010349c470 _ZNSt3__110__function6__funcIZN8facebook5react8Instance13JSCallInvoker13scheduleAsyncEONS_8functionIFvvEEEE3$_3NS_9allocatorISA_EEFvPNS3_10JSExecutorEEEclEOSE_ + 36\n96  RNTester                            0x00000001034c75dc _ZNKSt3__110__function12__value_funcIFvPN8facebook5react10JSExecutorEEEclB6v15006EOS5_ + 76\n97  RNTester                            0x00000001034c755c _ZNKSt3__18functionIFvPN8facebook5react10JSExecutorEEEclES4_ + 36\n98  RNTester                            0x00000001034c7528 _ZZN8facebook5react16NativeToJsBridge18runOnExecutorQueueENSt3__18functionIFvPNS0_10JSExecutorEEEEENK3$_8clEv + 92\n99  RNTester                            0x00000001034c74c0 _ZNSt3__18__invokeB6v15006IRZN8facebook5react16NativeToJsBridge18runOnExecutorQueueENS_8functionIFvPNS2_10JSExecutorEEEEE3$_8JEEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSB_DpOSC_ + 24\n100 RNTester                            0x00000001034c7478 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRZN8facebook5react16NativeToJsBridge18runOnExecutorQueueENS_8functionIFvPNS4_10JSExecutorEEEEE3$_8EEEvDpOT_ + 24\n101 RNTester                            0x00000001034c7454 _ZNSt3__110__function12__alloc_funcIZN8facebook5react16NativeToJsBridge18runOnExecutorQueueENS_8functionIFvPNS3_10JSExecutorEEEEE3$_8NS_9allocatorISA_EEFvvEEclB6v15006Ev + 28\n102 RNTester                            0x00000001034c5fe8 _ZNSt3__110__function6__funcIZN8facebook5react16NativeToJsBridge18runOnExecutorQueueENS_8functionIFvPNS3_10JSExecutorEEEEE3$_8NS_9allocatorISA_EEFvvEEclEv + 28\n103 RNTester                            0x0000000102e4ce8c _ZNKSt3__110__function12__value_funcIFvvEEclB6v15006Ev + 68\n104 RNTester                            0x0000000102e4ce3c _ZNKSt3__18functionIFvvEEclEv + 24\n105 RNTester                            0x0000000102f68120 _ZN8facebook5react17tryAndReturnErrorERKNSt3__18functionIFvvEEE + 24\n106 RNTester                            0x0000000102f8b970 _ZN8facebook5react16RCTMessageThread7tryFuncERKNSt3__18functionIFvvEEE + 36\n107 RNTester                            0x0000000102f904b0 _ZZN8facebook5react16RCTMessageThread10runOnQueueEONSt3__18functionIFvvEEEENK3$_1clEv + 80\n108 RNTester                            0x0000000102f90454 _ZNSt3__18__invokeB6v15006IRZN8facebook5react16RCTMessageThread10runOnQueueEONS_8functionIFvvEEEE3$_1JEEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSA_DpOSB_ + 24\n109 RNTester                            0x0000000102f9040c _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callIJRZN8facebook5react16RCTMessageThread10runOnQueueEONS_8functionIFvvEEEE3$_1EEEvDpOT_ + 24\n110 RNTester                            0x0000000102f903e8 _ZNSt3__110__function12__alloc_funcIZN8facebook5react16RCTMessageThread10runOnQueueEONS_8functionIFvvEEEE3$_1NS_9allocatorIS9_EES6_EclB6v15006Ev + 28\n111 RNTester                            0x0000000102f8f0f8 _ZNSt3__110__function6__funcIZN8facebook5react16RCTMessageThread10runOnQueueEONS_8functionIFvvEEEE3$_1NS_9allocatorIS9_EES6_EclEv + 28\n112 RNTester                            0x0000000102e4ce8c _ZNKSt3__110__function12__value_funcIFvvEEclB6v15006Ev + 68\n113 RNTester                            0x0000000102e4ce3c _ZNKSt3__18functionIFvvEEclEv + 24\n114 RNTester                            0x0000000102f8b740 ___ZN8facebook5react16RCTMessageThread8runAsyncENSt3__18functionIFvvEEE_block_invoke + 48\n115 CoreFoundation                      0x000000018039aa34 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20\n116 CoreFoundation                      0x000000018039a17c __CFRunLoopDoBlocks + 360\n117 CoreFoundation                      0x0000000180394f8c __CFRunLoopRun + 2336\n118 CoreFoundation                      0x0000000180394254 CFRunLoopRunSpecific + 584\n119 RNTester                            0x0000000102f42588 +[RCTCxxBridge runRunLoop] + 736\n120 Foundation                          0x0000000180bbede0 __NSThread__start__ + 704\n121 libsystem_pthread.dylib             0x00000001b18384e4 _pthread_start + 116\n122 libsystem_pthread.dylib             0x00000001b18336cc thread_start + 8\n"
  }
}
```

How I logged out the Errors:

```js
console.log('Error in JS:', JSON.stringify({
  name: e.name,
  message: e.message,
  stack: e.stack,
  ...e,
}, null, 2));
```

For to me unknown reason the `name`, `message` and `stack` is not printed when I directly stringify `e`.

Reviewed By: rshest

Differential Revision: D45182122

Pulled By: javache

fbshipit-source-id: 63e71c054b70816e3c021d69437805a82a7ef64e
2023-04-24 05:54:32 -07:00
Blake Friedman 14b2b1ce50 investigating cause of ReactViewManager returning null
Summary:
Throws and captures the overloading class as well as the component name to help us track.

[Android][Changed] - Added an exception, which will be removed shortly.

Reviewed By: cortinico

Differential Revision: D45185598

fbshipit-source-id: 222a38be12c0a41774c83b657a4e4134ce9c197f
2023-04-24 04:47:03 -07:00
Pieter De Baets e133100721 Unmount React applications when re-creating context [RFC] (#37004)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37004

Currently in RN Android when re-creating the context we don't unmount the underlying React application. This violates ViewManager and React hooks contracts, who are no longer able to properly unmount views, and instead the view hierarchy is forcefully torn down by Android UI. This differs from iOS, where we do unmount the application on reloads.

This is a trade-off with performance, as we'll keep the JS thread alive slightly longer to complete shutdown, but it's the right call for correctness. It also only mainly affects development, as recreating the context is rare in production.

Repro steps:

```
  useEffect(() => {
    console.log('Playground useEffect invoked');
    return () => {
      console.log('Playground useEffect destructor invoked');
    };
  }, []);
```

Validate that when reloading the application, the second console.log is printed.

Changelog: [Android][Changed] React trees will be unmounted when the application is reloaded

Reviewed By: luluwu2032

Differential Revision: D45145520

fbshipit-source-id: a4dcd2ff4a8fc14cb0f276a5ef9afe21d1104735
2023-04-24 03:58:37 -07:00
Antoine Doubovetzky 4da201396c (jest/setup): Add missing methods to Image mock (#36996)
Summary:
Fixes https://github.com/facebook/react-native/issues/35518

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[INTERNAL] [FIXED] - Add missing methods to Image mock

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/36996

Test Plan:
I used the example provided in the issue:

```javascript
import { useEffect } from "react"
import { Image } from "react-native"
import { render } from 'testing-library/react-native';

const MyComponent = () => {
    useEffect(() => {
        Image.getSize('uri', (width, height) => {
            console.log({width, height})
        })
    }, [])

    return null
}

describe('Foo', () => {
    it('something', () => {
        render(<MyComponent/>)
    })
})
```

Before the fix:
<img width="779" alt="Capture d’écran 2023-04-20 à 09 31 48" src="https://user-images.githubusercontent.com/17070498/233293066-e8673755-217f-48b4-a856-b9356ec3624e.png">

And after the fix:
<img width="346" alt="Capture d’écran 2023-04-20 à 09 32 40" src="https://user-images.githubusercontent.com/17070498/233293261-b6d02307-e67a-444f-a2de-e31eae32c0f1.png">

Reviewed By: cortinico

Differential Revision: D45179320

Pulled By: rshest

fbshipit-source-id: 323d04cdf720e23690e44f6c8621289e74b95c17
2023-04-24 03:17:25 -07:00
Moti Zilberman e66bdf0479 Enable lazy bundling in dev on iOS/Android (#37003)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37003

Changelog: [General][Added] [3/n] Support lazy bundling in development

Enables [lazy bundling](https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0605-lazy-bundling.md) when requesting a development bundle from Metro.

NOTE: This depends on a Metro diff (https://github.com/facebook/metro/pull/971) that hasn't landed yet, but is a no-op until then.

Reviewed By: jacdebug

Differential Revision: D43600054

fbshipit-source-id: 515e2180a2130fd1a75e53677e789d31a367f7c2
2023-04-24 01:28:09 -07:00