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

Error "Cannot read property 'bind' of undefined" #2076

Closed
FranciscoCHT opened this issue Sep 23, 2020 · 8 comments
Closed

Error "Cannot read property 'bind' of undefined" #2076

FranciscoCHT opened this issue Sep 23, 2020 · 8 comments
Milestone

Comments

@FranciscoCHT
Copy link

FranciscoCHT commented Sep 23, 2020

Hello, the issue happens when trying to interact with a Feathers Server (authenticate service), from React-Native projects with FeathersClient/AuthenticationClient/SocketIOClient, and Hermes enabled on Android's build.gradle.
It seems that enable Hermes breaks the authentication.

According to #2023, that has the same error, the solution was disable Hermes. Are there any workaround to this? or a solution? My project needs Hermes to improve performance and size :/ Thanks in advance!

Steps to reproduce

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

Expected behavior

Succesfully authenticate with Hermes enabled.

Actual behavior

Throws an error [TypeError: Cannot read property 'bind' of undefined] when authenticate using "local" strategy.

System configuration

@feathersjs/feathers: 4.5.8
@feathersjs/authentication-client: 4.5.8
@feathersjs/socketio-client: 4.5.8
React Native Version: 0.61.5

@daffl
Copy link
Member

daffl commented Sep 23, 2020

This should really be a Hermes issue because it's apparently somewhere breaking some standard expected behaviour that works in any other JavaScript engine (including a standard React Native setup). It might however also be solved in the upcoming v5 which will no longer rely on the Uberproto library (where the error is coming from).

@daffl daffl added this to the v5 (Dove) milestone Oct 7, 2020
@daffl
Copy link
Member

daffl commented Jan 5, 2021

The Uberproto library has been removed in #2178 which will be available in Feathers 5.

@daffl daffl closed this as completed Jan 5, 2021
@KryptKode
Copy link

Feathers 5 is not stable for now. How can we use it on feathers 4?
Can you direct on how to migrate from feathers 4 to feathers 5?

@daffl
Copy link
Member

daffl commented Oct 25, 2021

The upgrade steps are available in the v5 migration guide.

@angelo-hub
Copy link

is there a patch solution to this? v5 is still in development and doesn't have a stable release

@daffl
Copy link
Member

daffl commented Mar 3, 2023

v5 is out and official. You can see the changelog here and read the release post here

@silvestreh
Copy link

At a first glance, upgrading just the client to the latest 5.0.0 (backend API is still on 4.x) release solves this issue.

I still haven't done a thorough test, but will report back if I find any issues.

@daffl would you expect anything to break in this scenario? (connecting to a Crow API using Dove client)

@daffl
Copy link
Member

daffl commented Mar 10, 2023

I don't think so since the protocol for both HTTP and Socket.io is still the same (just with added custom methods).

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

No branches or pull requests

5 participants