Skip to content

Column name restrictions enforced on sub-object keys #165

Closed

Description

@sdf611097

I just migrate the db to mongolab.

I start the parse server example.

I try to query something with javascript sdk 1.7.0 on nodejs v4.2.4.

Below is my javascript code.

var Parse = require('parse/node').Parse;
Parse.initialize("myAppId", "jsKey");
Parse.serverURL = 'http://localhost:1337/parse'

var clz = Parse.Object.extend('myClass');
var query = new Parse.Query(clz);
query.find().then(function(list){
console.log(list.length);
},function(error){
console.log(error);
});

One of my original class(size 4) will get ParseError { code: 1, message: undefined }.

Others get all obj size (not original default limit 100)

I use original keys and with default parse api server endpoint.

It works, and get 4 and 100 as expected.

I found that query.limit default 100 is gone.
query.skip cannot exceed 10000 constraint is gone.
Could you also list all influence of the code?
(In this case, query with 100 results must add query.limit(100); )

Only contains 'hello' cloud code.

Activity

  1. gfosco commented on Feb 2, 2016

    @gfosco
    Contributor

    Would be interested in any details / debugging you can do about the class returning the undefined error. It's possible to set the environment variable VERBOSE=1 and it will log all input/output.

    True, the limits are gone... We should probably re-enable the default limit 100, but the rest are no longer enforced because it was a constraint of running hundreds of thousands of apps as a service..

  2. sdf611097 commented on Feb 2, 2016

    @sdf611097
    ContributorAuthor

    parse-server-example running on port 1337.
    GET /parse/classes/ActionLink { 'user-agent': 'node-XMLHttpRequest, Parse/js1.7.0 (NodeJS 4.2.4)',
    accept: '/',
    'content-type': 'text/plain',
    host: 'localhost:1337',
    'content-length': '164',
    connection: 'close' } {
    "where": {}
    }
    error: bad key in untransform: 0
    Uncaught internal server error. bad key in untransform: 0 undefined
    GET /parse/classes/ActionLink { 'user-agent': 'node-XMLHttpRequest, Parse/js1.7.0 (NodeJS 4.2.4)',
    accept: '
    /
    ',
    'content-type': 'text/plain',
    host: 'localhost:1337',
    'content-length': '164',
    connection: 'close' } {
    "where": {}
    }
    error: bad key in untransform: 0
    Uncaught internal server error. bad key in untransform: 0 undefined
    GET /parse/classes/ActionLink { 'user-agent': 'node-XMLHttpRequest, Parse/js1.7.0 (NodeJS 4.2.4)',
    accept: '
    /
    ',
    'content-type': 'text/plain',
    host: 'localhost:1337',
    'content-length': '164',
    connection: 'close' } {
    "where": {}
    }
    error: bad key in untransform: 0
    Uncaught internal server error. bad key in untransform: 0 undefined
    GET /parse/classes/ActionLink { 'user-agent': 'node-XMLHttpRequest, Parse/js1.7.0 (NodeJS 4.2.4)',
    accept: '
    /
    ',
    'content-type': 'text/plain',
    host: 'localhost:1337',
    'content-length': '164',
    connection: 'close' } {
    "where": {}
    }
    error: bad key in untransform: 0
    Uncaught internal server error. bad key in untransform: 0 undefined
    GET /parse/classes/ActionLink { 'user-agent': 'node-XMLHttpRequest, Parse/js1.7.0 (NodeJS 4.2.4)',
    accept: '
    /
    ',
    'content-type': 'text/plain',
    host: 'localhost:1337',
    'content-length': '164',
    connection: 'close' } {
    "where": {}
    }
    error: bad key in untransform: _0
    Uncaught internal server error. bad key in untransform: _0 undefined

  3. gfosco commented on Feb 2, 2016

    @gfosco
    Contributor

    Take a look in your Mongo database for the ActionLink collection... do you really have objects with a key named _0 ?

  4. sdf611097 commented on Feb 2, 2016

    @sdf611097
    ContributorAuthor

    Yes, I have a object with a key named _0 ( _Version)

  5. gfosco commented on Feb 2, 2016

    @gfosco
    Contributor

    Did you have this object in hosted Parse?... It's not a valid column name...

  6. sdf611097 commented on Feb 2, 2016

    @sdf611097
    ContributorAuthor

    Column name does not start with _ , it's named "android"
    something like this
    "os":{
    "_0":{ 'k1':'v1'},
    "_1":{ }
    }

  7. gfosco commented on Feb 2, 2016

    @gfosco
    Contributor

    Interesting. Looks like we're enforcing the column name restriction on sub-objects. I'll accept it as a bug and take a look soon.

  8. changed the title [-]Query some class get ParseError { code: 1, message: undefined }[/-] [+]Column name restrictions enforced on sub-object keys[/+] on Feb 2, 2016
  9. added
    type:bugImpaired feature or lacking behavior that is likely assumed
    and removed on Feb 2, 2016
  10. mahabubakram commented on Feb 4, 2016

    @mahabubakram

    ALso I have found this problem with one of the key used for keeping twitter auth "_auth_data_twitter".

    And it is saying bad key in untransform: _auth_data_twitter undefined

  11. nlutsenko commented on Feb 4, 2016

    @nlutsenko
    Contributor

    Yup, there are more like that.
    I am working on a fix, but it takes slightly more time than I thought it would.

  12. enjoyjeremy-bc commented on Feb 7, 2016

    @enjoyjeremy-bc

    +1
    I'm also having this issue. The class I'm querying has a Pointer column, if that helps.
    I get this error:
    Uncaught internal server error. bad key in untransform: _content undefined

  13. giano commented on Feb 15, 2016

    @giano

    +1

  14. flovilmart commented on Feb 16, 2016

    @flovilmart
    Contributor

    @mahabubakram the _auth_data_twitter problem should be fixed with #247.

  15. giano commented on Feb 18, 2016

    @giano

    Sorry, still here.

  16. flovilmart commented on Feb 18, 2016

    @flovilmart
    Contributor

    @giano just the _auth_data_twitter should be fixed, as well as other auth_data.... But not the other cases

  17. gfosco commented on Feb 20, 2016

    @gfosco
    Contributor

    Still experiencing this with 2.1.2?

  18. sdf611097 commented on Feb 20, 2016

    @sdf611097
    ContributorAuthor

    It's still failed in parse-server@2.1.2.

    GET /parse/classes/ActionLink { 'user-agent': 'node-XMLHttpRequest, Parse/js1.7.1 (NodeJS 4.2.1)',
    accept: '/',
    'content-type': 'text/plain',
    host: 'zencirclectl.cloudapp.net:1337',
    'content-length': '174',
    connection: 'close' } {
    "where": {}
    }
    error: bad key in untransform: _0
    Uncaught internal server error. bad key in untransform: _0 undefined

  19. flovilmart commented on Feb 20, 2016

    @flovilmart
    Contributor

    @gfosco found the culprit, the untransform is recursive, that's why we apply the same rules to nested objects as top-level.

  20. gfosco commented on Feb 20, 2016

    @gfosco
    Contributor

    Nice, @flovilmart 👍 Merged that, closing this. @sdf611097 You can pull the master branch or wait for 2.1.3. Let us know if you have any problems. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions