Skip to content

BUG: objectId is an invalid field name while do installation #214

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
zenz opened this issue Jul 10, 2019 · 2 comments
Closed

BUG: objectId is an invalid field name while do installation #214

zenz opened this issue Jul 10, 2019 · 2 comments

Comments

@zenz
Copy link
Contributor

zenz commented Jul 10, 2019

running the examples with initInstallation() test. I got this.

/flutter (11004): ╭-- Parse Request
I/flutter (11004): curl -X POST -H 'content-type: text/plain; charset=utf-8' -H 'user-agent: Flutter Parse SDK 1.0.22' -H 'X-Parse-Application-Id: myserver.appid' -H 'X-Parse-Master-Key: 12345678' -d '{"objectId":"o54qZou1ZE","installationId":"40e9372c-dfe4-44ab-aacb-50f6a72bf2fc","deviceType":"android","localeIdentifier":"en_US","appName":"flutter_plugin_example","appVersion":"1.0","appIdentifier":"com.example.flutterpluginexample","parseVersion":"1.0.22"}' https://myserver:3001/hb/installations
I/flutter (11004):
I/flutter (11004):  https://myserver:3001/hb/installations
I/flutter (11004): ╰--
I/flutter (11004): ╭-- Parse Response
I/flutter (11004): Class: _Installation
I/flutter (11004): Function: ParseApiRQ.create
I/flutter (11004): Status Code: 105
I/flutter (11004): Type: InvalidKeyName
I/flutter (11004): Error: objectId is an invalid field name.
I/flutter (11004): ╰--
@zenz
Copy link
Contributor Author

zenz commented Jul 10, 2019

As I check the sdk source code, I found that at parse_base.dart

if (forApiRQ) {
      map.remove(keyVarCreatedAt);
      map.remove(keyVarUpdatedAt);
      map.remove(keyVarClassName);
      //map.remove(keyVarAcl);
      map.remove(keyParamSessionToken);
  }

Here, the objectId should be removed.
so I add this:
map.remove(keyVarObjectId);
The problem solved.

So this should be a bug?

@zenz zenz changed the title objectId is an invalid field name while do installation BUG: objectId is an invalid field name while do installation Jul 10, 2019
@zenz
Copy link
Contributor Author

zenz commented Jul 11, 2019

fixed in 1.0.23

@zenz zenz closed this as completed Jul 11, 2019
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

1 participant