Realm-js: user.constructor._getExistingUser is not a function in Chrome Debugger

Created on 17 Jan 2018  路  14Comments  路  Source: realm/realm-js

While reinstalling an existing react native app, I have updated to the latest version of realm (2.2.2), along with upgrading all dependencies.

I get the user.constructor._getExistingUser is not a function error. This looks like a new added function.

This error might be related with "subscribeToObjects is not a function"

https://github.com/realm/realm-js/issues/1608

It was not possible to use chrome debugger with partial realm but now debugger is not usable with realmjs at all.

Version of Realm and Tooling

  • Realm JS SDK Version: 2.2.2
  • React Native: 0.52.0
  • Client OS & Version: Windows 10
  • Which debugger for React Native: ? Chrome
O-Customer T-Bug

All 14 comments

@ozmaat It appears that we simply forgot to add it to the debugger support library. I will do so as soon as possible. Thanks for reporting.

I noticed that the Realm.Sync.setLogLevel is missing too, is this related?

I'm still having the same issue with version 2.2.4, does this version contain the fix?

@eilongal Yes, we added _getExistingUser to the debugger support library in 2.2.4 but we will reexamine the fix!

@trungtin It is a separate issue but the fix is similar. Please create an issue for it.

Confirm that 2.2.4 did not fix the issue.

how to workaround this?

@hussainb I didn't check in which version this bug was introduced, but at least for me going back to version 2.1.0 solved the issue as a temporary workaround.

@eilongal , Thankyou for the quick response

@ozmaat @eilongal @hussainb I believe we found the root cause (see #1634) and it is embarrassing and simple. We plan to do a release soon.

@kneth - I have tested with the last version - 2.2.5. It is now giving another error in chrome debugger.

TypeError: Cannot read property 'map' of undefined at _getExistingUser......

@ozmaat Sorry to hear that. Do you see it on both Android and iOS?

@ozmaat Please take a look at https://github.com/realm/realm-js/pull/1638/. Before releasing it, you could try to patch lines 39 and 40 in lib/browser/user.js as suggested in my PR and rebuild your app.

@ozmaat I just released 2.2.6 containing #1638.

@kneth - this release has solved the issue. Thank you

Was this page helpful?
0 / 5 - 0 ratings