Skip to content

[WebView] Error loading page - Error Code: -1022 #12757

Closed
@julesmoretti

Description

@julesmoretti

Description

Used a component to load a webpage for an iOS app. but upon propagating it I am getting:
screen shot 2017-03-06 at 9 31 53 pm

Reproduction

Here is the code for it:

import React, {
  Component,
} from 'react';

import {
  StyleSheet,
  View,
  WebView,
} from 'react-native';

export default class Map extends Component {
  componentDidMount() {
    console.log('Map:: componentDidMount');
  }

  render() {
    return (
      <View
        style={styles.container}
      >
        <WebView
          source={{uri: 'http://google.com'}}
          style={[{
            position: 'absolute',
            top: 0,
            left: 0,
            height: 500,
            width: 100
          }]}
        />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  map: {
    position: 'absolute',
    top: 0,
    left: 0,
    right: 0,
    bottom: 0,
  },
});

Solution

Provide explanation on how to resolve this and update the readme to explain how to fix this issue through your doc.

Additional Information

  • React Native version: ^0.41.2
  • Platform: iOS
  • Operating System: Mac OS - 10.12.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions