Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unexpected token in JSON at position 51" when running inside packaged Electron app #8

Open
linusthiel opened this issue Jan 25, 2017 · 3 comments

Comments

@linusthiel
Copy link

We are using PouchDB-browser inside an Electron packaged app.

  • We package it for Windows, as an exe, using electron-packager.
  • We have two pouch dbs, one synced with a couch server and one local (just mapping ids to yet another local db)
  • When running it with electron . i.e. not packaged in an exe, everything works fine
  • When running it as the packaged Windows exe, the local (mapping) db throws "Unexpected token in JSON at position 51", i.e. is sending some garbage data when we do db.get(id)
  • Both running on the same system
  • The app is using the same dbs in "dev-mode" as in packaged mode
  • We paused the app in the debugger, and ran db.allDocs which worked fine
  • We detroyed the db and it is still throwing the same error on db.get, so it seems to be (at least) the 404 error having a problem.
@linusthiel
Copy link
Author

We tried to reconfigure it to use different databases. It still gives the same error in the packaged Electron, when we do db.get(id).

Electron version 1.4.15 win32-ia32.
PouchDB-browser version 6.1.1
Windows 10

@nolanlawson
Copy link
Owner

So this only happens on Windows, but it happens in multiple adapters - IndexedDB, WebSQL, etc.? I'm wondering if it's a bug in Chromium for Windows.

Can you provide a small test case to reproduce, e.g. a sample project?

@linusthiel
Copy link
Author

linusthiel commented Jan 25, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants