Application Error - Could not find the file utilities.js (in simulator) #21
Comments
Can you show Gist an app that demonstrates the issue you are seeing? I need more information, and the best way to communicate your problem is through code that I can run to reproduce it. Or are you having trouble running the test project included in the Redux repository? |
This issue is happening with just importing the Test project included. The only change I needed to make to have it compile was to move the redux.js into the actual resources folder, and remove the alias. This was giving an initial error that it couldn't find redux.js! Additionally of note, if I change the includeGlobal to just a normal include, the utitilies.js loads, however not in a global context, so then the functions inside it aren't accessible to the tab code. |
Also, I just tried publishing to the simulator in 1.6.2, and everything worked fine. It's definitely an issue with 1.7.0RC1. |
Ti Mobile 1.7 uses a common base path for Ti.include instead of having differences between iphone and android. So basically you can change Redux's include method to be this: include: function() {
for (var i2 = 0, l2 = arguments.length; i2 < l2; i2++) {
Ti.include(arguments[i2]);
}
}, Basically iphone no longer needs the path munging in 1.7 |
Ive tried to change the include function in redux.js as you describe above. Didn't work for me. Any suggestions? Thanks.. |
Here is my change that makes redux work with all versions of Ti Mobile. If this doesn't work for you then I'd say you probably have something misconfigured: $ svn diff
Index: MyApp/Resources/redux.js
===================================================================
--- MyApp/Resources/redux.js (revision 1116)
+++ MyApp/Resources/redux.js (working copy)
@@ -144,8 +144,12 @@
* your root folder!
*/
include: function() {
+ var version = Ti.version.split('.').slice(0, 2).join('.');
+ var osname = Ti.Platform.osname;
+
// android doesn't require path juggling
- if (Ti.Platform.osname == 'android') {
+ // Ti >= v1.7 dosen't require path juggling
+ if (osname == 'android' || version >= 1.7) {
for (var i2 = 0, l2 = arguments.length; i2 < l2; i2++) {
Ti.include(arguments[i2]);
} |
Fork, commit pull, request it, trwww! |
I have a fork, I'll send a pull request after work some time |
Hello together, I've a same issues since upgrade to the latest mobile sdk 1.7.1
causes a Java NullPointerException in line 205 - redux.js (latest version from 05. may)
any ideas? Greetings |
This is a different error than what you're posting about so its not This error started suddenly happening to me too... I've found the piece Long story short, I had to change that line to this to get the error to var rjss = (Ti.Filesystem.getFile(file + '').read() + Does that work for you? Todd W. On 6/25/11 12:48 PM, xeconsulting wrote:
|
HI Todd , thank you very much for your help!
This situation is very strange! Edit: It doesnt occur with Titanium 1.6.2 only 1.7 plus |
I have found the include method extremely buggy in combination with another includeGlobal. Ways to replicate the include method trying to include a file from the wrong path are as follows:
Clearly a javascript file included as global which in turn includes other files causes problems with your current include method. I've worked around this issue in the short term by simply using Ti.Include('vendor/underscore.js') in my global.js file, but it would be great if we had a proper fix for this. |
FYI, I kept running into issues with Redux includeGlobal trying to load files outside of the root of my application. And I have made all includeGlobal and include statements global by using something like I have however not tested this on Android as my app is only iOS for now, hopefully someone else can test this solution as it seems to be more robust than the relative path version and path mungling that Redux.js currently uses. |
…roduced by v8; resolves issue #21
I've just pushed a fix for this issue that's very similar to @trwww's approach (except I went with substring rather than a split slice join). The test project in the repo is working again with 1.7.0, 1.7.1, and 1.7.2 on iOS and Android. If you have a use case that is not working, please open up a new issue and we'll get it sorted out. @xeconsulting: that pastie isn't enough. You reference a number of other files that you haven't provided. If you are still having issues, please make a complete Gist or pastie so that I can reproduce and fix whatever is ailing you. |
I've tested this on 2 separate machines, both after importing the latest build of Redux.
Here's my current versions:
Titanium Studio: 1.0.0.201106032234
Titanium Mobile SDK: 1.7.0RC1
XCode/IOS Simulator: 4.3
When I run the app in Debug, I get only "finished opening all tab groups"
Then the app closes!
The text was updated successfully, but these errors were encountered: