Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9286733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:29:40+00:00 2026-06-18T19:29:40+00:00

I am using stackmob for few days and it is still new and there

  • 0

I am using stackmob for few days and it is still new and there is no much information on the web. I have encountered this issue: I won’t to get list of all the store name I have in my stackmobe “db” the scheme called store and here is the code I am using:

var Store = StackMob.Model.extend({
    schemaName: 'store'
});

 var stores = new Store();
stores.fetch({
    success: function(collection) {
        //after we've gotten all the Todo items from StackMob, let's see what we have!
        console.debug(collection.toJSON());
        alert(collection.toJSON());
    },
    error: function(collection, response){
        alert(collection.toJSON());
    }
}); 

I am getting this errors in my chrome log:

OPTIONS http://api.stackmob.com/store 400 (Bad Request) 
XMLHttpRequest cannot load http://api.stackmob.com/store. Origin http://127.0.0.1:4567 is not allowed by Access-Control-Allow-Origin.

Any help would be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T19:29:41+00:00Added an answer on June 18, 2026 at 7:29 pm

    May I ask what environment you’re running in (chrome, firefix, safari, opera, phonegap)? By default, the JS SDK is configured to make AJAX calls to a relative path. e.g. “/store” It looks like somehow it’s configured to hit “api.stackmob.com” directly, which only happens in these cases:

    • the JS SDK detects that you’re using PhoneGap
    • you’ve specified the URL to hit api.stackmob.com directly via the init:

      StackMob.init({
      …
      apiURL: ‘http://api.stackmob.com/‘
      })

    The first question I ask myself is how it’s making a call to api.stackmob.com while it looks like you’re running on the Python server: (I assume that’s what it is because I’m seeing 127.0.0.1:4567 in your original post)

    Another thing that Dennis Rongo pointed out above is your Python version. We tested with 2.7 but it sounds like he’s noting an issue with 3.3. But it’s still unexpected that you’re hitting api.stackmob.com from 127.0.0.1:4567. Do you have apiURL: ‘…’ set in your init? If so, I would try removing that.

    Setting apiURL will make the SDK call api.stackmob.com directly (api.stackmob.com/store), and the browser will behave like it would for any regular AJAX call and block it if it’s going cross domain, giving the error you see.

    Well, let me know! We definitely want to get you going!

    Erick

    PS I think you’re also trying to get more than one store. StackMob.Model only represents one store. You want StackMob.Collection.

    e.g.

    var Store = StackMob.Model.extend({ schemaName: 'store' });
    var Stores = StackMob.Collection.extend({ model: Store });
    
    var stores = new Stores();
    stores.fetch({
      success: function(results) {
        console.log(results.toJSON()); //should print out array of JSON objects representing your store items.
      }
    });
    

    More info:
    http://developer.stackmob.com/tutorials/js/Query-an-Object

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

using this code: Java Server side: ... out = new PrintWriter(this.client.getOutputStream(), true); ... public
I am using stackmob for backend service. I create a new user using these
Using ember 1.0.0-pre3 I have a little app that has this code: window.App =
I am using Stackmob iOS SDK http://www.stackmob.com/devcenter/docs/Datastore-API to communicate with Stackmob backend of my
I'm using the stackmob API in an android project and it seems that the
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using CI for the first time and i'm smashing my head with this seemingly
Using Yii MVC, I want to know when a user is still on my
Using SolrNet for querying & faceting. I have a combination of int, tdate and
Using this code, the following execution yields strange results: C 100 R W The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.