tonghoai / opennotas

The best personal Note-taking app 📙 Fast 🚀 Secure 🔐 and Free 💯
https://opennotas.io
Other
80 stars 8 forks source link

Cannot sync data #5

Open secretfork opened 2 months ago

secretfork commented 2 months ago

Using Microsoft Edge Version 126.0.2592.102 (Official build) (64-bit) and opennotas installed as a web app Using Chrome Version 126.0.6478.183 (Official Build) (64-bit) and opennotas installed as a web app

Error from console

Uncaught (in promise) TypeError: Failed to execute 'put' on 'Cache': Request scheme 'chrome-extension' is unsupported at sw.js:41:18

tonghoai commented 2 months ago

It seems like an extension is interfering with the data caching process. Could you provide me with the name of the extension you suspect? I will debug based on that. Thank you!

secretfork commented 2 months ago

I tried disabling all extensions then trying again. Same result unfortunately. Then I tried pausing on any exceptions, and and something that stuck out to me was this, hopefully it helps

image

hoaitx1 commented 2 months ago

Oh, I see. It seems like you are manually fetching the Turso configuration, right? You are missing a step for initializing the table for Turso, which is an oversight on my part. I sincerely apologize. You can find the instructions for initializing the table here: https://t.me/opennotas/66.

CREATE TABLE
  `folders` (
    `id` text PRIMARY KEY NOT NULL,
    `name` text,
    `createdAt` integer,
    `updatedAt` integer,
    `deletedAt` integer,
    `lastSync` integer
  );

CREATE TABLE
  `notes` (
    `id` text PRIMARY KEY NOT NULL,
    `folderId` text,
    `content` text,
    `isPinned` integer,
    `isLocked` integer,
    `createdAt` integer,
    `updatedAt` integer,
    `deletedAt` integer,
    `lastSync` integer,
    `deleteCompletelyAt` integer
  );

CREATE TABLE
  `settings` (
    `id` text PRIMARY KEY NOT NULL,
    `password` text,
    `updatedAt` integer,
    `lastSync` integer
  );
tonghoai commented 2 months ago

Oh, I see. It seems like you are manually fetching the Turso configuration, right? You are missing a step for initializing the table for Turso, which is an oversight on my part. I sincerely apologize. You can find the instructions for initializing the table here: https://t.me/opennotas/66.

CREATE TABLE
  `folders` (
    `id` text PRIMARY KEY NOT NULL,
    `name` text,
    `createdAt` integer,
    `updatedAt` integer,
    `deletedAt` integer,
    `lastSync` integer
  );

CREATE TABLE
  `notes` (
    `id` text PRIMARY KEY NOT NULL,
    `folderId` text,
    `content` text,
    `isPinned` integer,
    `isLocked` integer,
    `createdAt` integer,
    `updatedAt` integer,
    `deletedAt` integer,
    `lastSync` integer,
    `deleteCompletelyAt` integer
  );

CREATE TABLE
  `settings` (
    `id` text PRIMARY KEY NOT NULL,
    `password` text,
    `updatedAt` integer,
    `lastSync` integer
  );
secretfork commented 2 months ago

That was indeed the problem! Seems to me that https://docs.opennotas.io/started/setup-sync/turso#manual-retrieval may need some updating. Many thanks!