Closed vijeth-ag closed 6 years ago
@vijeth-ag Hello, did you manage to solve it? I'm getting these errors
D/CHCP: Failed to read chcp.json from assets java.io.FileNotFoundException: www/chcp.json ....
D/CHCP: Failed to convert json string into application config com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input at [Source: ; line: 1, column: 1]
...
@betocantu93 Make sure the content_url in chcp.json access url is http/https is correct based on the server. that was the case with me.
Integrating Hot Code Push with Ionic v1. Works fine with www folder hosted in any(Local/Remote) with pythonSimpleHTTPServer i,e, chcp.json is accessible.
In production, the www folder is in Nginx environment. The chcp.json production url is accessible via browser directly, but within the app, the chcp.json doesnt seem to accessed well via the plugin. Error logs below
error log from > adb logcat below
More error log from adb logact
04-26 19:05:59.765 21350-21470/com.mobile.app D/CHCP: Failed to convert json string into application config com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input at [Source: ; line: 1, column: 1] at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3110) 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:29) at com.nordnetab.chcp.main.network.ApplicationConfigDownloader.createInstance(ApplicationConfigDownloader.java:15) at com.nordnetab.chcp.main.network.JsonDownloader.download(JsonDownloader.java:54) at com.nordnetab.chcp.main.network.ApplicationConfigDownloader.download(ApplicationConfigDownloader.java:15) at com.nordnetab.chcp.main.updater.UpdateLoaderWorker.downloadApplicationConfig(UpdateLoaderWorker.java:173) at com.nordnetab.chcp.main.updater.UpdateLoaderWorker.run(UpdateLoaderWorker.java:74) at com.nordnetab.chcp.main.updater.UpdatesLoader$1.run(UpdatesLoader.java:58) at java.lang.Thread.run(Thread.java:761)
My ionic info ` cli packages: (/usr/local/lib/node_modules)
global packages:
local packages:
System:
Environment Variables:
Misc:
`
Other cordova plugins used in the project:
cordova-custom-config 3.2.0 "cordova-custom-config" cordova-hot-code-push-plugin 1.5.3 "Hot Code Push Plugin" cordova-plugin-actionsheet 2.2.2 "ActionSheet" cordova-plugin-android-permissions 1.0.0 "Permissions" cordova-plugin-background-mode 0.6.5 "BackgroundMode" cordova-plugin-camera 2.4.1 "Camera" cordova-plugin-camera-preview 0.9.0 "cordova-plugin-camera-preview" cordova-plugin-compat 1.2.0 "Compat" cordova-plugin-console 1.0.3 "Console" cordova-plugin-device 1.1.7 "Device" cordova-plugin-file 4.2.0 "File" cordova-plugin-file-transfer 1.5.1 "File Transfer" cordova-plugin-geolocation 2.4.3 "Geolocation" cordova-plugin-image-picker 1.1.1 "ImagePicker" cordova-plugin-inappbrowser 1.6.1 "InAppBrowser" cordova-plugin-ionic-webview 1.2.0 "cordova-plugin-ionic-webview" cordova-plugin-media 2.3.0 "Media" cordova-plugin-network-information 1.2.1 "Network Information" cordova-plugin-request-location-accuracy 2.1.1 "Request Location Accuracy" cordova-plugin-splashscreen 3.2.2 "Splashscreen" cordova-plugin-statusbar 2.1.3 "StatusBar" cordova-plugin-vibration 2.1.1 "Vibration" cordova-plugin-whitelist 1.2.2 "Whitelist" cordova.plugins.diagnostic 3.9.2 "Diagnostic" ionic-plugin-keyboard 2.2.0 "Keyboard"
-- Thanks.