facebook

Error 404 calling webservice when testing Android app w/ GapDebug: CLOSED

  1. GapDebug
  2.  > 
  3. Getting Help – GapDebug
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #459550 Reply

    excepticons
    Participant
    edited by michael – marked thread closed based on post about using whitelist plugin and content-security-policy

    Hi.
    I get an error calling a webservice during a test of my app. When I’m testing the same app without GapDebug and only with Chrome Developer Console, the app works fine.

    This is a screenshot of GapDebug running my app (the same image are attached):

    GapDebug Error

    Info:

    GapDebug version 215 Update 5 (2.1)
    Mobile device BLU DashM/Android 5.1
    Workstation Windows 8.1 Pro

    Thanks for your cooperation.

    Gustavo

    #459581 Reply

    support-michael
    Keymaster

    Interesting!

    From the screenshot it was hard to make out the URL in the console. If you open the URL directly from a browser page do you experience a similar error? I’m assuming no from your problem description but wanted to ask.

    Would you mind sharing your app with us and instruction on how to replicate the issue?
    If yes, please send it to
    support at genuitec dot com
    Title it: GapDebug ajax issue from Gustavo
    We keep all such info confidential.
    If the apk is > 10Mb our support system may complain. As an alternative consider sharing from google docs, dropbox or similar free cloud storage.

    #459593 Reply

    excepticons
    Participant

    Hi, Michael.
    Yes. The url on screenshot works fine on a browser. The web service is active and works fine.
    This is the url, for testing purposes:

    I note that it may be related to the same topic Allow-Control-Allow-Origin. If so, how could I set GapDebugger for run Chrome with parameters such as "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --args --disable-web-security?

    Please, I need to share the complete application to search for a solution?

    Thanks,

    Gustavo

    #459594 Reply

    excepticons
    Participant

    Sorry. I don’t know why I sent the previous reply without the webservice link.
    This is the link:

    http://dondeestamifamilia.masterdevelopment.co/servicio.asmx/ChequearLoginRegistrado?hashString=frank.kafka@gmail.com%C3%B1Frank150

    Thank you.

    Gustavo

    #459708 Reply

    support-michael
    Keymaster

    Hi Gustavo,
    I don’t believe the issue is with GapDebug but rather with recent (2015) web security additions to Cordova/PhoneGap. I created a test app that performs ajax request to your shared url. It uses jquery for the ajax api. I used PhoneGap Build to built the app. The ajax request failed with 404. So then I added the whitelist plugin to my config.xml. The following changes enabled the app to successfully make requests to your example URL. I used GapDebug to set breakpts and step through the app and view console output.

    See the doc’s here https://github.com/apache/cordova-plugin-whitelist
    I added this to my config.xml. If you build locally you will need to add the plugin directly to your project.

      
      
    

    In my index.html I added a very liberal Content-Security-Policy meta tag just to get it working.

    
    
    #459927 Reply

    excepticons
    Participant

    Hi, Michael.
    Thank you for your help. Works fine!

    Gustavo.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Error 404 calling webservice when testing Android app w/ GapDebug: CLOSED

You must be logged in to post in the forum log in