Closed brucejo75 closed 5 years ago
Another observation, my workaround is a little more complicated.
Workaround: While the app is running and connected to the server, update the server with new client code.
If I:
Result: code does not update on the client app.
Going to try testing with a full build, instead of a dev run.
Do I understand it correctly that this issue is occurring for you on local development? Would be good to know if you can reproduce it with a PROD built server and client connecting to that as well.
I also see the issue with a debug
build running on my production server. I have not built a production version.
I have not had time to investigate further and I am building a workaround for my product that seems to work well enough.
After I get this next release out, I will try to isolate the issue more. I am suspicious of ordova-background-geolocation-lt@3.0.0
as that is the newest plugin I am using.
@brucejo75 Do I understand you right that you've made changes to your Cordova plugins on the server after the moment you initially built? If so the behaviour can be explained as HCP does not work when changes to your Cordova plugins are made. Don't think there is a workaround for that.
https://guide.meteor.com/mobile.html#updating-production-apps
I am aware that changing the cordova plugins requires a rebuild of the client side app (or manipulation of the compatibility version).
To be clear - No, I am not changing the plugins between builds.
My workaround is to see if the client side app version is the same as the build version of the app. If they are the same I know that the latest client has not been HCP'ed to my app. So I wait 60 seconds and the do a location.reload
. After 2-4 reloads, HCP completes. That seems to be working for me for now, until I can dig into it further.
PS: my build processes are such that my server version will always be a newer version than the app, so I always do a HCP first thing. (It is an issue I intend to fix, but for now I can take advantage of it)
D'oh. I figured out the issue
I had a number of .apk
s sitting in my public directory. So Meteor was timing out downloading the .apk
s.
Moral of the story? Keep your public directory clean. Or at least minimized.
I would recommend that instead of outputting: Could not create download directory
it might be better to display the size of the downloads that Meteor is dealing with. And then warn the user that the size should be minimized for a number of good reasons.
Fixed by cleaning out public directory.
I started seeing this error recently with Meteor v1.8.1. I also upgraded / added
cordova-background-geolocation-lt@3.0.0
at this point.Note: I am still investigating to make sure my app is not causing this... Thought I would get the issue entered, on the hope that someone else had this happen.
Environment
Meteor: v1.8.1 Android: v8.1.0 Cordova: 7.1.4
plugins:
Repro
Result:
Initial HCP appears to not work. The app seems to work fine.
Workaround
It seems that shutting down the app and restarting will stop displaying the error and HCP works again.