unable to connect to back4app using parse4cn1 lib

277 views Asked by At

Good day all, I tried connecting to the back4app back end service using the new parse4cn1 lib .....I supplied the keys required but my app could not connect to the backend for some strange reasons.kept reporting (unable to connect to back end.........codename one revisions some long numbers) Some help or direction will be appreciated.Thanks all

2

There are 2 answers

0
Casagrande On BEST ANSWER

Where are you putting your Parse.initialize? Just went for some digging on parse4cn1 and it seems that it needs to be inside a "initVars" function, usually created within a state machine as you can see in the example below:

public class StateMachine extends StateMachineBase {
    /**
     * this method should be used to initialize variables instead of
     * the constructor/class scope to avoid race conditions
     */
    protected void initVars(Resources res) {
         Parse.initialize(API_ENDPOINT, APP_ID, CLIENT_KEY);
    }

}

Maybe that can help you on this connection issue. Also check the link below (A very useful guide) for further info:

https://github.com/sidiabale/parse4cn1/wiki/Usage-Examples

2
netsuite_insights On

What keys are you using? You need to pass your App Id and Client Key to parse4cn1. I just ran the regression tests against back4app and I didn't get any connection error. Can you provide more details (e.g. a dump) of the error you're getting?