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

Error on Android #10

Open
DouglasHennrich opened this issue Jan 7, 2016 · 2 comments
Open

Error on Android #10

DouglasHennrich opened this issue Jan 7, 2016 · 2 comments

Comments

@DouglasHennrich
Copy link

I'm getting this error:

[ERROR] TiExceptionHandler: (main) [0,10090] - In ts.httprequest.js:1,69
[ERROR] TiExceptionHandler: (main) [0,10090] - Message: Uncaught Error: Attempt to invoke interface method 'boolean java.util.Map.isEmpty()' on a null object reference
[ERROR] TiExceptionHandler: (main) [0,10090] - Source: (r,"handleError for url ("+e.method+") "+e.url),Ti.API.error(r,JSON.stringify(
[ERROR] V8Exception: Exception occurred at ts.httprequest.js:1: Uncaught Error: Attempt to invoke interface method 'boolean java.util.Map.isEmpty()' on a null object reference

my code to fire httpRequest:

var _params = {
      cidade: Alloy.User.cidade
    , estado: Alloy.User.estado
    , lat: userLat || Alloy.User.lat
    , long: userLng || Alloy.User.lng
    };


  new Alloy.Globals.HTTP({
    method: "POST"
  , url: config.url + 'consulta_todos.php'
  , data: _params
  }).then(_callbackConsulta).catch(_callbackError);

On iOS works just fine but on Android I got that error

ts-httprequest v1.4.2

@PierreGUI
Copy link
Contributor

Looks like it doesn't like the response.
How does your API response look like ?

@DouglasHennrich
Copy link
Author

it returns an json encoded as string from my php

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

2 participants