Unknown error 404 while saving on hybrid mobile app

Hi everyone,
I’m creating a hybrid mobile app (Android) with the Ionic Framework which uses AngularJs for its front end. When testing locally (on my desktop browser), I can successfully save to my table. However, when testing on the mobile app I get the error:
{“message”:“unknown error occurred”,“statusCode”:404}

  • I already checked that the saved object is correct.
  • I already changed the app keys from Javascript to Android with no luck.
    Any ideas?

Hi!

We need example of your code (or some primitive project)
for investigating this issue.
Could you send it to support@backendless.com?
Regards,
Kate.

For sure! Thanks!

Hi Eddie,

Could you please open the Network tab in browser’s Developer Tools and capture the request that causes the error? Specifically, we would need to see the following:

  • URL where the request is sent to
  • http headers
  • body of the request

Regards,
Mark

Hey guys,

Solved the issue. It was on my end, turns out that the Ionic Framework blocks every outgoing api call unless it’s whitelisted. That’s why it worked on the browser and not on mobile.

Eddie.

Hello Eddie,

I m facing same problem, "Message : Unknown error occurred. : status code : 404 “. M using Onsen UI framework. Let me know how u solved, if possible share me the code.
My email - Id "anithraj143@gmail.com

I lost temper resolving this issue. please share your solution or code. please Please.

Thanks in advance.

Regards
Anith

Anith,

Perhaps Eddie was talking about this:
http://docs.ionic.io/docs/cordova-whitelist

Please let me know if this is indeed the solution.

Regards,
Mark

Hello Mark, Eddie,

Thanks for the solution.
Here is the config.xml attached for future reference.

Download -> Remove the .txt file extension -> Use it.

Regards
Anith.

config.xml.txt (12.25kB)

Thanks for posting this, Anith. I am sure other users will find it helpful.

Mark