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

react native setup fails to load after 5.1.0-alpha.25 (24 works) #6512

Closed
bitfrost opened this issue Apr 14, 2019 · 6 comments
Closed

react native setup fails to load after 5.1.0-alpha.25 (24 works) #6512

bitfrost opened this issue Apr 14, 2019 · 6 comments

Comments

@bitfrost
Copy link

Describe the bug
My react native setup fails to load after 5.1.0-alpha.25 (24 works) with following error:
undefined is not an object (evaluating '_global.document.location')
This is happening on device via metro:
getQueryParams
queryparams.js:19:47

KnobManager.js:72:39
loadModuleImplementation
require.js:331:6

registerKnobs.js:19:49
loadModuleImplementation
require.js:331:6

index.js:66:28
loadModuleImplementation
require.js:331:6

panel.js:46:25
loadModuleImplementation
require.js:331:6

index.js:14:43
loadModuleImplementation
require.js:331:6

register.js:1:7
loadModuleImplementation
require.js:331:6

rn-addons.js:1
loadModuleImplementation
require.js:331:6

index.js:4
loadModuleImplementation
require.js:331:6

:0
loadModuleImplementation
require.js:331:6
guardedLoadModule
require.js:197:45
global code
:0

To Reproduce
import { withKnobs } from '@storybook/addon-knobs';
import { addDecorator } from '@storybook/react-native';
addDecorator(withKnobs);

Expected behavior
App loads

Screenshots
iPhone_X_—_12_2

Code snippets
If applicable, add code samples to help explain your problem.

System:

  • OS :MacOS
  • Device: andriod, ios
  • Framework: react-native
  • Addons: knobs + ondevice-knobs
  • Version: 5.1.0-alpha.25 +

Additional context
Add any other context about the problem here.

@benoitdion benoitdion added this to the 5.1.0 milestone Apr 14, 2019
@benoitdion benoitdion added the bug label Apr 14, 2019
@benoitdion
Copy link
Member

@ndelangen 3870bd1 looks like this might be related. I can take a look unless you think you have more context on this one.

@benoitdion
Copy link
Member

fixed with 59fa00c and 632eabd

@bitfrost
Copy link
Author

The above error is cleared after the above, now getting
TypeError: Cannot read property 'storyFn' of null

This error is located at:
in StoryView (created by StorybookRoot)
in StorybookRoot (at renderApplication.js:35)
in RCTView (at View.js:45)
in View (at AppContainer.js:98)
in RCTView (at View.js:45)
in View (at AppContainer.js:115)
in AppContainer (at renderApplication.js:34)

StoryView._this.renderListening
index.js:94:32
StoryView.render
index.js:147:20
finishClassComponent
ReactNativeRenderer-dev.js:11581:30
updateClassComponent
ReactNativeRenderer-dev.js:11508:23
beginWork
ReactNativeRenderer-dev.js:12874:13
performUnitOfWork
ReactNativeRenderer-dev.js:17276:11
workLoop
ReactNativeRenderer-dev.js:17316:23
renderRoot
ReactNativeRenderer-dev.js:17417:6
performWorkOnRoot
ReactNativeRenderer-dev.js:18423:6
performWork
ReactNativeRenderer-dev.js:18324:6
This project works in the .24 release.

@bitfrost
Copy link
Author

It is connecting and initializing the web ui..

@bitfrost
Copy link
Author

works when onDeviceUI: true.

Getting the above onDeviceUI: false. I will create a new issue.

@shilman
Copy link
Member

shilman commented Apr 17, 2019

@bitfrost did you try the latest alpha that contains @benoitdion 's fixes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants