1

The reproduce the error, I've created a blank mobile app and a new sql database. Afterwards I've followed the quickstart guide and downloaded the backend and the Xamarin.Forms project.

I've deployed the Web-App to azure and started the Android app using the 5'' KitKat (4.4) XXHDPI Phone (Android 4.4 - API 19) emulator.

As soon as I add an item to the TodoItem - List (you see, it's the default sample app of xamarin mobile apps), the todoTable.InsertAsync call fails. Unfortunately, there is no detailed error.

It's just a error message telling "An unhandled exception occured". Error

In the output window, I can see the following error:

03-01 19:48:33.781 I/MonoDroid( 1512): UNHANDLED EXCEPTION:
03-01 19:48:33.793 I/MonoDroid( 1512): Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException: The request could not be completed.  (Internal Server Error)
03-01 19:48:33.793 I/MonoDroid( 1512):   at Microsoft.WindowsAzure.MobileServices.MobileServiceHttpClient+<ThrowInvalidResponse>d__24.MoveNext () [0x001ec] in <42e24ce875d34485ad11c4f8aebb904a>:0 

So I've had a look at the azure mobile app in the azure portal. Before I've ran the tests, I've enabled almost all the logs. I can see FREB-Protocols I can see a post request to /tables/TodoItem which failed with http 500. Unfortunately it does not tell my anything about the error itself. Authentification is disabled, so the authentification should not cause any problems.

I've included the whole log here: https://1drv.ms/b/s!AqCo2Ottp6L6wC7-nOFkDN7cERE6

Does anyone got any idea what could be wrong? Sitting here since far to many hours, guessing what could be wrong.

Florian
  • 5,918
  • 3
  • 47
  • 86

1 Answers1

0

The Internal Server Error means your service is crashing - that's why it is not producing any logs. You've not shared anything about your backend, but that is where your problem is.

Run the service locally and attach a debugger and step through the backend code. You can find details of running the service locally (attached to a local SQL instance) in the HOWTO documents on learn.microsoft.com.

Adrian Hall
  • 7,990
  • 1
  • 18
  • 26
  • I know that the problem is in the backend but I could not find the problem yet. If I attach a debugger I don't run into any exceptions. I've shared the log of the backend, the most important configurations and the fact that it is the original "quick start" application. – Florian Mar 01 '17 at 22:39
  • Found out, it was connected to database migrations as described here http://stackoverflow.com/questions/30880956/unable-to-update-database-to-match-the-current-model. Had to make a try, catch within the Post method. Otherwise the exception was not displayed. – Florian Mar 02 '17 at 11:44