-
Notifications
You must be signed in to change notification settings - Fork 22
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
Reload on Resume doesn't work #10
Comments
Hi, your code looks a little different than master – are you on https://github.com/jamielob/reloader/blob/master/reloader.js#L98-L112 |
Sorry, I copied the one from v2, I'm actually using v1.2.1, from the master and the code look like this
|
Not sure if that's the error, but what's happening now is that I'm running my app, I update some code, I put the app into the background, wait 30 sec ( I set the idleCutoff time to 30 sec just for testing purposes) and when I resume the app, it never hides the splash screen. So I started debugging it, and that's when I saw that as the possible error |
the
after step 2, do you wait for the update to download before doing 3, or do 3 at the same time as 2? what's your |
When I debug it,
|
Ok, with that configuration: After 2, wait until If that doesn't happen, not sure why. You can try debugging starting at https://github.com/jamielob/reloader/blob/master/reloader.js#L195 and making sure it gets to this line: https://github.com/jamielob/reloader/blob/master/reloader.js#L150 |
Ok I did that and it still does the same thing, it shoes the splash screen, and never goes away This is being called https://github.com/jamielob/reloader/blob/master/reloader.js#L195 but then here, |
I'm also getting this error message sometimes Error: Skipping downloading blacklisted version |
Ok I managed to get this line called https://github.com/jamielob/reloader/blob/master/reloader.js#L150 But still the same issue, when the Any ideas? |
Skipping blacklisted error usually happens when there's a JS error in the Safari remote console. Assuming no JS errors, then the https://github.com/jamielob/reloader/blob/master/reloader.js#L114 Which should at some point call |
Ok so that's the issue then, after |
It happens when the JS file is run, which should be each page load. https://github.com/jamielob/reloader/blob/master/reloader.js#L188 Is the page definitely reloading? |
ok I found why, it might be related to this issue meteor/cordova-plugin-meteor-webapp#12 If I use this instead, it does work
|
Doing I might have to fork the repo and replace that, or do you think we can include that fix on the main repo? |
It looked from the issue that it was only in cases in which that non-root path had an error? For people who don't have this issue, I'd like to keep this working: user on We're using replace because of this: https://github.com/meteor/cordova-plugin-meteor-webapp#switching-to-a-real-embedded-web-server-ios-only |
Doing When I inspect the
I don't see any error there |
Sorry, this was relevant to
And this was relevant to
|
So of what I've been testing so far, it looks like the replace doesn't like any url with parameters. So because I have a cvdToken on my url, the replace won't do anything. So if I instead of doing window.location.replace("http://localhost:12024/?cdvToken=E462B92A-4B1E-4988-A598-BF9438537A14-454-0000002EC83F9D69#!home"); I do window.location.replace("http://localhost:12024/#!home"); That works, but of course, the user lose the authentication and its logged out Did you have any errors before, with url paths that has parameters? |
Ok one more thing, what I just noticed is that the replace is actually working, it does switch the location, but it does not fire the onPageLoad event, because it does not reload the page. If I replace the url with a different route, the location it does change, but does not reload. I'm using Iron Router for the routing, could that be something? |
I haven't, no.
Looks like |
You mean replacing the |
Hi @lorensr, I was checking at the [https://github.com/meteor/meteor/blob/devel/packages/reload/reload.js#L219] |
Added that, thanks tafelito 😄 |
Hi guys, I was trying to use this package for a production ready app I've been working and I can get this package to work. I debugged it and I realize that it looks like there is an error, for e.g when you do use this within the Tracker or a SetTimeout, beacuse this is a reference to the thread running inside the Tracker. Am I missing something here? Because this.updateAvailable() its always undefinded
Thank you!
The text was updated successfully, but these errors were encountered: