Comments (8)
I tested Safari on IOS and got the same error.
from pouchdb-load.
I tested Safari on Windows and also get the same error.
I confirmed that sometimes replication works fine for the same databases that other times failed.
Besides, I saw another error I'm not sure if it is related:
ReferenceError: Can't find variable: WebKitBlobBuilder
This is probably triggered because we have some docs with blob attachements.
from pouchdb-load.
I found out that the error is occurring because of the blob attachments.
When I disable the replication of this particular DB containing blob attachments, everything works fine.
Any workaround to use blobs on IOS?
from pouchdb-load.
The exception that is thrown by new Blob(parts, properties) in createBlob() is:
"'[object BlobConstructor]' is not a constructor (evaluating 'new Blob(parts, properties)')"
from pouchdb-load.
:-(
Disabling the replication of the DB with the blob attachment fixed the problem on Safary for Windows (which was throwing the same error as on IOS)...but I'm still getting the error on PhoneGap for IOS and Safary for IOS.
So, we have two issues here:
-
Replication of blobs are failing on Safary for Windows and Safary for IOS and PhoneGap for IOS. This causes "Database encountered an unknown error" for this and subsequent replications.
When disabling the replication of the DB with blobs, replication works at least on Safary for Windows, but NOT on Safary for IOS and PhoneGap for IOS. -
Safary for IOS and PhoneGap for IOS causes "Database encountered an unknown error", even when not replicating blobs.
from pouchdb-load.
Turned out that the app was doing concurrent replication (pulls) of the same database. This was causing the error on Safari and IOS, but not on Android.
I would suggest to detect this situation on Pouch's side (even when it's the users fault, it will save anyone's time and avoid users reporting bugs caused by race conditions ).
To solve, I added a flag on the pouch database object to prevent replicating twice while another replication is going on for the same DB.
There are many other reported issues regarding the "Database encountered an unknown error" message which could be related to this problem.
from pouchdb-load.
BTW, blobs are still generating an error when they are pulled on Safaty for Windows, Safari for IOS and PhoneGap for IOS (works fine on Android and Chrome).
But they are pushed correctly on PhoneGap for IOS.
from pouchdb-load.
Hmm, I'm not really understanding what's going on here. Do you have a reproducible test case?
I do know that there's a bug in iOS Safari WebView due to file://
URLs. Maybe you're hitting that: #11
from pouchdb-load.
Related Issues (20)
- Error loading dump with filter view HOT 3
- Does pouchdb-load use replication logic or does it overwrite existing docs HOT 1
- how to load json file in pouchdb HOT 3
- Large size using browserify HOT 3
- Load/Restoring dump via web worker HOT 1
- Loading from dump is become very slow with pouchdb v6.0.7 as compared to v5.4.5 HOT 1
- Using proxy option in offline mode results in error HOT 2
- Replication doesn't receive any change if DB is loaded with proxy option HOT 1
- Is it possible to load a database with indexes ? HOT 3
- Strings larger than about 800 docs throw a JSON.parse() error HOT 1
- TypeError: readableStream.pipe is not a function HOT 2
- npm ERR! Unexpected end of input at 1:16280
- Expected load times
- running PouchDB.load, TypeError: object is not a function TypeError: object is not a function at PouchDB
- Can this load a databases with attachments? HOT 1
- pouchdb database dumps and portability
- More of a question than a bug, regarding the proxy and not re-downloading the file HOT 1
- Incomplete download
- cli command to load data into a database
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pouchdb-load.