Comments (12)
And I am on windows
from cordova-hot-code-push-cli.
According to nordnet/cordova-hot-code-push-local-dev-addon#5,
I finally got the "a user connected" in the command line, but it still cant refresh automatically in the emulator.
from cordova-hot-code-push-cli.
And my chcp.json is still xxx.ngrok.com
from cordova-hot-code-push-cli.
As I understand, you have done everything, as described in tutorial.
- Make sure, that
https://xxx.ngrok.com/chcp.json
is accessible from your emulator. - Make sure, that
https://xxx.ngrok.com/chcp.manifest
is accessible from your emulator. - Make sure, that paths in
chcp.manifest
are relative to thewww
folder and doesn't hold\
. There might be a problem with that on windows. - Open your project in IDE (probably this is Android - then use Android Studio), and run it from there. Look into console for any messages from the plugin. It should log errors/success events.
from cordova-hot-code-push-cli.
Modify the chcp.json and it will change to ngrok.com at last
from cordova-hot-code-push-cli.
@nikDemyankov ngrok.com is blocked. So I change ngrok.com to my local IP in afterPrepareHook.js. But the chcp.json is still ngrok.com.
from cordova-hot-code-push-cli.
If ngrok is blocked - you can use some other local server, that will serve your www
files, as mentioned in nordnet/cordova-hot-code-push-local-dev-addon#5.
In that case you can still use local development add-on to automatically trigger page reload. Just make sure, that config-file
url is set to the correct address in your platform-specific config.xml
(probably this is what you do in afterPrepareHook.js). Also, create cordova-hcp.json
file in the root folder of your Cordova project, and define there:
{
"content_url": "http://<YOUR_LOCAL_SERVER_ADDRESS>/"
}
And after each change you do - execute cordova-hcp build
to refresh content of the config files in www
.
from cordova-hot-code-push-cli.
I am sorry. I read your comment over and over again, but I still don't know clearly what the local server can help? I created cordova-hcp.json and I execute cordova-hcp build after each change in www. And the content_url is my local IP address in chcp.json now. Can u tell me how the local server do to www files. Thanks.
from cordova-hot-code-push-cli.
Have you checked all, what is described in #45 (comment) ?
You can get update logs from Android Studio. Just launch Android Studio, click Open an existing Android Studio project
and select E:\work\cordova\demo\platforms\android
. Then from it launch the app on the emulator/device and look into the logs, displayed in the studio. There you should see logs with tag CHCP
. If update has failed for some reason - you should see it in there.
from cordova-hot-code-push-cli.
@nikDemyankov About this I didn't use android studio before, but finally I got this error. It's a parse error.
03-03 21:05:27.643 2912-3022/io.cordova.hellocordova D/CHCP﹕ New Release is available
03-03 21:05:27.660 2912-3023/io.cordova.hellocordova D/CHCP﹕ Starting loader worker
03-03 21:05:27.684 2912-3023/io.cordova.hellocordova D/CHCP﹕ Failed to convert json string into application config
com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
at [Source:
Cordova App Loader
sssssssssssssss
; line: 1, column: 2]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1419)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:508)
at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:437)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:1462)
at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:683)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3105)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3051)
at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:1833)
at com.nordnetab.chcp.main.config.ApplicationConfig.fromJson(ApplicationConfig.java:48)
at com.nordnetab.chcp.main.network.ApplicationConfigDownloader.createInstance(ApplicationConfigDownloader.java:26)
at com.nordnetab.chcp.main.network.ApplicationConfigDownloader.createInstance(ApplicationConfigDownloader.java:13)
at com.nordnetab.chcp.main.network.JsonDownloader.download(JsonDownloader.java:50)
at com.nordnetab.chcp.main.network.ApplicationConfigDownloader.download(ApplicationConfigDownloader.java:13)
at com.nordnetab.chcp.main.updater.UpdateLoaderWorker.downloadApplicationConfig(UpdateLoaderWorker.java:165)
at com.nordnetab.chcp.main.updater.UpdateLoaderWorker.run(UpdateLoaderWorker.java:75)
at com.nordnetab.chcp.main.updater.UpdatesLoader$1.run(UpdatesLoader.java:61)
at java.lang.Thread.run(Thread.java:818)
03-03 21:05:27.684 2912-3023/io.cordova.hellocordova D/CHCP﹕ Failed to update
from cordova-hot-code-push-cli.
Failed to convert json string into application config
com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
This means, that chcp.json
is some html page, not a json config. Most likely, it's just not found on the server. That's why no update is coming.
So you need to make sure, that emulator can reach chcp.json
. Open YOUR_PROJECT_DIR/platforms/android/res/xml/config.xml
and check, what is set as config-file
url. Then on the emulator open browser, and try to open that url. It should be a json config.
But as you have read in nordnet/cordova-hot-code-push-local-dev-addon#5 - other developer also tried to use ip as a server address, but eventually switched to some simple server, written on python. So, maybe, if ngrok is blocked for you and emulator can't reach server by ip - this is what you should try to do.
from cordova-hot-code-push-cli.
👋 Hi! Thank you for your interest in this repo.
😢 We are not using nordnet/cordova-hot-code-push-cli anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork.
🔒 This will now be closed & locked.
ℹ️ Please see #79 for more information.
from cordova-hot-code-push-cli.
Related Issues (20)
- cordova-hot-code-push not deploying HOT 4
- Allow absolute URL for www_directory HOT 2
- Use chcpbuild.options when running "cordova-hcp build" HOT 1
- issue in SWIFT_VERSION HOT 2
- install cordova-hot-code-push-cli bring error HOT 7
- cordova-hcp should be able to build and deploy for dev/prod HOT 1
- Add optional logging for server (requests for assets as clients fetch updates) HOT 2
- document env.version HOT 3
- release timestamp should only be updated if manifest did change HOT 2
- cordova-hcp build error HOT 3
- Unable to know if the update has gone well or not HOT 2
- License? HOT 1
- Could you tell me where the new edition is? HOT 2
- questions about Update method HOT 1
- Blank screen after update/install on released(signed) apk version HOT 1
- there is an error while install cordova-hot-code-push-cli ----Cannot find module 'async' HOT 1
- Node version > 5.1.0 HOT 2
- When attempting 'npm install -g cordova-hot-code-push-cli' HOT 4
- TODO: Should print usage instructions. HOT 2
- PSA: Deprecation notice 2018-09-30
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-hot-code-push-cli.