Alpha Video Training
Results 1 to 11 of 11

Thread: Debug Restoring From Local Storage Loop in PhoneGap App

  1. #1
    Member
    Real Name
    Jmo
    Join Date
    May 2013
    Posts
    359

    Default Debug Restoring From Local Storage Loop in PhoneGap App

    So I thoroughly tested a phonegap app on 4 different devices without any issues and then all the sudden my app started freezing on the login screen after a user removed it from running in the background and then tried to open the app back up. I thought maybe some cached data from an old version of the app was causing the issue so I started messing with the version numbers of the lists and the component and even changed the name of the stored data thinking that might be it. The only thing that seems to fix the issue is if I turn off restoring the data from the lists, the variables will restore and the user will be able to get back into the app but then I have to refresh the list data which if they don't have a strong connection can really delay their use of the app.

    After figuring out the list restore was the issue I put an alert message in the client side OnRestoreFromLocalStorage event and the alert just kept firing as if the component kept trying to restore the data from storage but couldn't.

    Not sure if there is a way to debug the app once it is wrapped in phonegap but any information on how to do this would be great as I really need to figure out what is happening rather than just turning off list restore.

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,698

    Default Re: Debug Restoring From Local Storage Loop in PhoneGap App

    The easiest way is to use Chrome under Windows to debug. Turn on the Developer Mode for your device - you'll have to look that one up - sometimes it's different for various devices. Generally it's something about tapping the Build Number under About a number of times. Once turned on, plugged your device into your PC. You may get asked to approve something.

    On your PC, in Chrome... type chrome://inspect/#devices

    Now open your app on your device. You should see an index page link appear. Click that link and your App page will be displayed in Chrome.

    There are a bucket of walk-throughs for all this on the web... youtube.

  3. #3
    Member
    Real Name
    Jmo
    Join Date
    May 2013
    Posts
    359

    Default Re: Debug Restoring From Local Storage Loop in PhoneGap App

    I can get the web app version to come up on my Mac running chrome but I can't get my app to come up. Do I need to add a plugin for this to work? Or is the ability to debug actual phonegap apps only possible on a PC?

  4. #4
    Member
    Real Name
    Jmo
    Join Date
    May 2013
    Posts
    359

    Default Re: Debug Restoring From Local Storage Loop in PhoneGap App

    I installed everything I needed in order to remote debug an iOS device and the device also wouldn't show up in chrome which tells me there is something seriously wrong with the app (when I use the alert('this is an alert'); I don't get a message saying index.html says, it just pops up the alert). Looks like I have a long night ahead of me, but thank you for the suggestion!

  5. #5
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,698

    Default Re: Debug Restoring From Local Storage Loop in PhoneGap App

    Didn't know you were running a Mac. I rarely debug on a Mac. Maybe this will help... http://docs.phonegap.com/phonegap-bu...ols/debugging/

  6. #6
    Member
    Real Name
    Peter Johnston
    Join Date
    Oct 2010
    Location
    Sydney Australia
    Posts
    72

    Default Re: Debug Restoring From Local Storage Loop in PhoneGap App

    Hi Josh,
    I am experiencing the same problem since I upgraded to release 5159 5132.
    Have you resolved this issue?
    If so, can you share with the rest of us?

    ..... Very frustrating.....

  7. #7
    Member jgrannis's Avatar
    Real Name
    Jeff Grannis
    Join Date
    Apr 2016
    Location
    New Iberia, LA
    Posts
    344

    Default Re: Debug Restoring From Local Storage Loop in PhoneGap App

    We've seen this issue also and it looked very bad.
    I believe we recalculated all control and the loop was gone but the app seemed to still be hanging.
    Nothing showing up in the DevTools console so I tried running a Performance recording to see if I could see more but it hung also.
    We are however very busy and just decided to stop looking at the issues and to stay on build 5028 for awhile.

  8. #8
    Member
    Real Name
    Peter Johnston
    Join Date
    Oct 2010
    Location
    Sydney Australia
    Posts
    72

    Default Re: Debug Restoring From Local Storage Loop in PhoneGap App

    Hi all,

    A quick update on this topic.
    I just tried this again on the latest production release V4.5.4.8 - Build 5581-5237 10-JAN-2019

    I am using the refresh page at Logoff function as I want to do this.

    Good news is that it appears to have been improved, but not yet workable for what I want.

    iOS is better with load times less than 90 seconds.

    However, on Android the time to reload the app exceeds 3 minutes.
    I tried using the Weinre phonegap debug tool to isolate the problem and found that the App disappears off the debug screen and cannot be located again when the reload happens.

    Will stick with 5028 and try again in 6 months.

  9. #9
    Member
    Real Name
    James Taylor
    Join Date
    Jan 2019
    Posts
    1

    Default Re: Debug Restoring From Local Storage Loop in PhoneGap App

    I found this article online, it might help: https://kubedex.com/resource/skaffold/

  10. #10
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,297

    Default Re: Debug Restoring From Local Storage Loop in PhoneGap App

    Peter
    You are describing a bug that was fixed months ago. The reason it was taking a long time is that the restore events were firing multiple times.

  11. #11
    Member
    Real Name
    Peter Johnston
    Join Date
    Oct 2010
    Location
    Sydney Australia
    Posts
    72

    Default Re: Debug Restoring From Local Storage Loop in PhoneGap App

    Selwyn, thank you for the advice.
    I have downloaded V4.5.5.0 - Build 5667-5254 16-FEB-2019 and performed some preliminary testing. It appears that this issue has been fixed.
    It is a shame that the release notes for versions after V4.5.4.8 did not highlight that the Android problem was fixed, otherwise I would have been testing this sooner.
    I will be fully testing my app on V4.5.5.0 to ensure that other problems have not been introduced.

    I will provide another update after my testing.

Similar Threads

  1. PhoneGap app using local storage and server storage mixed together
    By lgrupido in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 02-25-2018, 03:23 PM
  2. Restoring data from Local Storage if Server is Offline
    By Pizzadude in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 01-08-2018, 07:58 AM
  3. Local Storage Keys
    By Transpeed in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 09-22-2017, 03:51 AM
  4. Image from local storage
    By I-windo in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 02-25-2015, 05:16 AM
  5. Local storage question
    By simonjm in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 02-03-2015, 09:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •