worklet doesn't execute it's full body
See original GitHub issueDescription
According to my understanding this code https://gist.github.com/likern/7599926cdda1d4a5edd221a2630a44af should rerender component 1000 times.
And I have to see worklet: onFinish is called; index is 1000
in logs.
But, sometimes I see that worklet doesn’t work as expected.
It started executing and then suddenly just stops executing it’s body.
worklet: function start
is the last log message. That means worklet started executing and then suddenly stopped at all.
[Tue Sep 01 2020 17:26:20.844] LOG [MeasureLayout] index [8], props: {"message":"8"}
[Tue Sep 01 2020 17:26:20.848] LOG useEffect: before runOnUI
[Tue Sep 01 2020 17:26:20.848] LOG useEffect: after runOnUI
[Tue Sep 01 2020 17:26:20.850] LOG worklet: function start
while in worklet code there is unconditional next console.log
should be executed:
console.log('worklet: function start');
const onLayoutWasCalled = getIsOnLayoutCalled();
console.log(`worklet: onLayoutWasCalled is ${onLayoutWasCalled}`);
Steps To Reproduce
Reproducing code https://gist.github.com/likern/7599926cdda1d4a5edd221a2630a44af
Expected behavior
Worklet should always execute it’s full body.
Actual behavior
Worklet stops executing it’s body.
Package versions
- React: 16.11.0
- React Native: 0.62.2
- React Native Reanimated: 2.0.0-alpha.5
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Background audio processing using AudioWorklet - Web APIs
This article explains how to create an audio worklet processor and use it in a Web Audio application.
Read more >TypeError: undefined is not an object (evaluating 'worklet ...
Got this error when using react native reanimated carousel. Anyone with a work around? I was trying to use react reanimated carousel but...
Read more >Enter Audio Worklet - Chrome Developers
There are two problems in this design: the event handling is asynchronous by design, and the code execution happens on the main thread....
Read more >Worklet: Change Local GPO + Security Options | Community
Hello All! ... The worklet is pretty straight forward and labeled. ... #Set Execution policy to allow for 3rd party modules
Read more >11 Worklets - HTML Standard - WhatWG
Another important point about script-loading is that loaded scripts can be run in multiple WorkletGlobalScope s per Worklet , as discussed in ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m pretty sure you guys are using different versions of Reanimated that’s why you have different results. @likern I would wait until alpha.6 is released or use the master branch (at least for iOS).
I’ve run multiple times and couldn’t catch this bug again on
2.0.0-alpha.6
. Everything is working as expected.