Push failed: Bad Request #430
Unanswered
edalatpour
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Brand new to the Datasync community toolkit. I deployed the server on Azure and loaded up the MAUI sample app in VS Code. I updated my Endpoint with the URL of my app service and ran the app. It opens an empy todo list and I can enter values. Great so far.
But then I realized I need to change line 5 of AppDbContect.cs from
#undef OFFLINE_SYNC_ENABLEDto#define OFFLINE_SYNC_ENABLED.Once I do that, I start to get some unexpected results. When I click the sync button, I get an error dialog that says "Push failed: Bad Request".
Looking at the Debug Cosole, I see the message:
The interesting thing is that my data is now in the Azure SQL database. And when I run the app again, the data populates in the client. So the synchronization seems to be working fine. But my response is coming back with something other than success.
I realized after playing with it for a bit that every time I add an item to the list, it adds a blank item with no title under the real one. That explains the error message. But why is it doing this?
After some more debugging, I realized that the Xaml for addItemEntry was triggering AddItemAsync twice, once through
and again through
I removed the databinding lines and it is working fine now. Should I submit a PR or am I missing something about why it was done this way?
Beta Was this translation helpful? Give feedback.
All reactions