-
Notifications
You must be signed in to change notification settings - Fork 466
Hash doesn't match for certain files. #96
Comments
Do you use the chcp cli tool to generate the manifest? I've haven't run into this issue using it, but I did using the gulp implementation mentioned here: #54. Somehow it generates different MD5 hashes. |
Yes, I'm using the chcp cli tool. It just happened again on my config.js |
@dwhitmore Are you getting this error for iOS only, or also for Android? Have you tried to regenerate hashes when you hit this issue without updating files? Then compare old and new manifest files. And then run mobile app again, to check if it will load files from the server. Don't have a windows machine at the moment to test that. But it's either wrong hashes in the manifest file on the server, or wrong hash generation on one of the sides (mobile or web). Just trying to understand on which one... Also, if it works fine for android, but breaks for iOS - that will narrow it down. I was capturing that problem, when I used local development add-on and was updating some file very quickly in a short period of time. That lead to the situation, when app loaded old manifest file, but downloaded file, that was updated after the manifest generation. But if you are not doing it like that - then this isn't your case. |
It seems to be wrong hash generation on the mobile side when it checks the downloaded files validity. I'm only using IOS at the moment, haven't looked at android. Also, can't reproduce on a steady basis, just seemed to have narrowed it down to generated files for some reason. But I have seen this in the past when comparing Java MD5 hashs vs system MD5 hashes. |
How I love those kind of bugs... So it's objective-c hash vs windows hash. Thanks for the info, will see what I can do with that... |
@dwhitmore since it is on windows, check to see if you are generating hashes when files have CRLF line endings. Git is configured by default to translate line endings. |
@davidovich Not using Git but I had that same feeling about the css preprocessor. However, by opening up the generated style.css and adding some spaces and saving I would still get the same result. That just confused me more. |
@dwhitmore I still feel this is a line ending issue. Can your editor show the whitespace in your file? You can also use a diff program to show the whitespace difference. |
It doesn't even have to be an error locally or on mobile itself. Interestingly I haven't had that issue on another project (ionic 1) and same ftp, but on my current one (ionic 2, Typescript). Just to get that out there as it can be a very hard error to spot, you don't run into ftp issues that often. |
@ventr1x that's an interesting note, thanks for sharing :) Really tricky to spot, indeed. |
👋 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. |
I've done well over 100 updates while testing and every once in a while I'll get this error. Seems to only happen when I have a new css file updated, which doesn't make sense. I'm generating the manifest on a windows machine and confirmed the hashs are the same locally and on the server. I was starting to wonder if the code generates a different hash than the machine as I've seen that in the past with Java. Has anyone else come across this?
The text was updated successfully, but these errors were encountered: