-
11 Nov 2012 12:26 PM #1
Answered: PhoneGap Build produces broken app after upgrading from ST 2.0.1 to ST 2.1.
Answered: PhoneGap Build produces broken app after upgrading from ST 2.0.1 to ST 2.1.
I have been using PhoneGap Build (PGB), Sencha Architect 2 and ST 2.0.1 for many months now. Everything was going smoothly. As per PhoneGap Build's documentation, the following line is required in index.html in order to include the PhoneGap library that their Build service automatically injects:
<script src="phonegap.js"></script>
After telling Sencha Architect to upgrade my project to ST 2.1, however, the app that PGB produces is just a broken white screen - after the loading screen is finished.
One thing I notice: if I remove the include line above from the index.html file, the app now works - however I am no longer including phonegap.js as PGB tells me I need to do.
So: something about ST 2.1 has broken my ability to use PGB as per their documentation. I call this a bug, as upgrading to 2.0.1 -> 2.1 should not have broken PGB's ability to generate an app for me.
-
Best Answer Posted by mhousser
I actually don't have an edited debug-all, I edited my non-debug .js.. here it is anyway; it has all Ext.device.* blocks removed.Attachment 40197
-
11 Nov 2012 4:18 PM #2
Additional info
Additional info
Just FYI, PGB's documentation for the phonegap library include can be found here: https://build.phonegap.com/docs/preparing-your-app.
To do so, simply ensure that the following reference is made in your index.html
<script src="phonegap.js"></script>
-
13 Nov 2012 12:00 AM #3
Nothing?
Nothing?
There's even a growing conversation here: https://groups.google.com/forum/?fro...ap/-7C6Qja7Deo
This is a blocking issue for me. We are going to have to revert to ST2.0.1 as ST2.1 does not allow me to use PGB at all.
-
13 Nov 2012 2:49 AM #4
Having the same issue
Having the same issue
So I upgraded from ST2.0 to ST2.1.
Running my app (which worked 100% using the ST2.0 lib) now produces a white screen with no logging of any errors. After doing some reading, I've tried various (limited) possible solutions out there - Nothing!
This is a serious one I'd say!
-
13 Nov 2012 3:00 AM #5
Has anyone tried ...
Has anyone tried ...
Code://<debug> Ext.Loader.setConfig({ disableCaching: false }); Ext.Ajax.setDisableCaching(false); Ext.Loader.setPath({ 'Ext': 'lib/sencha-touch-all.js', 'APP_NAME': 'AppNameHere' }); //</debug> ???
-
13 Nov 2012 3:26 AM #6
Try these
Try these
Hi Riyaad,
I had a tonne of issues when upgrading my app from Sencha Touch 2.0.3 to 2.1. Here is what I had to do to get it into a basic working state.
1) In resources/sass/ open config.rb and change 'sdk' in the following line to 'touch'
load File.join(dir, '..', '..', 'sdk', 'resources', 'themes') should become
load File.join(dir, '..', '..', 'touch', 'resources', 'themes')
2) If you are using jsonpcache in any of your stores or models, this will cause errors in the build. I reverted to using just 'jsonp' and the app built ok.
3) If you are using Pull to Refresh this will also cause errors. I have disabled this plugin by commenting it out and the app runs.
4) Make sure you run 'compass watch' from within resources/sass once you have corrected your config.rb file as above
I have put together a fairly comprehensive description of the issues I was having with Sencha Touch 2.1 along with error messages in a separate thread.
http://www.sencha.com/forum/showthread.php?248868-Updated-to-Sencha-Touch-2.1-Issues
Hope this helps,
Matt
-
13 Nov 2012 4:15 AM #7
Hi Mat,
Thank you for your response. I've read your post already. I've also dealt (ie removed) the PullRefresh to accomodate ST2.1, see link. That said, I'm already only using jsonp as ...
My index.html file looks likeCode:proxy: { type: 'jsonp', timeout: 60000, // 1 minute url: 'http://my.url/getdata', reader: { type: 'json', rootProperty: 'rootSchedule' } },
The contents of my lib directory is only these two filesCode:... <script type="text/javascript" src="lib/cordova-2.1.0.js"></script> <script type="text/javascript"> document.addEventListener("deviceready", function () { console.log("Cordova is loaded"); }, false); </script> <script type="text/javascript" src="lib/sencha-touch-all.js"></script> <script type="text/javascript" src="app/app.js"></script> ...- sencha-touch-all.js &
- cordova-2.1.0.js
I've attached an image to show my setup layout.
Screen Shot 2012-11-13 at 2.13.01 PM.png
-
13 Nov 2012 4:32 AM #8
Hi Riyad,
Sorry to hear you have been having problems so it seems I am not the only one. Unfortunately, since I am not using PhoneGap build I can't really help you with this.
Are you deploying your app to iOS devices and Android too? I carried out the changes I mentioned before and things started working somewhat.
I carried out 'sencha app build package' and copied the contents of the build directory over to /assets/www in my android project.
Does the app even work in your browser without trying to build?
Thanks,
Matt
-
13 Nov 2012 4:49 AM #9
Hi Mat,
Yes - I'm planning on deploying to both platforms (iOS & Android).
And Yes the app works in my browser ... but not in the PhoneGap build.
Hopefully there'll be a solution out shortly - ST guys are pretty jacked up.
Regards
R
-
13 Nov 2012 5:43 AM #10Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
- Answers
- 3101
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote