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

HTML5 demo not working #23

Open
fhintsch opened this issue Nov 12, 2019 · 1 comment
Open

HTML5 demo not working #23

fhintsch opened this issue Nov 12, 2019 · 1 comment

Comments

@fhintsch
Copy link

I tried the demo HTML5/SQLiteSyncDEMO HTML+jQuery/index.htm on MacOS 10.14.6 with Safari and Firefox and Chrome and on iPhone with MobileSafari. The results are disappointing:

  • Safari, Firefox and MobileSafari return an error on window.openDatabase (index.htm:130)
  • Chrome can cope with window.openDatabase (index.htm:130), but:
    a) The test() function (index.htm:104) yields a 404 error
    b) Reinitialize() button gives
Starting synchronization

Connecting to server...

Connected to server...

Creating object 00001 MergeDelete drop...
Creating object 00002 MergeDelete create...
Creating object 00003 MergeIdentity drop...
Creating object 00004 MergeIdentity...
Creating object 00005 MergeIdentity_Index...
Creating object 00006 Documents drop...
Creating object 00007 Documents...
Creating object 00008 Documents_MergeInsert...
Creating object 00009 Documents_MergeUpdate...
Creating object 00010 Documents_MergeDelete...
Creating object 00011 _Documents_PRIMARY...
Creating object 00012 _Documents_IX_Documents_AuthorId...
Creating object 00013 _Documents_IX_MERGE__Documents_RowId...
Creating object 00014 Documents_MergeUpdate_Index...
Synchronization completed

c) Synchronize() is blocked by CORS policy. Debugger output:

<b>Starting sending data</b>
2jquery-2.0.2.min.js:6 OPTIONS http://macmini:8080/SqliteSync-3.2.14/API3/Send 500
send @ jquery-2.0.2.min.js:6
ajax @ jquery-2.0.2.min.js:6
sqlitesync_SyncSendToServer @ sqlitesync.js:436
(anonymous) @ sqlitesync.js:426
SQLStatement (async)
sqlitesync_SyncSendTableDelete @ sqlitesync.js:411
(anonymous) @ sqlitesync.js:326
SQLStatement (async)
(anonymous) @ sqlitesync.js:300
SQLStatement (async)
(anonymous) @ sqlitesync.js:278
SQLStatement (async)
(anonymous) @ sqlitesync.js:261
SQLTransaction (async)
sqlitesync_SyncSendTable @ sqlitesync.js:260
(anonymous) @ sqlitesync.js:324
SQLStatement (async)
(anonymous) @ sqlitesync.js:300
SQLStatement (async)
(anonymous) @ sqlitesync.js:278
SQLStatement (async)
(anonymous) @ sqlitesync.js:261
SQLTransaction (async)
sqlitesync_SyncSendTable @ sqlitesync.js:260
(anonymous) @ sqlitesync.js:335
SQLStatement (async)
(anonymous) @ sqlitesync.js:261
SQLTransaction (async)
sqlitesync_SyncSendTable @ sqlitesync.js:260
sqlitesync_SyncSendData @ sqlitesync.js:255
(anonymous) @ sqlitesync.js:47
SQLTransaction (async)
sqlitesync_SyncSendAndReceive @ sqlitesync.js:22
doSync @ index.htm:75
onclick @ index.htm:28
index.htm:1 Access to XMLHttpRequest at 'http://macmini:8080/SqliteSync-3.2.14/API3/Send' from origin 'http://luzi2' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
@sqlite-sync
Copy link
Owner

sqlite-sync commented Nov 14, 2019 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