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

App#getApp missing in Chrome debugging mode #3579

Closed
kraenhansen opened this issue Feb 11, 2021 · 4 comments
Closed

App#getApp missing in Chrome debugging mode #3579

kraenhansen opened this issue Feb 11, 2021 · 4 comments
Assignees

Comments

@kraenhansen
Copy link
Member

kraenhansen commented Feb 11, 2021

Goals

A unified experience when running with or without chrome debugging mode.

Expected Results

Calling the getApp static method on the App class should work when in Chrome debugging mode.

Actual Results

An error is thrown in the Chrome console:

TypeError: _realm.App.getApp is not a function

Steps to Reproduce & Code Sample

Run this in a React Native app running Chrome debugging mode:

import { App } from 'realm';
const app = App.getApp('realmjstestapp-jjhtf');

Version of Realm and Tooling

  • Realm JS SDK Version: 10.2.0
  • Node or React Native: React Native in Chrome debugging mode
  • Client OS & Version: iOS, N/A
  • Which debugger for React Native: Chrome

Additional context

A workaround for now is to create the app using the constructor:

const app = new App('realmjstestapp-jjhtf');

As documented in the implementation of App#_setVersions we have an outstanding task of making it easier to implement the RPC for a static method on some class (App, User, Credentials, etc.): https://github.com/realm/realm-js/blob/master/lib/browser/app.js#L38-L42

@tonygomez
Copy link

@kraenhansen still an issue as of 10.4.0. Any idea when it will be fixed?

@tonygomez
Copy link

@kraenhansen do you know of any work-arounds? I tried in safari and chrome.

@kraenhansen
Copy link
Member Author

The best known workaround is to debug using Safari as explained here: #491 (comment)

@bmunkholm
Copy link
Contributor

Closing this as it will be resolved with the support for Hermes and the Flipper debugger. Please see here to try it out and provide feedback. Thanks for your patience!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants