-
-
Notifications
You must be signed in to change notification settings - Fork 983
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
Unsupported top level event type "onGestureHandlerStateChange" dispatched #320
Comments
Hi, @punksta |
same here
|
@punksta |
Could you build a showcase repo? |
@osdnk no, it's my opensource project actually. steps to reproduce:
if you need minimal example I can try to make it later. |
@osdnk if you need more info or smaller example, let me know. |
Having the same problem on react-native 0.57.5. I am using this library through react-navigation, if that makes a difference. E: Fixed it by doing the patch of |
E: So I am a bit behind your versions. |
Same issue here I'm using
the packager also crashes with FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x10003a08d node::Abort() [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
2: 0x10003a297 node::OnFatalError(char const*, char const*) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
3: 0x1001d2455 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
4: 0x10059d6d2 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
5: 0x1005a01a5 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
6: 0x10059c04f v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
7: 0x10059a224 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
8: 0x10059a725 v8::internal::Heap::CollectAllAvailableGarbage(v8::internal::GarbageCollectionReason) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
9: 0x1005a6b81 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
10: 0x1005789c4 v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
11: 0x10089051b v8::internal::IncrementalStringBuilder::Extend() [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
12: 0x100678d0b v8::internal::JsonStringifier::SerializeString(v8::internal::Handle<v8::internal::String>) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
13: 0x10067c258 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<true>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
14: 0x10067b684 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<false>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
15: 0x10067ab3d v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<false>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
16: 0x10067ce2c v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<true>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
17: 0x10067b684 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<false>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
18: 0x100676f8f v8::internal::JsonStringifier::Stringify(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
19: 0x100290df6 v8::internal::Builtin_Impl_JsonStringify(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/enahum/.nvm/versions/node/v10.11.0/bin/node]
20: 0x2777add5c17d
21: 0x2777add0a5a3
22: 0x2777adde8d5f
23: 0x2777add118b5
24: 0x2777add0a5a3
Abort trap: 6
events.js:167
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at WriteWrap.afterWrite [as oncomplete] (net.js:788:14)
Emitted 'error' event at:
at onwriteError (_stream_writable.js:431:12)
at onwrite (_stream_writable.js:456:5)
at _destroy (internal/streams/destroy.js:40:7)
at Socket._destroy (net.js:613:3)
at Socket.destroy (internal/streams/destroy.js:32:8)
at WriteWrap.afterWrite [as oncomplete] (net.js:790:10) |
can we re-opened this issue please? |
Because my navigators were created asynchronously, the handler was registered too late and thus throwing this error. I fixed the issue by simply doing: import 'react-native-gesture-handler' at the top of my |
Awesome @balthazar that seems to have done it |
perhaps I should open another issue, but after this was no longer throwing the error no the |
Upgrading to 0.58.0-rc.1 gives me this issue when trying to open my drawer |
@jamsch |
@osdnk Using the React Navigation v3 DrawerNavigator which is apparently using this library. I have a production build running on 0.57.6 and it works fine though. |
Resovled it, but how this happens. Module code is always running when code have been loaded, doesn't it? Can you tell me why? Thank you. ============================ I make a terrible mistake, I export module by using |
I have same issue with:
I did put |
I'm also still seeing this error. I put I'm using: Any ideas @yqz0203 ? |
Try put this import in the first index.js of your application. Like this:
|
@fsmaiorano Downgrade to |
On react-native E: Nope, disabled minification, issue still occurs. index.js:
thepatch.js:
|
Thanks for attaching context! I’ll try to figure out what’s going on soon |
If you follow the bisect strategy the error is on average 4 tests away from discovery and a maximum of 6 I think? Stay organized in your bughunt and you'll find it :) |
I had this problem as well. The app crashed in release mode when opening the drawer menu. Everything else worked fine. |
I updated RN version 0.61.4 Note: I only experienced this crash on iOS, after updating Xcode to v12 |
This didnt work for me! |
already add
still crashed on release mode, when i remove :( |
did you clear the cache of the app? I clear the cache of the application and it works |
oh ya it works now, i just re create brand new RN app, and it work now :) |
Just a heads up to anyone migrating to React Native 0.64.* that inlineRequires are now enabled by default in metro.config.js causing the "solution" to this issue to no longer function.
Please advise if there is another solution out there... we would love to get the startup performance enhancements from enabling inlineRequires. Original reference: #439 (comment) |
I think we could also use a |
The reason we were even upgrading to RN64 in the first place was to enable Hermes cross-platform so unfortunately this isn't an option for us, but might works for others! From your link:
|
Reading the React Native docs on event sending, my understanding is that the native side should not be sending events to the JS side if there are no JS listeners attached. I think what adding the The React Native docs mention the native side being able to have I may also be completely misinterpreting the issue. The RN docs mention triggering a warning when sending an event with no listeners, but nothing about throwing an Error in that case. Maybe this is something else? |
We're also experiencing the issue with RN64 and need the performance benefits of Hermes. Sounds like this issue should be reopened? |
This is right. If you read the docs carefully it actually states that preloading improves performance, because it bundles modules that needed to be loaded initially anyway. You can also use the preloadedModules/blockList to make sure I've solved it by creating a
After creating the file, return the configuration in Note that the list above works with RNGH version 1.10.3 in combination with TypeScript, not sure how the list looks without typescript |
@TNicholson11 I see no problem with using Hermes and inline requires in combination with the Edit: Upon rereading the docs one more time, I see where the confusion arises. It says that the inline requires part is meant for RAM bundles only, but AFAIK the preloading/blockList functionality also works with Hermes when you don't have RAM bundles enabled. (e.g. Hermes is the alternative to RAM bundles) |
Emphasis mine.. but yes, this was indeed where my confusion / concern came from @Hless ... I read that as if RAM Bundles are a prerequisite to using a blockList for inline requires but I'm thrilled to be wrong on that one. I will experiment with our app and report back when I get the time. Thanks for the info! |
This worked for me on the prod build with: "react-native": "0.64.1", but it seems really ugly and "magical" IMO. |
If you want to use const RNGestureHandlerModule = "react-native-gesture-handler";
const preloadedModules = new Proxy(
{},
{
get(_target, prop, _receiver) {
return prop.includes(RNGestureHandlerModule);
},
has(_target, prop) {
return prop.includes(RNGestureHandlerModule);
}
}
);
module.exports = {
transformer: {
getTransformOptions: () => ({
transform: {
inlineRequires: {
blockList: preloadedModules
},
preloadedModules
}
})
}
}; Would be nice if |
Of note: hermes did not used to have Proxy support but it does now, for anyone curious if this is compatible. There should be no issues here (though they that may not matter a bit at the bundler level...) |
This worked for me. I was facing this issue on iOS build but however I was not facing this issue in android build
|
Is this workaround still required with version
Seems to work fine 🤔 |
Worked for me too! Thanks @fsmaiorano |
I guess this issue is because of index.js file , I fixed this issue by adding ON TOP in my index.js file , |
For building ios application , if you have index.ios.js file
|
This worked for me! Thanks! 👍 |
I am getting crash when I touch the PanGestureHandler.
package.json
android versions:
crash log
related issue: expo/expo#2067
The text was updated successfully, but these errors were encountered: