Welcome Guest Search | Active Topics | Sign In | Register

Service Worker Support Options
Vagabond
Posted: Wednesday, August 2, 2017 2:12:20 PM
Rank: Newbie
Groups: Member

Joined: 3/22/2017
Posts: 7
Hi Support

OS: Windows 8.1 and 10
Host: localhost with IIS
Framework: WPF
EO Version: 17.2.14

We have been upgrading one of our products and part of that process includes moving from CefSharp to EO Web Browser. Unfortunately, we have hit a snag which seems to be on the EO Web Browser end.

We have a Service Worker which is used to allow offline usage of our web content. The pages are hosted with localhost but make outside requests that we need cached with the worker for proper application functionality. These pages work in Google Chrome and Cef Sharp, but do not work as expected when running in EO.

I believe we have managed to isolate the problem (as it has reproduced, though because the requests are normally managed by a 3rd party library, I cannot confirm it's the exact same issue).

I have also sent a test project that will hopefully pinpoint the issue.

The test project only uses the dev console. On first execution you will receive the output of the file that was retrieved from the network. When you refresh, you will encounter errors because it attempted to load it from the cache. This is not the case in CefSharp or Chrome.

Thank you

Adam
eo_support
Posted: Wednesday, August 2, 2017 3:58:38 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,225
Hi,

We did receive your email however it appears that your email system have removed the attachment. You may want to rename the file extension from zip to something else and resend it.

Thanks!
eo_support
Posted: Thursday, August 3, 2017 11:32:42 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,225
Hi,

We have received the correct attachment this time and we are able to run your page. However we do not know how to tell whether it's functional or not. When we run the page with our TabbedBrowser sample application, it prints out a list of numbers on the Dev Console. We see the same numbers when we run the page in Chrome. Can you let us know how to determine whether the page is functioning correctly?

Thanks!
Vagabond
Posted: Thursday, August 3, 2017 11:36:07 AM
Rank: Newbie
Groups: Member

Joined: 3/22/2017
Posts: 7
After you see the numbers, you would want to refresh the page... on the refresh it should provide errors and warnings about not being able to access the file. The numbers should not be visible on the refresh.

The first load is always successful because it is going out to the network to grab the file. In Chrome, on refresh, it continues to work, but with the WPF EO Browser, on refresh it displays the issues.
eo_support
Posted: Thursday, August 3, 2017 2:41:58 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,225
Hi,

We are still not sure if we understand the problem. The only page we see that your code fetch is loading a page from cloudfront.net through JQuery. That page's cache control is set to "public,max-age=31536000", as a result, the page is cached and when you reload the main page, this page is acquired from cache (Reload(true) only force reload the main page, the extra resources loaded by your JavaScript follows the normal cache behavior). Both Chrome and EO.WebBrowser demonstrates the same behavior. We do not see the error message you mentioned.

Of course this is just the default cache behavior --- we are not sure whether you actually intend to use the cache API to override this behavior and if so, what is your intended behavior. If that's the case and you can specifically point out what you are trying to achieve and we will be happy to investigate further.

Thanks!
Vagabond
Posted: Tuesday, August 8, 2017 10:10:51 AM
Rank: Newbie
Groups: Member

Joined: 3/22/2017
Posts: 7
I had sent a sample project on Thursday or Friday that uses a bare-bones setup (straight from NuGet) that reproduces the issue... I could not get it to reproduce in the tabbed browser, and after many hours of comparing I couldn't find a difference that would allow it to work in the sample but not in a starting project.

If you could take a look and let me know what it is I'm missing, it would be greatly appreciated. I left more detailed notes in the email accompanying the project.

Thank you

Adam
eo_support
Posted: Tuesday, August 8, 2017 4:28:10 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,225
Hi,

Sorry about the delay. We are still working on this. We will reply your email (or here if no sensitive information) as soon as we have an update.

Thanks!
eo_support
Posted: Thursday, August 10, 2017 1:36:59 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,225
Hi,

We have looked into this. The root of the problem is in the version of Chromium browser engine we use has a bug related to certificate transparency. This causes the browser engine to fail to verify certain valid SSL certificate, the certificate cloudfront uses happen to trigger this problem. This causes the resource fail to load.

For a normal resource, the WebView class provides CertificateError event and you can handle this event to ignore the certificate error. However, for a resource loaded inside a service worker, it can not trigger the CertificateError event due to the nature of service worker being isolated from the page. This means there is no way to ignore this error in the current version. We do however looked into Chromium source code so we will be able to apply the same fix in our next build. As such this issue should be resolved in our next build.

Thanks!
Vagabond
Posted: Thursday, August 10, 2017 1:40:37 PM
Rank: Newbie
Groups: Member

Joined: 3/22/2017
Posts: 7
Wicked, thanks for the detailed diagnostic.

Do you have an estimated release date for the next build?

Thank you very much

Adam
eo_support
Posted: Thursday, August 10, 2017 2:34:54 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,225
Hi,

It should be out either during this weekend or early next week.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.