Open fhintsch opened 4 years ago
Safari, Firefox and MobileSafari return an error on window.openDatabase (index.htm:130) SQLite is no longer support in the newest version of Safari. Firefox never has had the support of SQLite. If you want to use it on iOS with JavaScript, you need to pack your application in Cordova and use a plugin that will override SQLite implementation.
CORS By default we are adding Access-Control-Allow-Origin: *. Can you check the headers you get from a server?
On Tue, Nov 12, 2019 at 1:02 PM fhintsch notifications@github.com wrote:
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:
Starting sending data 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.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sqlite-sync/SQLite-sync.com/issues/23?email_source=notifications&email_token=ACNU5N5BF7QO3XXOHQUIBO3QTKLOVA5CNFSM4JMCPZO2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HYVTCMQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNU5N6V4ZM5FCG5RJ7QO2TQTKLOVANCNFSM4JMCPZOQ .
-- Best regards Tomek Dziemidowicz E-mail: tomek@dziemidowicz.cloud Take care of the Environment with us! Do not print this message or other documents if it is not necessary.
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: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
Starting sending data 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.