Phonegap Cordova Ajax requests 404 (Not Found) Error

Sahil

My cordova version is 5.0.0

I am getting a 404 error for the all ajax request made when the app is deployed on the device. On the web browser, it works fine but same app when deployed on a device does not work.

I tried adding following to solve the issue but it hasn't helped.

Config.xml

<access origin="*" />

AndriodManiest.xml

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

I also added following in my index.html file but it didn't make any difference either.

<script>
    $.support.cors=true;
</script>

Anyone here has another trick to solve this issue?, Seems to be a quite common issue with phonegap but the fixes above worked in older vesion of the phonegap/cordova but non of them has worked in my case.

Any help would be great.

Derek Arends

I had the same issue and had to install the cordova-plugin-whitelist

cordova plugin add cordova-plugin-whitelist

Credit goes to this stackoverflow article - Ajax Command to request URL no longer working

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Cordova / Phonegap All External Ajax Requests Returns 404

From Dev

Laravel ajax 404 not found error

From Dev

cordova-plugin-whitelist Error 404 not found

From Dev

cordova-plugin-whitelist Error 404 not found

From Dev

jQuery Ajax request with error 404 (not found) but it works

From Dev

Jquery ajax is giving me a 404 not found error

From Dev

bootstrapValidator ajax submit error "404 Page Not Found"

From Dev

Javascript/AJAX Error 404 Not found or Undefined

From Dev

All requests 404 with Phonegap 3.0.0

From Dev

All requests 404 with Phonegap 3.0.0

From Dev

Phonegap (Cordova) error at CompileXIB

From Dev

Phonegap (Cordova) error at CompileXIB

From Dev

npm error : 404 Not Found: cordova-plugin-whitelist

From Dev

IIS 7 cannot route requests: error 404, file not found

From Dev

IIS 7 cannot route requests: error 404, file not found

From Dev

Cordova serve says 404 not found

From Dev

AJAX returning 404 Not Found

From Dev

AJAX call - 404 Not Found

From Dev

Laravel(ajax) 404 not found

From Dev

AJAX returning 404 not found

From Dev

Page not found (404) in Ajax

From Dev

Cordova/Phonegap FileTransfer.upload() error code = 1 (FILE_NOT_FOUND_ERR)

From Dev

DataTables warning: table id=dataTables - Ajax error. 404 Not Found

From Dev

404 not found error while deleting a table record with ajax and rails

From Dev

DataTables warning: table id=dataTables - Ajax error. 404 Not Found

From Dev

Ajax call to JsonResult in Controller fails with 404 error, "resource not found"

From Dev

Ajax call is not working, "404 not found error" showing in Yii Framework

From Dev

Phonegap 3.3/Cordova iOS Geolocation not found

From Dev

ionic plugin add phonegap-plugin-push results in a 404 Not Found Error

Related Related

  1. 1

    Cordova / Phonegap All External Ajax Requests Returns 404

  2. 2

    Laravel ajax 404 not found error

  3. 3

    cordova-plugin-whitelist Error 404 not found

  4. 4

    cordova-plugin-whitelist Error 404 not found

  5. 5

    jQuery Ajax request with error 404 (not found) but it works

  6. 6

    Jquery ajax is giving me a 404 not found error

  7. 7

    bootstrapValidator ajax submit error "404 Page Not Found"

  8. 8

    Javascript/AJAX Error 404 Not found or Undefined

  9. 9

    All requests 404 with Phonegap 3.0.0

  10. 10

    All requests 404 with Phonegap 3.0.0

  11. 11

    Phonegap (Cordova) error at CompileXIB

  12. 12

    Phonegap (Cordova) error at CompileXIB

  13. 13

    npm error : 404 Not Found: cordova-plugin-whitelist

  14. 14

    IIS 7 cannot route requests: error 404, file not found

  15. 15

    IIS 7 cannot route requests: error 404, file not found

  16. 16

    Cordova serve says 404 not found

  17. 17

    AJAX returning 404 Not Found

  18. 18

    AJAX call - 404 Not Found

  19. 19

    Laravel(ajax) 404 not found

  20. 20

    AJAX returning 404 not found

  21. 21

    Page not found (404) in Ajax

  22. 22

    Cordova/Phonegap FileTransfer.upload() error code = 1 (FILE_NOT_FOUND_ERR)

  23. 23

    DataTables warning: table id=dataTables - Ajax error. 404 Not Found

  24. 24

    404 not found error while deleting a table record with ajax and rails

  25. 25

    DataTables warning: table id=dataTables - Ajax error. 404 Not Found

  26. 26

    Ajax call to JsonResult in Controller fails with 404 error, "resource not found"

  27. 27

    Ajax call is not working, "404 not found error" showing in Yii Framework

  28. 28

    Phonegap 3.3/Cordova iOS Geolocation not found

  29. 29

    ionic plugin add phonegap-plugin-push results in a 404 Not Found Error

HotTag

Archive