Cloudant wont sync up

Hello, I’ve been using noteself for years now, recently I cleaned up cache which means that Noteself got cleaned empty, but this is no issue since I have a backup on Cloudant, however, when I input the URL and database name, it wont load back up the info as it used to.

Did something change? Do I have to do something else now?

The cloud icon that appears when its syncing is not showing up either. What could be happening?

Thank you

Do you have any browser plugin ( Ghostery, Privacy Possum, etc) that might be messing with the Javascript?
Could you share the settings (obfuscated ofcourse) that you use to connect to the database? And maybe check the browser console for any messages.

No plugins that do that, however, I repeated the process with the console open and there are some interesting things going on, a lot of warnings that happen normally (normally = me not trying to sync the DB), but among the errors:

Access to XMLHttpRequest at ‘https://XXXXXXXXXXXX-bluemix.cloudant.com/_session’ from origin ‘https://noteself.org’ has been blocked by CORS policy: The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode is ‘include’. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

I’ve had issues with CORS policy in the past when trying to consume REST services, activated the extension I use for that but had no luck.

GET https://XXXXXXXXXXXX-bluemix.cloudant.com/_session net::ERR_FAILED

OPTIONS https://noteself.org/online/ 405

Using this instead of the actual URL:

https://XXXXXXXXXXXX-bluemix.cloudant.com/_session

In regards to how I set the info would be:

CouchDB URL | https://XXXXXXXXXXXX-bluemix.cloudant.com
Remote database name | santabregat_home

and that’s about it, while being authenticated on Cloudant itself so it doesn’t have any problem with that while logging in. If I go to the URL itself, it returns the JSON as usual, it seems to be an issue between the noteself and cloudant, the request is not being sent.

I have the same extensions as I used to have the last time I loaded that backup.

If the whole content of the errors is needed, I can provide it as well.

That is clearly a CORS problem. Please, go to your cloudant dashboard and ensure that you have CORS enabled for all the domains, or at least for noteself. What is your current CORS config ? If you set it up to a specific URL we made a domain change recently, so if you have it limited to the old domain you should update it to match the new one:

image

Disabling CORS didn’t stop the message, however, updating the URL did.

The only error showing up now is the OPTIONS 405 one, but errors aside, it’s still not loading anything.

I can see among the messages being logged, the following that seem to have to do with PouchDB:

PouchStartup: Client side dbs created 

PouchStartup: StoryList was already in database  
    created: "20200530160551702"
    list: "GettingStarted $:/ControlPanel"
    modified: "20200530160551702"
    revision: "2-717e035b5512c60a60329598047df674"
    text: ""
    title: "$:/StoryList"type: "text/vnd.tiddlywiki"
    __proto__: 

PouchStartup: Error retrieving StoryList or DefaultTiddlers 

PouchStartup: n {
        status: 404,
        name: "not_found",
        message: "missing",
        error: true,
        reason: "missing"
    }

PouchStartup: Client side dbs initialized

Sorry if I was not clear. Not disabling CORS, but updating it or activating it for all sources. Now you have updated the URL we are fine with that.

So, you have setup NS to point to your couchdb server, right? Have you tried re-loading the page? Those messages seems part of the normal startup, when some of the defaults are not yet set.

Ive tried deleting the DB and restarting the whole process without luck, also tried a different web browser (Brave) and the same thing happens:

The Loading screen changes to “Updating Database” and when it completes, nothing happens, I’m not seeing the cloud icon under the Notebook Name that used to appear when it was syncing up with cloudant back then

If you don’t see the cloud Icon that means that remote database information is not set.
Could you share a screenshot of your control panel tiddlypouch tab?
This one:

Its…back (?)

I didn’t do anything else since the message I sent here, and not only that but the database info is empty, not sure if Chrome could load an old cache file but it could be what it did, because it has changes I made that were not backed up, this is odd and slightly frustrating because I didn’t find out what was wrong, but pleasing because I recovered my info.

Hello @tronikart
What you are describing is a bit extrange. If the config database it’s empty, then it should not be syncing.
I don’t think chrome is loading any cache suddenly. Maybe you are using a different url and that can cause the old info to kick in. What URL are you using to access Noteself?

Im back from not having internet for a while and then busy with work, yeah the URL was the old one, but I needed to clean cache either way so I’m back to square one.

The old URL now redirects to the new one.

Origin Domains on cloudant is set to Restrict to specific domains and that domain is https://noteself.org

The CouchDB URL is giving me a JSON and if I /database_name it gives me another JSON, which I’d guess are the things needed to access data inside the DB