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.

RCTNetworking in RN v0.18.1 and Element Type is invalid in RN v0.19

See original GitHub issue

When using RN v0.18.1

The component works well for iOS. However it failed in Android with the message “RCTNetworking.sendRequest got 6 arguments, expected 7” upon loading of app.

After reading up online, I decided to upgrade to RN v0.19.

After upgrade to RN v0.19

BOTH iOS & Android fails on the screen using the component with the message: “Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of”

Doing the following resolves the iOS screen and loads the video:

var Video = require('react-native-video').default;

Error is gone on Android but video is not loading.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Choujijicommented, Apr 29, 2016

Doing the following resolves the iOS screen and loads the video:

var Video = require(‘react-native-video’).default;

video can be played. Thanks.

RN 0.24.0 Android 4.3

0reactions
unmeccommented, Apr 5, 2017

@Choujiji Thanks you saved my day. 😃 iOS 10 RN 0.39.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

RCTNetworking in RN v0.18.1 and Element Type is invalid in RN v0 ...
After upgrade to RN v0.19. BOTH iOS & Android fails on the screen using the component with the message: "Element type is invalid:...
Read more >
Element type is invalid: expected a string (for built-in ...
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
Read more >
Element type is invalid-error : r/reactnative - Reddit
Every time I try to run the following code I get the error below: Element type is invalid: expected a string (for built-in...
Read more >
[React Native]Invariant Violation: Element type is invalid
Invariant Violation: Element type is invalid: expected a string( for built-in components) or a class/function (for composite components) but got: object.
Read more >
React Native error: Element type is invalid: expected a string ...
Android : React Native error: Element type is invalid : expected a string or a class/function but got: object [ Beautify Your Computer ......
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