Can't connect expo to Parse Server


#1

We’re able to connect React and even React Native (using a simulator) to Parse Server, but have not been able to connect an exp application to it. When we attempt to login into the Parse Server using the following settings:

import React from ‘react’;
import { Provider } from ‘react-redux’;

import RootNavigation from ‘./src/stackNav/views/RootNavigation’;
import store from ‘./src/store’;
import Parse from ‘parse/react-native’;

export default class SampleNavigation extends React.Component {

    componentWillMount() {
      Parse.initialize('myAppId', 'myJavascriptKey');
      Parse.serverURL = 'http://localhost:1337/parse';
    }
     
    render() {
      return (
        <Provider store={store}>
          <RootNavigation />
        </Provider>
      );
    }

}

Expo.registerRootComponent(SampleNavigation);

But I’m continually receiving the same error message:

{“code”:100,“message”:“XMLHttpRequest failed: “Unable to connect to the Parse API””}

Please let me know if there is any special settings required by expo.

Thanks, Norman


#2

are you running this on your phone?

If you are running Parse on your computer and trying to connect to it on your phone, you need to put your specific IP address in – localhost will refer to the phone if you are on the phone.


#3

Plz did you find any solution? I have the same problem


#4

what do you guys think about Back4app as
the best Parse Alternative for developing scalable and
extensible applications? Is anyone using the platform?