[SOLVED] Corona Viewer syncing project never completes

antkmk, your Corona project should be in Dropbox** /Apps/CoronaViewer, not Dropbox / CoronaViewer / Apps. Ensure your project is in  Dropbox **/Apps/CoronaViewer  as CoronaViewer doesn’t recognize anything other than this directory.

As a sanity check, which version of CoronaSDK or Enterprise have you guys been having this issue with? If it’s not the latest daily build, give that a try as I’m not able to reliably reproduce this issue on builds greater than 2602.

While CoronaViewer is a plugin, changes to the Corona core can affect the behavior of plugins as well.

ajaymccaleb-work,

Thanks for your reply!  My directory structure is as you outlined above.  I simply typed it backwards!  My version of Corona is v2015.2561.  I will look for a later daily build and let you know how that works.  Would I need to rebuild and re-iinstall CoronaViewer with the later build?

The latest I tried was 2605. I’ll get the latest daily build and try again.

I’ve upgraded to v2015.2625.  Rebuilt the CoronaViewer app.  Reinstalled in on my iPhone 6.  Relaunched it.  It asked to access my Dropbox, which I affirmed.  It then went to a black screen and said “syncing…”  After 5 minutes the phone screen turned off.  I re-entered my passcode, found a black screen with green battery at the top right where the menu bar is, but no “syncing…” message.  I left it alone, but kept  checking from time to time.  Still a black screen.  After about an hour I quit it and relaunched it.  Back to a black screen with no syncing message!  Am I missing a step?  I remember this being a pretty straightforward process only three to four weeks ago.

After milling through a more specific set of tests based on the new info you guys have given me, I was able to reproduce an issue that’s consistent with dave.hayes’ project calling require in subfolders, so a bug report will be filed for that.

As for antkmk, I’ll need some more info to see if your issue is the same or not. So, antkmk, a couple questions.

  1. Does your project also call require on code in a subdirectory?

  2. Did you see any errors in the device log when you built against 2561 of the Corona Simulator? Same question with 2625?

If calling require on code in a subdirectory is in fact the issue, you should an error like this in the device log,

Apr 28 12:44:21 iPhone-6-Plus-iOS-81 CoronaViewer[12362] \<Warning\>: Runtime error module 'subfolder.subblah' not found:resource (subfolder.subblah.lu) does not exist in archive no field package.preload['subfolder.subblah'] no file '/var/mobile/Containers/Data/Application/14BFBD79-DC4D-4FD1-A9E7-30AE45AD7385/Documents/.CoronaViewer/subfolder/subblah.lua' no file './subfolder/subblah.so' no file '/private/var/mobile/Containers/Bundle/Application/92FD9489-BA71-4A01-9ADE-A609C86477C8/CoronaViewer.app/subfolder/subblah.so' no file './subfolder.so' no file '/private/var/mobile/Containers/Bundle/Application/92FD9489-BA71-4A01-9ADE-A609C86477C8/CoronaViewer.app/subfolder.so'subfolder.subblah stack traceback: [C]: ? [C]: in function 'require' ?: in function 'require' /var/mobile/Containers/Data/Application/14BFBD79-DC4D-4FD1-A9E7-30AE45AD7385/Documents/.CoronaViewer/main.lua:37: in main chunk [C]: in function 'run' /Users/ajaymccaleb/Desktop/CoronaLabs/CoronaViewer/main.lua:3: in main chunk

antkmk, if your issue is in fact different, please submit a bug report and include the code for your project so we can take a deeper look.

dave.haynes, as another sanity check please take a look at the device log for your project running through viewer and post if you have any errors that are different than the above.

Sorry for the late reply, and sorry for not checking the device log sooner as well.

I do, in fact, see the error you’re describing:

Apr 28 16:00:28 Jamess-iPhone CoronaViewer[1941] \<Warning\>: Runtime error module 'scripts.utils' not found:resource (scripts.utils.lu) does not exist in archive no field package.preload['scripts.utils'] no file '/var/mobile/Containers/Data/Application/0FCECB8B-65AC-4CF6-838E-D3DB0FE01D81/Documents/.CoronaViewer/scripts/utils.lua' no file './scripts/utils.so' no file '/private/var/mobile/Containers/Bundle/Application/3B5C9FF2-9679-4A87-9703-6A073BD197C4/CoronaViewer.app/scripts/utils.so' no file './scripts.so' no file '/private/var/mobile/Containers/Bundle/Application/3B5C9FF2-9679-4A87-9703-6A073BD197C4/CoronaViewer.app/scripts.so'scripts.utils stack traceback: [C]: ? [C]: in function 'require' ?: in function 'require' /var/mobile/Containers/Data/Application/0FCECB8B-65AC-4CF6-838E-D3DB0FE01D81/Documents/.CoronaViewer/main.lua:57: in main chunk [C]: in function 'run' ?: in main chunk

Dave

First, yes, I am “requiring” from and to subfolders, but only in my actual app code, not from CoronaViewer.

  

Is it possible that requiring the zip plugin:  local zip = require( “plugin.zip” ).  Is causing an issue?  I do require that from CoronaViewer and from my app code.

In any case, I do not see any errors when looking at the Corona Simulator Console -syslog when building the CoronaViewer.  I’m not getting the error you’ve listed above.  Is this the correct place to look for this error?

Also, building my app for running in the simulator is not producing any errors either.

antkmk, you should be looking at the log from your iOS device. To get to this, do the following:

  1. Open Xcode on your machine (assuming you have it. If not, download it from the App store).

  2. From here, press cmd + shift + 2 to open Xcode organizer

  3. Select your connected device and you should see the log for the device in the lower right.

Thank you for the Xcode steps!  I hadn’t been using that to debug.

So, yes, my issue seems to be the same as Dave’s.  Below is the output from the device log and because I have a subdirectory of utilities for common objects (titlebar, tabar) the CoronaViewer is crashing.  Thanks for helping uncover the issue.  Please let us know when this is solved or if there is a way to work around it.  Cheers! -Keith

Apr 29 08:06:08 One-Bad-Ant-iPhone6 CoronaViewer-master[552] <Warning>: Runtime error

module ‘utilities.titleBarView’ not found:resource (utilities.titleBarView.lu) does not exist in archive

no field package.preload[‘utilities.titleBarView’]

no file ‘/var/mobile/Containers/Data/Application/7ACE1EE7-34F9-4595-94D4-0611D16614ED/Documents/.CoronaViewer/utilities/titleBarView.lua’

no file ‘./utilities/titleBarView.so’

no file ‘/private/var/mobile/Containers/Bundle/Application/EF794E9C-0F3B-4F7D-9C19-52C502D269EC/CoronaViewer-master.app/utilities/titleBarView.so’

no file ‘./utilities.so’

no file '/private/var/mobile/Containers/Bundle/Application/EF794E9C-0F3B-4F7D-9C19-52C502D269EC/CoronaViewer-master.app/utilities.so’utilities.titleBarView

stack traceback:

C: in function ‘error’

?: in function ‘gotoScene’

/var/mobile/Containers/Data/Application/7ACE1EE7-34F9-4595-94D4-0611D16614ED/Documents/.CoronaViewer/main.lua:16: in main chunk

C: in function ‘run’

/Users/keithkub/Documents/OBA App Development/Corona Viewer/CoronaViewer-master/main.lua:4: in main chunk

No problem. It’s a high priority issue for us so a fix should come sooner rather than later.

In the meantime, you guys should be able to use a daily build older than 2603 of the simulator to be unblocked while we solve the issue.

antkmk, you had mentioned that you began having sync problems around build 2561. That seems like a separate issue than this one, but that can be addressed later (assuming you’re still having problem after this issue with subfolders is fixed).

As another piece of general advice after looking at your crash log, using spaces in path names for anything related to programming is generally bad practice. From my own experience (not necessarily with Corona), spaces in path names can lead to very obscure bugs that you’ll burn a lot of time trying to resolve.

UPDATE:

While looking into this issue, we were able to reproduce the initial case that dave.haynes started this post about. If a file from Dropbox fails to load, then it’s possible you’ll get into a state where sync’ing never completes as viewer will continue trying to load that file until it succeeds.

Addressing this implementation oversight will come immediately after fixing this subfolder issue.

This issue with the subfolders has been resolved and the fix is live. You guys should be able to grab any build of the simulator 2015.2603 or greater and use CoronaViewer.

If you’re using Enterprise, the updated plugin binaries will come in the next daily build (2015.2626).

It’s working for me now.  Thank you!  -Keith

I can also confirm. It is working for me now as well. Thanks!