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

Having issues with LiveReload #45

Closed
thegranddesign opened this issue Jun 5, 2016 · 15 comments
Closed

Having issues with LiveReload #45

thegranddesign opened this issue Jun 5, 2016 · 15 comments

Comments

@thegranddesign
Copy link

thegranddesign commented Jun 5, 2016

This is my first foray into Cordova so please bear with me. Here is what I attempted:

  • Installed ember-cli-cordova and got it up and running (including running the generator - I'm only using iOS right now)
  • Remembered @alexblom's talk from EmberConf and realized the more up-to-date addon was ember-cordova so switched to that
  • Moved the cordova -> ember-cordova/cordova
  • Got it to the point that ember cordova:open would open in XCode and I could hit build to run it

Next I tried to get LiveReload working:

  • Followed all the instructions here
  • My allow-navigation config in ember-cordova/cordova/config.xml is currently set to * to remove any additional potential problems from that
  • My ember-cordova config in environment.js is currently set to the following:
{
  cordova: {
    rebuildOnChange : false,
    emberUrl        : `http://${addresses[0]}:4200`,
    reloadUrl       : `http://${addresses[0]}:4200`,
    liveReload      : {
      enabled  : true,
      platform : 'ios'
    },
  }
}

I have tried both 4200 and 49154 for the reloadUrl considering I wasn't sure what the docs meant. I would assume it would just use emberUrl if that's what it wanted but since the reloader is serving from 49154 my assumption is that reloadUrl is looking for that and not the emberUrl.

Either way, neither of them worked.

  • Executed ember cordova:serve This does all the stuff, but the docs make it seem as though it should launch the app, however it does not.
  • Executed ember cordova:open in a separate tab. This opens XCode, but does not run the app
  • Run the build in XCode. App opens successfully in Simulator and is pulling from the emberUrl
  • Changed the app in my editor (simple HTML change in index.html)

Expected Result

App in simulator refreshes to reflect those changes

Actual Result

App in simulator does not refresh

More Information

Interestingly, even if I quit Simulator and rebuild the app in XCode I still don't see the changes. I must completely rebuild the entire app to see changes to the code.

@zxcware
Copy link

zxcware commented Jun 5, 2016

I am a starter too. But I haven't gone that far, stuck in an issue, "exeption nativeEvalAndFetch : ReferenceError: Can't find variable: cordova global code - index.html:1:127". What example app did you use to make it work in simulator? Mine shows a blank screen with the emberjs super-rentals example app.

@thegranddesign
Copy link
Author

@zxcware Probably want to open up your own issue since it's a separate problem. 👍

@alexblom
Copy link
Member

alexblom commented Jun 5, 2016

@zxcware: Yes please open a new ticket, we don't have an example app right now.

@thegranddesign: Can you run a quick debug step for me. With Mac and iPhone on the same network, run ember s. Then hit http://macNetworkIp:4200 on iPhone browser and confirm it loads as expected?

@zxcware
Copy link

zxcware commented Jun 5, 2016

@alexblom I'll do that. Thanks.
@thegranddesign Would you mind telling me what app you used and it showed up in ios simulator?

@thegranddesign
Copy link
Author

@alexblom I did and it does. Opens in Safari by hitting my Mac's network IP and the LiveReload works as well (in Safari).

@thegranddesign
Copy link
Author

I've also tried running it both from Simulator as well as from my device.

@thegranddesign
Copy link
Author

Which port is correct for the reloadUrl? Should it be the port the LiveReload server is running on or the port the Ember app is running on?

@thegranddesign
Copy link
Author

@alexblom I'm in the process of getting you a test app together to try to help you help me. :)

@alexblom
Copy link
Member

@thegranddesign: it should be 4200.

Can you paste me the full command you are running for ember cdv:serve?

@alexblom
Copy link
Member

Following up - is this issue still active?

@zxcware
Copy link

zxcware commented Jul 14, 2016

yes, I didn't get the time. Could we discuss on the weekend?
On Wed, Jul 13, 2016 at 7:08 PM Alex Blom notifications@github.com wrote:

Following up - is this issue still active?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/isleofcode/ember-cordova/issues/45#issuecomment-232537857,
or mute the thread
https://github.com/notifications/unsubscribe/ACPva0iUxrjN4Mhcz9w_iOstP3sCvnMMks5qVZongaJpZM4IubJT
.

@alexblom
Copy link
Member

It's actually going to be my birthday weekend, so taking this one not behind a screen. Generally around this coming week though.

@thegranddesign
Copy link
Author

@alexblom still active. I just got caught up with a ton of life stuffs.

Full command was in that video I sent you. I can't recall off the top of my head. I'm going to be digging back into this probably this weekend.

@thegranddesign
Copy link
Author

Actually all of the commands that I ran appear to be in the issue text above.

@alexblom
Copy link
Member

alexblom commented Aug 3, 2016

Serve has changed a lot since this issue anyway, so I'm going to close it. Upgrade to 0.2.0 and check the new docs: https://github.com/isleofcode/ember-cordova/blob/master/docs/livereload.md

Feel free to re-open if you still have troubles.

@alexblom alexblom closed this as completed Aug 3, 2016
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