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

PhoneGap Developer not updating changes (iPhone) #291

Closed
Tuuuukka opened this issue May 28, 2015 · 14 comments
Closed

PhoneGap Developer not updating changes (iPhone) #291

Tuuuukka opened this issue May 28, 2015 · 14 comments
Labels

Comments

@Tuuuukka
Copy link

So my problem is this:

  1. I have a test app I created with phonegap create test-app
  2. I started mirroring the app with phonegap serve
  3. On my iPhone I launch the Developer App and enter the IP and everything is nice and I see the app just fine
  4. I make random changes to the index-file and save it, but I can't see the changes on my iPhone (with autoreload or four-finger-tap)

Quitting the Developer App and launching it again does not help, the content of the test app stays the same and no changes are visible. But if I uninstall the Developer App completely on my phone, install it again and then connect to the server again, the test app is updated and the changes are visible.

The changes also happen automatically on browsers etc. but not on the Developer App.

@mwbrooks
Copy link
Collaborator

@Tuuuukka,

Thanks a lot for the detail!

Before I dive into random suggestions, have you updated to the latest PhoneGap Developer App and the latest PhoneGap CLI?

@mwbrooks mwbrooks added the bug label May 28, 2015
@Tuuuukka
Copy link
Author

@mwbrooks,

Thanks for the reply!

At least phonegap -v gives me 5.0.0-0.28.0. And I'm running the server on OSX Mavericks and using iPhone5, if that matters.

Also I just noticed that if I make changes to a file and save it while using the Developer App, the "connecting to device" blinks for a second and then changes back to "device ready". So the connection seems to be ok, the changes just don't show without re-installing the app.

@mwbrooks
Copy link
Collaborator

Thanks for the info @Tuuuukka. The fact that is does auto-reload ("connecting to device" flickers, indicating a refresh) but it does not update the app's content is interesting.

I'm not sure if it's related, but #292 is having a different issue on an iPhone 5. I'm looking around for an iPhone 5 device to test on, so I'll report back on what I find.

@Tuuuukka
Copy link
Author

Tuuuukka commented Jun 1, 2015

Thanks again @mwbrooks, I will check that one out.

Today I set up a new server on Ubuntu (with a new IP address of course) and connected to it from my iPhone. It actually showed the app from the Mac server which wasn't even running at the time. And again, after re-installing the Developer App and reconnecting to the (Ubuntu) server, the App was refreshed just fine.

@PierBover
Copy link

I'm having a similar issue.

For some reason I save a file, and the CLI displays the message "file changed" but the app does not refresh. Sometimes even when tapping the app with 4 fingers the app refreshes but it's still using the old files.

I'm using latest version of the CLI, and the iOS app.

I've given up on using the app for development except for the ocasional device testing.

@mwbrooks
Copy link
Collaborator

mwbrooks commented Jun 5, 2015

Hi @PierBover thanks for the info. It's actually very useful to know that the file change was detected by the CLI. What operating system is your computer running?

@PierBover
Copy link

I'm on OSX 10.9

@PierBover
Copy link

BTW, this behaviour is not consistent but I haven't been able to detect what triggers it. It seems almost random.

@timkim
Copy link
Contributor

timkim commented Jun 18, 2015

Hi @Tuuuukka and @PierBover

We've made some updates to the app for the reload issue. Please update your app and see if that works for you.

@mwbrooks
Copy link
Collaborator

Closing since we haven't seen very much activity on this issue. Feel free to reopen.

@tylermakin
Copy link

@mwbrooks This may be caused by a bug on the HTML or JS being tested. I a have a bug in my index file which also causes the PhoneGap Developer app to stop updating. When I load a functional index.html file I can see updates, but if I copy and paste the valid index file with the buggy one, the updates stop working.

Just like @PierBover I am seeing the changes picked up by the CLI but not on my phone.

@mwbrooks
Copy link
Collaborator

mwbrooks commented Jan 5, 2017

@tylermakin that makes sense. If an error causes the page to fail to load, then the update/refresh logic would also fail to load. I've created a separate issue to discuss improving this and link it back here: #474 If possible, could you provide a small example that reproduces the error?

@tylermakin
Copy link

@mwbrooks I do not recall the specific bug that caused my script to stop but anything that prevents a page from loading properly should do the trick.

A simple bug that should cause this issue is calling an undefined variable:

console.log('This will appear on console');
var b = a;
console.log('This will not appear in console');

Adding this to your JavaScript should throw an error and stop any further JS from loading, which seems to be what is causing the PhoneGap Developer app from refreshing.

@mwbrooks
Copy link
Collaborator

mwbrooks commented Jan 9, 2017

Thanks @tylermakin and thanks for quoting it in #474 :)

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

No branches or pull requests

5 participants