Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Things get required twice #14

Open
emiloberg opened this issue May 4, 2015 · 2 comments
Open

Things get required twice #14

emiloberg opened this issue May 4, 2015 · 2 comments

Comments

@emiloberg
Copy link
Contributor

Steps to reproduce:

  1. Cloned repo
  2. Changed UUID in Gulpfile.js
  3. Updated <sdk-version>3.5.0.GA</sdk-version> to <sdk-version>3.5.1.GA</sdk-version> in tiapp.xml

When I'm running with grunt dev -p ios and press the login button in the simulator, I get the following printout in the terminal:

[INFO] [iphone, 8.3, 192.168.1.68] [
    "OK"
]
[INFO] [iphone, 8.3, 192.168.1.68] [
    "OK"
]

Notice that I get it twice.

And if I add Ti.API.debug('index.js runned!'); as line 1 in src/controllers/index.js I get that printout twice as well. It looks like this:

...
[INFO] [iphone, 8.3, 192.168.1.68] Requiring: /Users/emiloberg/Library/Developer/CoreSimulator/Devices/11146D86-F1A5-468C-9D0E-8231FF0F6B72/data/Containers/Data/Application/89780833-3946-4279-885B-1123B90B53B7/Documents/JAST/iphone/alloy/controllers/index.js
[DEBUG] [iphone, 8.3, 192.168.1.68] index.js runned!
[INFO] [iphone, 8.3, 192.168.1.68] Requiring: /Users/emiloberg/Library/Developer/CoreSimulator/Devices/11146D86-F1A5-468C-9D0E-8231FF0F6B72/data/Containers/Data/Application/89780833-3946-4279-885B-1123B90B53B7/Documents/JAST/iphone/nano.js
[INFO] [iphone, 8.3, 192.168.1.68] JAST launched.
[INFO] [iphone, 8.3, 192.168.1.68] Requiring: /Users/emiloberg/Library/Developer/CoreSimulator/Devices/11146D86-F1A5-468C-9D0E-8231FF0F6B72/data/Containers/Data/Application/89780833-3946-4279-885B-1123B90B53B7/Documents/JAST/iphone/alloy/controllers/BaseController.js
[INFO] [iphone, 8.3, 192.168.1.68] Requiring: /Users/emiloberg/Library/Developer/CoreSimulator/Devices/11146D86-F1A5-468C-9D0E-8231FF0F6B72/data/Containers/Data/Application/89780833-3946-4279-885B-1123B90B53B7/Documents/JAST/iphone/alloy/widgets/yy.alert/controllers/widget.js
[INFO] [iphone, 8.3, 192.168.1.68] Requiring: /Users/emiloberg/Library/Developer/CoreSimulator/Devices/11146D86-F1A5-468C-9D0E-8231FF0F6B72/data/Containers/Data/Application/89780833-3946-4279-885B-1123B90B53B7/Documents/JAST/iphone/alloy/controllers/index.js
[DEBUG] [iphone, 8.3, 192.168.1.68] index.js runned!
...

It looks like a lot of things is required twice. See the full log: https://gist.github.com/emiloberg/76619f49f6ff64c97d74#file-gistfile1-sh-L244-L273

Any idea why this is?

@albemuth
Copy link

I've seen the same but it seems to be a problem with logging, try Ti.API.debug('index.js ran!', Math.random());, from what I've seen the repeated log statements share the same random number which suggest it's the logger that is the problem.

@gregpardo
Copy link

I noticed this too. If it's just the logger I'm just going to ignore it. It's weird though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants