question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[React-native] Cannot read property 'getDebugName' of undefined

See original GitHub issue

I have an app that works fine if I do not use/ reference mobx-remotedev. I can even use “react-native Debugger” to connect in debug mode and have access to the console.

However, when I add mobx-remotedev to a store, I get the error Cannot read property 'getDebugName' of undefined

// @flow
import remotedev from 'mobx-remotedev'    // <-- new
import { observable, action } from 'mobx'
import Orientation from 'react-native-orientation'
import { Keyboard, NetInfo, AppState, BackHandler } from 'react-native'

@remotedev({        // <-- new decorator
  name: 'AppStateStore',
  remote: true,
  global: true,
})
export default class AppStateStore {
  @observable keyboard: any
  @observable isConnected: boolean = true
  ...
}

error:

Cannot read property 'getDebugName' of undefined

handleException | @ | ExceptionsManager.js:63
-- | -- | --
  | handleError | @ | InitializeCore.js:69
  | reportFatalError | @ | error-guard.js:42
  | guardedLoadModule | @ | require.js:143
  | _require | @ | require.js:132
  | (anonymous) | @ | format.js:27
  | executeApplicationScript | @ | RNDebuggerWorker.js:1
  | t | @ | RNDebuggerWorker.js:1

“dependencies”: { … “react”: “16.3.1”, “react-native”: “0.55.3”, “mobx”: “^5.0.3”, “mobx-react”: “^5.2.3”, “mobx-remotedev”: “^0.2.8”, },

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

5reactions
eugene-beliaevcommented, Aug 12, 2018

Is anybody going to fix it?

0reactions
samscarsellacommented, Sep 18, 2018

Any updates on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native: Cannot read property 'state' of undefined
I suggest to read react docs for a better understanding. This code, using hooks should work : Edit : sandbox import React, {...
Read more >
How to Read React Errors (fix 'Cannot read property of ...
Got an error like this in your React component? Cannot read property `map` of undefined. In this post we'll talk about how to...
Read more >
mobx-remotedev - Bountysource
I just install this to React Native Debugger and I got ... Uncaught TypeError: Cannot read property 'action' of undefined at Object.
Read more >
Cannot read property 'setState' of undefined in React.js
The "cannot read property 'setState' of undefined" error occurs when a class method is called without having the correct context bound to the...
Read more >
Use ES6 Arrow Functions to Resolve "TypeError - Pluralsight
1TypeError : Cannot read property '<your property name>' of undefined. If you run into this error while writing React, the odds are high...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found