Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18869] iOS: "Invalid JSON in where parameter"

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-05-07T20:09:20.000+0000
Affected Version/sRelease 4.0.0
Fix Version/sRelease 4.0.0, Release 4.1.0
ComponentsiOS
Labelsqe-4.0.0, regression
ReporterEric Wieber
AssigneeVishal Duggal
Created2015-05-04T19:00:09.000+0000
Updated2015-06-01T22:00:54.000+0000

Description

When using 4.0.0.RC2 and making an ACS objects query, I get an error where there previously was not one:
[ERROR] :  400: Invalid JSON in where parameter: 745: unexpected token at '%7B%22title%22%3A%22TIMOBAlloy--0Simulator8.3medium1307681024.png%22%7D'
*Steps to reproduce issue* 1. Create a project and include a query for an ACS Object 2. Run the project *Actual Results*: The above error is thrown *Expected Results*: No error is thrown *Notes*: This is the query I am using:
Cloud.Photos.query({
    limit: 1,
    where: { 'title': file.name }
}, function (e) {
    if (e.success) {
        alert("Image found");
    } else {
        alert("Unable to find image");
    }
});
The community is also encountering this: https://community.appcelerator.com/topic/329/4-0-0-rc2-query-invalid-json-in-where-parameter/2 If I switch to use SDK 4.0.0.RC then I do not get the error.

Comments

  1. Ingo Muschenetz 2015-05-04

    [~penrique] [~vduggal] thoughts?
  2. Vishal Duggal 2015-05-07

    Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/6824 4_0_X - https://github.com/appcelerator/titanium_mobile/pull/6825
  3. Eric Wieber 2015-06-01

    Verified fixed, using: MacOS 10.10.3 Studio 4.0.0.201505202026 Ti SDK 4.0.1.v20150529150210 Appc NPM 4.0.0 Appc CLI 4.0.1 Ti CLI 4.0.1 Alloy 1.6.0 Node v0.10.37 Java 1.7.0_45 I no longer encounter this error.

JSON Source