PouchDB database will not sync with CouchDB database in webview

Issue #14064930 • Unassigned

Details

Author
Mike I.
Created
Oct 3, 2017
Privacy
This issue is public.
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Reproducing the failure is very straightforward. Here is what you need:

  1. A Windows 10 system running version 1703 of the operating system. Doesn’t seem to matter whether it is the Home or Professional version.
  2. A native UWP in Windows 10 that has a webview within it.
  3. Use JavaScript to define a PouchDB database within the webview.
  4. Setup a CouchDB database on a server that can be accessed by the webview within the native app.
  5. Use JavaScript within the webview to invoke replication between the local PouchDB database and the CouchDB database on the server. Direction of the replication does not matter. The replication will fail no matter the direction and it fails every time without exception.

If you run this same scenario on Windows 10 version 1607, it will work just fine. I am betting this means nobody anywhere can replicate between PouchDB and CouchDB from within any webview on Windows 10 version 1703. This will work from the Edge Browser on Windows 10. It WILL NOT run correctly from within a Windows 10 native UWP app inside of a WebView.

Here is a little more information:
The return message we get from the error when the replication fails is "getCheckpoint rejected with". Don’t have much more info than that, as it is difficult to get any info out of the WebView when running it inside our app on a real device.

There are no proxies.

For reproducing it, I have provided some HTML and JavaScript code, and CouchDB database access. I provided this directly to a Microsoft employee as I do not wish to share the code or database access here. I will inform him of the issue number once I submit this. If you look at the JavaScript and HTML you will see it is very simple. Run this web app inside a WebView, and you can let it try replicate to a test database we have on the web. It will most certainly fail.

We are running CouchDB 1.6.1

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Nolan L.”

      Changed Status to “Confirmed”

      Changed Status from “Confirmed”

    • I have confirmed that this error is still present in Version 1709 (Creators Update).

    • This appears fixed in 1709 16299.64. I created a basic Windows Web App with the supplied repro HTML/CSS/JS, rand it, and got:

      We are attempting to access the database on the server, so please wait a moment.

      We have successfully accessed the server database and synchronized from it!

      The number of records in the database is 7.

      The following is a list of the records currently in the database:

      alpha

      beta

      delta

      gamma

      iota

      kappa

      lambda

    • Microsoft Edge Team

      Changed Status to “Not reproducible”

    • Changed Status from “Not reproducible”

    • I have confirmed that I still see the problem with Windows 1709 16299.64. Mine does not complete successfully. I imagine the difference is that I am running the test in the WebView of a native UWP app. We have always been able to run this successfully in the native Edge browser, but it will not run within a WebView in a native UWP app. Please confirm which environment you tested in.

      I can provide you a native Windows App that contains the test web app in the WebView, but that configuration is more complex and would likely require a phone conversation. Please confirm if you would like me to do this.

    • Yes, I used a Windows app. In Visual Studio 2017 I did New Project -> Blank App - Web Context, and then copied the HTML/CSS/JS over and ran it from VS. Is there some other way to reproduce the issue?

    • I also tried building an appx package and still cannot reproduce. Is this an issue with stale app data, i.e. if you clear out your local app data and try again with a clean build, are you still able to repro?

    You need to sign in to your Microsoft account to add a comment.

    Sign in