none
[Java][Mobile Service] Azure Demo App(TodoItem App) not working RRS feed

  • Question

  • Hi guys, 

    It's my first time working with Azure and I was just trying to make a demo Android app(the TodoItem Demo).

    I followed every step in the official tutorial(the one below) but it seemed that the auto generated code wasn't working. (and the code I wrote myself failed too)

    https://azure.microsoft.com/en-us/documentation/articles/mobile-services-android-get-started/

    I always got "Error while processing request" when the app starts or when I hit the "add" button

    Actually the same error occurs when either of the following methods is called:

    mToDoTable.where().field("complete").
    eq(val(false)).execute().get();

    or

    mToDoTable.insert(item).get();

    I wonder  if anybody here had experienced the same problem.  Any solutions? 



    Monday, February 22, 2016 4:42 PM

Answers

  • Hi David,

    As I know, the tutorial you followed has a sample project on GitHub, please see https://github.com/Azure/mobile-services-samples/tree/master/GettingStartedWithData.

    In this situation, I suggest that you can try to review the source code of the sample project firstly to help understanding deeply and reproduce the demo app.

    Hope it helps. Any concern, please feel free to let me know.

    Tuesday, February 23, 2016 12:48 PM
    Moderator

All replies

  • David,

    Do you have any additional error details you can share?

    Thanks,

    -Fabio

    Tuesday, February 23, 2016 2:58 AM
  • Hi David,

    As I know, the tutorial you followed has a sample project on GitHub, please see https://github.com/Azure/mobile-services-samples/tree/master/GettingStartedWithData.

    In this situation, I suggest that you can try to review the source code of the sample project firstly to help understanding deeply and reproduce the demo app.

    Hope it helps. Any concern, please feel free to let me know.

    Tuesday, February 23, 2016 12:48 PM
    Moderator
  • If I print out the entire error message I get 

    com.microsoft.windowsazure.mobileservices.MobileServiceException:Error while processing request.

    The wired thing is that I didn't modify anything. Everything is auto-generated from Azure

    I'm using a mac and tried on both os x and windows 10 in bootcamp but both failed. 

    Tuesday, February 23, 2016 11:12 PM
  • Hi Peter, 

    I pulled that project and found that the GettingStartedWithData project was very similar to the code generated by azure and unfortunately it failed also. It feels that I can get connected to Azure Mobile Service but whenever I try to read/write data from database it fails. 


    -- Yuxin 

    Tuesday, February 23, 2016 11:17 PM
  • I'm not allowed to attach pictures here.

    The cause if the error is java.net.SocketTimeoutException:timeout, so I guess it's that when the client side sends request(SQL query) to the server it's been blocked or rejected somehow. 

    Since there's no authentication issues here, I'm completely puzzled.

    Wednesday, February 24, 2016 10:55 PM
  • Hi David,

    The query request for Azure Mobile Service is not SQL query, that wrapped the Mobile Service REST API, please see https://msdn.microsoft.com/en-us/library/azure/jj710104.aspx.

    I suggest that you can refer to the section "Update the app to use the mobile service for data access" of the doc "Add Mobile Services to an existing Android app (JavaScript backend)" to check your code whether missing some details, please see https://azure.microsoft.com/en-us/documentation/articles/mobile-services-android-get-started-data/#update-the-app-to-use-the-mobile-service-for-data-access.

    Thursday, February 25, 2016 7:46 AM
    Moderator