5 Replies Latest reply on Jun 4, 2017 12:57 PM by kathrynp525648

    App works with Desktop but Build just gets stuck loading

    kathrynp525648 Level 1

      I've been working with PhoneGap Desktop and am ready to move onto Build. On Desktop I get no errors when loading, and everything works as expected. I upload my zip file and it builds without any errors. I install it on my iPhone and when launch it, it just gets stuck:

      IMG_9327.PNG

      This is my first time using Build. I tried uploading the Hello World project and it works fine - it loads and debugging works. My project has debugging enabled but when I go to Debug, it shows the target as None, but it does show the client. I have had Hydration both enabled and disabled with no change. It just sits at this screen. Also - should this screen be showing my splash screen or is this a separate PhoneGap launching screen?

       

      I have been googling and just am lost as to where I need to start to figure this out. Is there anything anyone can recommend for general steps to troubleshoot? I can upload the config.xml if it helps (or anything else).

       

      I know this is vague but I'm having a hard time finding any information to help. Any general recommendations (or I can upload any info to help with specifics) would be so appreciated! Thank you!

        • 1. Re: App works with Desktop but Build just gets stuck loading
          kerrishotts Adobe Community Professional

          How have you been testing on the desktop? Using Chrome/Safari? Or in conjunction with the PhoneGap Developer app on your iPhone?

           

          The splash screen should use your resources assuming you've correctly configured config.xml. Please share your project's folder structure and config.xml (sans identifying/private information) so we can take a look.

           

          Also, as for debugging, you should be able to attach to your app using Safari remote debugging on your Mac. That might pin down the issue.

          • 2. Re: App works with Desktop but Build just gets stuck loading
            kathrynp525648 Level 1

            Thanks so much for the reply! I found an inssue my config.xml that was causing the launch problem. The app now installs and launches. But the weinre debugging still shows Targets: none. I downloaded and extracted the ipa file and saw that the script was injected into my index.html. I tried opening the Debug before launching the app, and waiting to make sure there wasn't just a delay. As mentioned above, it works for the Hello World project. I have no idea why the debug is not working with mine, nor any idea of what else I should be looking for.

             

            I tried attaching my device to a Mac, but it does not show up on the Develop menu. I have enabled the Web Inspector on my phone. I am using an Apple lightning cable. But the device does not appear. This is an older borrowed Mac with OS X Yosemite. I am not sure if that is part of the problem.

             

            I also installed GapDebug, but then saw that it is discontinued and does not support iOS 10. Is there any other alternative similar to this to be able to debug a PhoneGap iOS app with a Windows machine?

             

            At this point I have no idea how I am supposed to debug this! Any suggestions? :\

            • 3. Re: App works with Desktop but Build just gets stuck loading
              kerrishotts Adobe Community Professional

              Weinre) you'll need to whitelist the debug servers for this to work. See Whitelist - Apache Cordova

               

              Mac) hmm, I thought PGB-built apps would show up on iOS debugger, maybe they don't. I'll have to test that later.

               

              Windows) You might have luck with GitHub - google/ios-webkit-debug-proxy: A DevTools proxy (Chrome Remote Debugging Protocol) for iOS devices (Safari Remo…

              • 4. Re: App works with Desktop but Build just gets stuck loading
                kathrynp525648 Level 1

                It looks like it was the whitelist! I put the script code into my index.html and ran it locally in PhoneGap Desktop to check and sure enough I got a Content Security warning. I added https://*.phonegap.com to default-src and script-src. At first I didn't see anything change, but then I started typing this and went back to look and a target was found! I still am not seeing anything in the Console, but I will look into that separately.

                 

                Thank you so so so much for your help! I really appreciate it!!!!!

                • 5. Re: App works with Desktop but Build just gets stuck loading
                  kathrynp525648 Level 1

                  Ugh, I spoke too soon. It connected once. Now it's back to not. This is so frustrating.

                   

                   

                  Is there a certain sequence I need to follow to open things? Like open the debug first and then the app (or vice versa)?

                   

                  Do I need to uninstall the app from my phone each time or can I just update it each time I rebuild?

                   

                  Is there a delay finding targets? Or I should I expect it to detect it right away?

                   

                  When should I be refreshing the weinre page vs closing it and clicking Debug from the PGB app? Right now I am closing it if I upload new files and rebuild it. If I am opening and closing the same app build I have tried both refreshing and closing and relaunching by clicking Debug. I'm not sure if any of this makes a difference.

                   

                  The clients are updating when I open and close the app - though I don't quite understand the way it's working. There is always one client shown, regardless of whether the app is open or closed. The second client appears and turns red/fades out sometimes but I can't figure out what makes that happen - I guess maybe I'd expect it to appear when i open the app and disappear when I close it? That's not what it does, but is that what it's supposed to do?