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.

Cannot read property 'getIn' of undefined

See original GitHub issue

I’m getting error when rendering

<OAuthSignInButton
          provider=...
          endpoint=... />

I’m specifying both required provider and endpoint props, but I get this error:

Uncaught TypeError: Cannot read property 'getIn' of undefined

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:1
  • Comments:34 (6 by maintainers)

github_iconTop GitHub Comments

13reactions
craigambrosecommented, Mar 9, 2016

I got the same error, which seemed to be caused by not having the reducer specified

import {authStateReducer} from "redux-auth";
// create your main reducer
const reducer = combineReducers({
  auth: authStateReducer,
  // ... add your own reducers here
});

It’d be nice if it handled this a bit better, either handling the null value, or returning an error telling people what to do. Also, the instructions in the README don’t mention setting up the reducer. The example app certainly has it in there, but it also has a lot of other stuff that a real app doesn’t need.

4reactions
tomascharadcommented, Aug 8, 2016

Hi @lynndylanhurley ,

I just hardcoded every container of redux-auth so it access the auth state like this:

export default connect((state) => ({ auth: state.get('auth') }))

And is working, I believe that if we isolate the selector in a module so it handles the immutable case (like in my previous post) for the meanwhile, then we could further give the users the ability to customize this selector. If you guide me a bit I could help you with a PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'getIn' of undefined · Issue #2332 · ...
It seems that the editor detects the target is a DraftJS based on its markup structure but doesn't check it is its own...
Read more >
reactjs - draft-js Cannot read property 'getIn' of undefined ...
I meet the same problem. It looks like because call editorState.getBlockTree(anchorBlockKey).getIn(...) in getUpdatedSelectionState.js the ...
Read more >
[Solved]-draft-js Cannot read property 'getIn' of undefined ...
I meet the same problem. It looks like because call editorState.getBlockTree(anchorBlockKey).getIn(...) in getUpdatedSelectionState.js the editorState.
Read more >
Draft-Js Cannot Read Property 'Getin' Of Undefined ...
Clicking nested editor having readOnlyfalse throws error getUpdatedSelectionState.js:32 Uncaught TypeError: Cannot read property 'getIn' of undefined. Clicking ...
Read more >
How to Avoid Getting 'Cannot read property of undefined' in ...
This error occurs when you try to read or access a property on an object that is undefined . Another common case that...
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