Skip to content

Localdatastore does not work with personal parse server #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AtomicSpider opened this issue Feb 12, 2016 · 7 comments
Closed

Localdatastore does not work with personal parse server #398

AtomicSpider opened this issue Feb 12, 2016 · 7 comments

Comments

@AtomicSpider
Copy link

Current Code

    //Enable Local Datastore
    Parse.enableLocalDatastore(this);

    //initialize Parse with Parse Server
    Parse.initialize(this, getResources().getString(R.string.parse_app_id), getResources().getString(R.string.parse_client_id));

Personal Server Code

    //Enable Local Datastore
    Parse.enableLocalDatastore(this);

    //initialize Parse with Heroku Server
    Parse.initialize(new Parse.Configuration.Builder(this)
                    .applicationId(getResources().getString(R.string.parse_app_id))
                    .clientKey(getResources().getString(R.string.parse_client_id))
                    .server(getResources().getString(R.string.parse_server_url)).build()
    );

App works fine till I replace it with the personal server code, the app crashes while querying from local datastore which is odd. crashes at the code below:

    localQuery.fromLocalDatastore();
@parse-github-bot
Copy link

Thank you for your feedback. We prioritize issues that have clear and concise repro steps. Please see our Bug Reporting Guidelines about what information should be added to this issue.

Please try the latest SDK. Our release notes have details about what issues were fixed in each release.

In addition, you might find the following resources helpful:

@jpmassena
Copy link

hey @AtomicSpider,

With Personal Server code, you have to enable the local data store like this:

Parse.initialize(new Parse.Configuration.Builder(context)
                .server(...)
                .applicationId(...)
                .enableLocalDataStore()
                .build());

with the .enableLocalDataStore() while "building" the configuration.

You can remove
Parse.enableLocalDatastore(this);

@AtomicSpider
Copy link
Author

@jpmassena Thanks a lot mate !!!

@bearprada
Copy link

@jpmassena you save my life

@parse-github-bot
Copy link

This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback.

@parse-github-bot
Copy link

We are closing this issue due to another 7 days of inactivity. If you have additional information to help pinpoint this issue as an SDK bug, please reopen it with the additional information.Thank you for your feedback.

@allonmj
Copy link

allonmj commented Oct 12, 2016

would've been great to see this in the migration guide - you know, before I logged all of my users out of the app...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants