Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

works for local server, but doesn't work for remote server #348

Closed
wancy86 opened this issue Apr 23, 2018 · 2 comments
Closed

works for local server, but doesn't work for remote server #348

wancy86 opened this issue Apr 23, 2018 · 2 comments

Comments

@wancy86
Copy link

wancy86 commented Apr 23, 2018

Problem

firt i make it work for local server[192.168.1.110], i change the login.html in www and run cordova-hcp build command, content updated when i restart the app on my android phone.
it works with local server http://192.168.1.110

Steps to reproduce

i jsut think it is time to make it work with production server,
so i did:

  1. replaced the url in cordova-hcp.json, .chcpenv and config.xml
    from http://192.168.1.110 to https://www.xxxx.com/android/www_xst (able to access the url in browser)
  2. run cordova-hcp build
  3. ionic cordova build android
  4. install to my android phone
  5. change something in www\login.html
  6. run cordova-hcp build
  7. copy the www to remote server
  8. restart my app twice
  9. app started properly but content not updated from the remote server
System info

cli packages: (D:\Program Files\nodejs\node_global\node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 7.1.0
Gulp CLI              : CLI version 3.9.1 Local version 3.9.1

local packages:

Cordova Platforms : android 6.3.0
Ionic Framework   : ionic1 1.3.4

System:

Android SDK Tools : 25.2.5
Node              : v8.8.1
npm               : 5.4.2
OS                : Windows 10

Environment Variables:

ANDROID_HOME : D:\Android\android-sdk\

Misc:

backend : pro

plugins using:
com.telerik.plugins.nativepagetransitions 0.6.5 "Native Page Transitions"
cordova-hot-code-push-plugin 1.5.3 "Hot Code Push Plugin"
cordova-plugin-camera 3.0.0 "Camera"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-crosswalk-webview 2.3.0 "Crosswalk WebView Engine"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-file 5.0.0 "File"
cordova-plugin-file-opener2 2.0.19 "File Opener2"
cordova-plugin-file-transfer 1.7.0 "File Transfer"
cordova-plugin-inappbrowser 2.0.2 "InAppBrowser"
cordova-plugin-inapppurchase 1.1.0 "In App Purchase"
cordova-plugin-jcore 1.1.11 "JCore"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-screen-orientation 2.0.2 "Screen Orientation"
cordova-plugin-screensize 1.3.1 "screensize"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.1 "StatusBar"
cordova-plugin-wechat 2.1.0 "Wechat"
cordova-plugin-whitelist 1.3.1 "Whitelist"
es6-promise-plugin 4.1.0 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"
jpush-phonegap-plugin 3.2.13 "JPush"

Error Log

04-24 22:26:07.290 895 1485 D CHCP : Loading file: https://www.zehuiwenhua.com/android/www_xst/views/login/login.html

04-24 22:26:07.309 895 1485 W System.err: java.io.IOException: File is corrupted: checksum 7d7b6931d1ed976d02c5b84e30a831af doesn't match hash aecb941b044a3b922e41d79d24c322a2 of the downloaded file

04-24 22:26:07.321 895 1485 W System.err: at com.nordnetab.chcp.main.network.FileDownloader.download(FileDownloader.java:92)

04-24 22:26:07.321 895 1485 W System.err: at com.nordnetab.chcp.main.network.FileDownloader.downloadFiles(FileDownloader.java:51)

04-24 22:26:07.321 895 1485 W System.err: at com.nordnetab.chcp.main.updater.UpdateLoaderWorker.downloadNewAndChangedFiles(UpdateLoaderWorker.java:222)

04-24 22:26:07.321 895 1485 W System.err: at com.nordnetab.chcp.main.updater.UpdateLoaderWorker.run(UpdateLoaderWorker.java:122)

04-24 22:26:07.321 895 1485 W System.err: at com.nordnetab.chcp.main.updater.UpdatesLoader$1.run(UpdatesLoader.java:58)

04-24 22:26:07.322 895 1485 W System.err: at java.lang.Thread.run(Thread.java:818)

04-24 22:26:07.324 895 1485 D CHCP : Failed to update

@wancy86
Copy link
Author

wancy86 commented Apr 25, 2018

problem solved.

caused by git autocrlf under windows.

add below to git config file:

C:\Users\Administrator.gitconfig

[core]
autocrlf = false
filemode = false
safecrlf = true

@nordnet-deprecation-bot
Copy link
Contributor

👋 Hi! Thank you for your interest in this repo.

😢 We are not using nordnet/cordova-hot-code-push 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 #371 for more information.

@nordnet nordnet locked and limited conversation to collaborators Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants