Skip to content
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

Exception: FormatException: Unexpected character (at character 1) #952

Open
4 tasks done
catalunha opened this issue Jul 10, 2023 · 1 comment
Open
4 tasks done
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@catalunha
Copy link

New Issue Checklist

Issue Description

can you help me ?

When I apply this query, it returns no error. But I can't limit by date:

  for (var element in list) {
       final QueryBuilder<ParseObject> queryTemp =
           QueryBuilder<ParseObject>(ParseObject(EventEntity.className));

       //No search by date

       queryTemp.whereEqualTo(
           EventEntity.attendances,
           (ParseObject(AttendanceEntity.className)..objectId = element.id)
               .toPointer());

       listQueries.add(queryTemp);
     }
     QueryBuilder<ParseObject> eventsOr = QueryBuilder.or(
       ParseObject(EventEntity.className),
       listQueries,
     );

When I apply the same query including the date limits as follows:

     for (var element in list) {
       final QueryBuilder<ParseObject> queryTemp =
           QueryBuilder<ParseObject>(ParseObject(EventEntity.className));

       //+++ search by date
       final start = DateTime(2023, 06, 25);
       final end = DateTime(2023, 06, 27);
       queryTemp.whereGreaterThanOrEqualsTo(
           EventEntity.day, DateTime(start.year, start.month, start.day));
       queryTemp.whereLessThanOrEqualTo(
           EventEntity.day, DateTime(end.year, end.month, end.day, 23, 59));
       //--- search by date

       queryTemp.whereEqualTo(
           EventEntity.attendances,
           (ParseObject(AttendanceEntity.className)..objectId = element.id)
               .toPointer());

       listQueries.add(queryTemp);
     }
     QueryBuilder<ParseObject> eventsOr = QueryBuilder.or(
       ParseObject(EventEntity.className),
       listQueries,
     );

I return this error:

╭-- Parse Response
Class: Event
Function: ParseApiRQ.query
Status Code: -1
Type: Other Cause
Exception: FormatException: Unexpected character (at character 1)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www....
^

╰--

Steps to reproduce

Actual Outcome

Expected Outcome

Environment

Parse Flutter SDK

  • SDK version: 5.1.0
  • Flutter version: 3.10.5
  • Dart version: 3.0.5
  • Operating system version: POP

Server

  • Parse Server version: 4.10.4

Logs

@parse-github-assistant
Copy link

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

2 participants