Skip to content

Uncaught Invariant Violation: Loading.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object. #29

Description

@simonwatt

Any time I try and return the react-loading component on Android 4.4 WebView (via a PhoneGap app) I get the following error:

"Uncaught Invariant Violation: Loading.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object."

The same code is working perfectly fine on newer versions of Android and iOS UIWebView, and is also working fine on all browsers I tried (including Chrome).

Relevant code on my App looks like:

     return (<ReactLoading type="spin" height='30px' width='30px' />)  

If I replace that code with the following I don't get an error which is another reason I think the issue is with the component rather than my code.

    return (<div>loading...</div>)  

I'm having issues with the source map not working, so don't have a better stack trace for now other than the following:

"Error: Loading.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.
at invariant (file:///android_asset/www/bundle.js:2315:15)
at ReactCompositeComponent._renderValidatedComponent (file:///android_asset/www/bundle.js:116621:143)
at ReactCompositeComponent.performInitialMount (file:///android_asset/www/bundle.js:116152:30)
at ReactCompositeComponent.mountComponent (file:///android_asset/www/bundle.js:116048:21)
at Object.ReactReconciler.mountComponent (file:///android_asset/www/bundle.js:12014:35)
at ReactDOMComponent.ReactMultiChild.Mixin.mountChildren (file:///android_asset/www/bundle.js:120536:44)
at ReactDOMComponent.Mixin._createInitialChildren (file:///android_asset/www/bundle.js:117512:32)
at ReactDOMComponent.Mixin.mountComponent (file:///android_asset/www/bundle.js:117331:12)
at Object.ReactReconciler.mountComponent (file:///android_asset/www/bundle.js:12014:35)
at ReactDOMComponent.ReactMultiChild.Mixin.mountChildren (file:///android_asset/www/bundle.js:120536:44)"

I am using version 0.1.4.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions