facebook / hermes

A JavaScript engine optimized for running React Native.

Home Page:https://hermesengine.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error "Cannot read property 'bind' of undefined"

FranciscoCHT opened this issue · comments

Bug Description

Hello! Recently enabled Hermes on a React Native (0.61.5) Android project. It seems that Hermes can not compile code correctly from the Feathers package https://github.com/feathersjs/feathers.
The service call to Feathers returns an error message [TypeError: Cannot read property 'bind' of undefined].
Disabling Hermes makes the error response dissapear and work as expected.

React Native version (if any): 0.61.5
Android version (if any): 11

Steps To Reproduce

  1. Use Feathers Client, with Authentication client.
  2. Enable Hermes on React-Native Android projects.
  3. Interact with a Feathers Server. On authenticate ('local' strategy), throws an error [TypeError: Cannot read property 'bind' of undefined]

Thanks for your report! This error is not enough by itself for us to identify the bug. If you can provide us with a github repo which reproduces the failure, that would be ideal.

Otherwise, the log which shows you the error message should also include a pointer to the JavaScript code which is failing and possibly a stack. If you can reproduce this in a development environment, the React Native red box should include this information as well. Any of this information would help us narrow down the cause of the error.

Closing due to lack of additional information. This can be reopened if there's more to go on in the future.

@mhorowitz here's a repo where you can see this issue in action.
https://github.com/silvestreh/feathers-on-hermes

The issue comes from Uberproto. Upgrading the feathers client to 5.0.0, which no longer uses Uberproto, makes the error go away. The 5.0.0 client works fine with APIs (server-side) built with Feathers 4.x.

I think it's still worth looking into, you never know what else might be breaking 🤷🏽‍♂️