-
Notifications
You must be signed in to change notification settings - Fork 467
Does not work with cordova-plugin-wkwebview since 1.2.0 #127
Comments
Also note that https://github.com/Telerik-Verified-Plugins/WKWebView/ does not support cordova-ios > 4, so I'm currently using 3.9.1. For now, I reverted to 1.1.2 of CHCP which seems to not have this issue. |
Actually, I just tried 1.2.0 again and it worked. I kept installing newer versions until I found the one where this was broken. 1.2.1 works, but 1.2.2 doesn't. |
Yes, there are benefits from the new approach. You can look into documentation.
That's an interesting observation. Difference between these versions should not be big, just some bug fixes. Maybe I "fixed" something else as well... |
Actually I think there may have been some caching going on as much as I tried to avoid it. 1.2.0 on the physical device didn't work, but in the simulator it did. I think it was still using the old version somehow as much as I tried to avoid that. I reverted to 1.1.2 for now. |
Not sure I see the part that refers to this in the documentation. The new separate folders per release feature is great, but it doesn't refer to the From what I can see while debugging the plugin attempts to set the If it simply updated It may be a bug in the cordova webserver plugin, I'm not denying that, but since the previous method worked, I'm just wondering why it was changed. Edit:
Found just this, no explanation though as to why that is a better approach. :) |
Sorry for the late reply.
Yeah, but if you continue reading:
So, the main idea behind "new release -> new folder" approach is that it makes plugin more stable and less chances of breaking the app, since releases are now more independent. I think soon chcp will support cordova-plugin-wkwebview-engine plugin. Then will try to make it work with https://github.com/Telerik-Verified-Plugins/WKWebView/. |
I think you are misunderstanding what I mean. The problem is not with the different release folders but with the way it sets the starting wwwfolder on subsequent app starts. The older versions would redirect to a deep folder via javascript, the new versions try to set it from the backend and simply load /index.html |
No, it was always reloading index page from the native side. Even in older versions.
If I remember correctly, I had to switch to setting Can double-check it later. But I suspect, that fix for telerik plugin will be similar to cordova-plugin-wkwebview-engine: set for the local server www folder as |
That is it then. With startPage it used to work. |
So for Telerik WKWebview users is this a better approach to revert to 1.1.2 or 1.2.0? Is there any breaking change in later releases? |
I have reverted to 1.1.2 despite using custom load options file seems to be xcompatible with 1.3. |
@barocsi You can look into changelog or in closed milestones to see, what has changed since v1.1.2. I can try to make a branch, that might fix this issue, but it will work only if index page doesn't contain |
@andreialecu If you want - you can try out current version with telerik wkwebview. To do that - use the following command to add plugin:
It should work, if your index page does not have |
The branch works. Thanks! |
Glad to hear that :) |
is this merged in the new release? |
@barocsi Branch |
Merged master into |
@nikDemyankov Thanks for creating the I'm wonder, could you merge the latest master into that branch again? In particular, |
@kristfal sure, will do :) |
@kristfal merged and pushed the changes. Please, check it out. Should work, but I could have miss something... |
👋 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 haven't updated in a while, and just tried doing so and ran into a problem.
There is some incompatibility in the way #47 was implemented which makes the web server used by the wkwebview plugin not be able to serve the files from "external storage".
The initial startup goes fine, but on the second start of the app it hangs on the splash screen and nothing loads. I connected Safari to the device and can see that the request for
index.html
returns a 404 from wkwebview's webserver.The difference is that pre 1.2.0 the webview was being set to an url like
http://localhost:12334/Application%20Support/..../www/index.html
while the new version attempts to override thewwwFolder
and simply set the location to/index.html
.Would it be feasible to revert to the old behavior? Is there any benefit from the new one?
The text was updated successfully, but these errors were encountered: