vrtmrz / obsidian-livesync

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CORS errors in remote database connection

M-Davies opened this issue Β· comments

Abstract

Connecting to the remote database fails due to CORS errors.

Expected behaviour

  • Connection with remote database successfully established after entering my Obsidian URI
  • Synchronisation ends with the message Replication completed
  • Everything synchronised

Actually happened

  • Connection established with server with no issues

Reproducing procedure

  1. Configure LiveSync as in the attached material (minor deviations below):
  • Hosting Provider: Dedicated Server (on 3rd party hosting providor, not fly basically)
  • Web server: Nginx
  • Server: Docker
  1. Generate the Obsidian URI as in the instructions and enter it
  2. Enter the default passphrase
  3. See obsidian plugin error (see Error in obsidian plugin settings screenshot below)

Report materials

Docker compose file

docker-compose.yml

version: "2.1"
services:
  couchdb:
    image: couchdb:latest
    container_name: obsidian-livesync
    environment:
      - PUID=1002
      - PGID=1002
        #- hostname=localhost:5984
      - hostname=https://<external-url>
      - COUCHDB_USER=<redacteduser-1>
      - COUCHDB_PASSWORD=<redactedpword-1>
      # Repeating values for obsidian-livesync config
      - username=obsidian-server-access
      - password=<redactedpword-2>
      # Creds for vault
      - database=generalnotes
      - passphrase=<redactedpword-2>
    volumes:
      - /home/<username>/obsidian-sync/couchdb-data:/opt/couchdb/data
      - /home/<username>/obsidian-sync/couchdb-etc:/opt/couchdb/etc/local.d
    ports:
      - "127.0.0.1:5984:5984"
    restart: unless-stopped

Nginx site config file

.conf

server {
        listen 443 ssl http2;
        server_name <external-url>;
        # Block access by direct IP
        if ( $host != "<external-url>" ){
                return 444; #CONNECTION CLOSED WITHOUT RESPONSE
        }

        access_log /var/log/nginx/obsidian-access.log;
        error_log /var/log/nginx/obsidian-error.log;

        ssl_certificate /etc/letsencrypt/live/<tld>/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/<tld>/privkey.pem;
        include /etc/letsencrypt/options-ssl-nginx.conf;
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
        ssl_trusted_certificate /etc/letsencrypt/live/<tld>/chain.pem;
        ssl_stapling on;
        ssl_stapling_verify on;

        location / {
                add_header 'Strict-Transport-Security' "max-age=31536000" 'always';
                # Add recommended obsidian livesync headers
                add_header 'Access-Control-Allow-Methods' 'GET, PUT, POST, HEAD, DELETE';
                add_header 'Access-Control-Allow-Headers' 'accept, authorization, content-type, origin, referer';
                add_header 'Access-Control-Allow-Origin' 'app://obsidian.md, capacitor://localhost, http://localhost, http://<external-url>, https://<external-url>, capacitor://<external-url>';
                add_header 'Access-Control-Max-Age' '3600';
                add_header 'Vary' 'Origin';
                add_header 'Access-Control-Allow-Credentials' 'true';

                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header Host $host;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_http_version 1.1;
                proxy_pass http://127.0.0.1:5984;
                proxy_redirect http:// https://;
        }
}

Report from the LiveSync

For more information, please refer to Making the report.

Report from hatch
---- Obsidian info ----
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) obsidian/1.4.14 Chrome/114.0.5735.289 Electron/25.8.1 Safari/537.36

Obsidian debug info

Debug info
---- remote config ----
cluster:
  n: "1"
cors:
  credentials: "true"
  origins: app://obsidian.md,capacitor://localhost,http://localhost
chttpd:
  bind_address: 0.0.0.0
  enable_cors: "true"
  max_http_request_size: "4294967296"
  port: "5984"
  require_valid_user: "true"
admins: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
vendor:
  name: The Apache Software Foundation
feature_flags:
  partitioned||*: "true"
chttpd_auth:
  hash_algorithms: sha256, sha
  require_valid_user: "true"
indexers:
  couch_mrview: "true"
prometheus:
  additional_port: "false"
  bind_address: 127.0.0.1
  port: "17986"
httpd:
  WWW-Authenticate: Basic realm="couchdb"
  bind_address: 127.0.0.1
  enable_cors: "true"
  port: "5986"
smoosh:
  state_dir: ./data
couch_httpd_auth:
  authentication_db: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
  secret: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
  authentication_redirect: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
couchdb_engines:
  couch: couch_bt_engine
couchdb:
  database_dir: ./data
  max_document_size: "50000000"
  uuid: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
  view_index_dir: ./data

---- Plug-in config ---
version:0.22.18
couchDB_URI: self-hosted(HTTPS)
couchDB_USER: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
couchDB_PASSWORD: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
couchDB_DBNAME: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
liveSync: true
syncOnSave: false
syncOnStart: false
savingDelay: 200
lessInformationInLog: false
gcDelay: 0
versionUpFlash: ""
minimumChunkSize: 20
longLineThreshold: 250
showVerboseLog: true
suspendFileWatching: false
trashInsteadDelete: true
periodicReplication: false
periodicReplicationInterval: 60
syncOnFileOpen: false
encrypt: true
passphrase: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
usePathObfuscation: true
doNotDeleteFolder: false
resolveConflictsByNewerFile: false
batchSave: false
deviceAndVaultName: ""
usePluginSettings: false
showOwnPlugins: false
showStatusOnEditor: true
showStatusOnStatusbar: true
showOnlyIconsOnEditor: false
usePluginSync: false
autoSweepPlugins: false
autoSweepPluginsPeriodic: false
notifyPluginOrSettingUpdated: false
checkIntegrityOnSave: false
batch_size: 50
batches_limit: 50
useHistory: true
disableRequestURI: true
skipOlderFilesOnSync: true
checkConflictOnlyOnOpen: false
showMergeDialogOnlyOnActive: false
syncInternalFiles: false
syncInternalFilesBeforeReplication: false
syncInternalFilesIgnorePatterns: \/node_modules\/, \/\.git\/, \/obsidian-livesync\/
syncInternalFilesInterval: 60
additionalSuffixOfDatabaseName: c9cb17a255164023
ignoreVersionCheck: false
lastReadUpdates: 0
deleteMetadataOfDeletedFiles: false
syncIgnoreRegEx: ""
syncOnlyRegEx: ""
customChunkSize: 50
readChunksOnline: true
watchInternalFileChanges: true
automaticallyDeleteMetadataOfDeletedFiles: 0
disableMarkdownAutoMerge: false
writeDocumentsIfConflicted: false
useDynamicIterationCount: false
syncAfterMerge: false
configPassphraseStore: ""
encryptedPassphrase: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
encryptedCouchDBConnection: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
permitEmptyPassphrase: false
useIndexedDBAdapter: true
useTimeouts: false
writeLogToTheFile: false
doNotPaceReplication: false
hashCacheMaxCount: 600
hashCacheMaxAmount: 80
concurrencyOfReadChunksOnline: 100
minimumIntervalOfReadChunksOnline: 100
hashAlg: xxhash64
suspendParseReplicationResult: false
doNotSuspendOnFetching: false
useIgnoreFiles: false
ignoreFiles: .gitignore
syncOnEditorSave: false
pluginSyncExtendedSetting: {}
syncMaxSizeInMB: 50
settingSyncFile: ""
writeCredentialsForSettingSync: false
notifyAllSettingSyncFile: false
isConfigured: true
settingVersion: 0
enableCompression: false

Plug-in log

We can see the log by tapping the Document box icon. If you noticed something suspicious, please let me know.
Note: Please enable Verbose Log. For detail, refer to Logging, please.

Plug-in log
19/04/2024, 00:11:16->STORAGE -> DB (plain) CPSA/Docs/OSI Model.md
19/04/2024, 00:11:16->STORAGE -> DB (plain) CPSA/Docs/Google Search.md
19/04/2024, 00:11:16->STORAGE -> DB (plain) CPSA/Docs/DOCS.md
19/04/2024, 00:11:16->UPDATE DATABASE: DONE:370, FAILED:0, LAST:0
19/04/2024, 00:11:16->Chunks saved: doc: CPSA/Docs/Cidr.md ,chunks: 1 (new:1, recycled:0, cached:0)
19/04/2024, 00:11:16->Chunks saved: doc: CPSA/Databases/SQL.md ,chunks: 1 (new:1, recycled:0, cached:0)
19/04/2024, 00:11:16->Chunks saved: doc: CPSA/Databases/Oracle.md ,chunks: 1 (new:1, recycled:0, cached:0)
19/04/2024, 00:11:16->Chunks saved: doc: CPSA/Databases/DATABASES.md ,chunks: 1 (new:1, recycled:0, cached:0)
19/04/2024, 00:11:16->STORAGE -> DB (plain) CPSA/Docs/Cidr.md
19/04/2024, 00:11:16->STORAGE -> DB (plain) CPSA/Databases/SQL.md
19/04/2024, 00:11:16->STORAGE -> DB (plain) CPSA/Databases/Oracle.md
19/04/2024, 00:11:16->STORAGE -> DB (plain) CPSA/Databases/DATABASES.md
19/04/2024, 00:11:16->Initialized, NOW TRACKING!
19/04/2024, 00:11:16->UPDATE DATABASE All done: DONE:374, FAILED:0
19/04/2024, 00:11:16->Initialize done!
19/04/2024, 00:11:16->Hidden files and plugin synchronization have been temporarily disabled. Please enable them after the fetching, if you need them.
19/04/2024, 00:11:39->Hidden files and plugin synchronization have been temporarily disabled. Please enable them after the fetching, if you need them.
19/04/2024, 00:11:39->Configuration loaded.
19/04/2024, 00:12:34->Cache initialized 300 / 50000000
19/04/2024, 00:12:42->Cache initialized 600 / 50000000
19/04/2024, 00:12:46->Cache initialized 600 / 80000000
19/04/2024, 00:12:47->Cache initialized 600 / 800000000
19/04/2024, 00:12:48->Cache initialized 600 / 80000000
19/04/2024, 00:13:18->could not connect to https://<external-url> : generalnotes 
(TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.)
19/04/2024, 00:13:18->HTTP:GET to:/ -> failed
19/04/2024, 00:13:18->TypeError:Failed to fetch
19/04/2024, 00:13:18->TypeError:Failed to fetch
19/04/2024, 00:13:43->Cache initialized 600 / 80000000
19/04/2024, 00:14:06->Cache initialized 600 / 80000000
19/04/2024, 00:14:09->Cache initialized 600 / 80000000
19/04/2024, 00:14:50->Cache initialized 600 / 80000000
19/04/2024, 00:14:50->Cache initialized 600 / 80000000
19/04/2024, 00:14:50->Cache initialized 600 / 80000000
19/04/2024, 00:14:50->Cache initialized 600 / 80000000
19/04/2024, 00:14:50->Cache initialized 600 / 80000000
19/04/2024, 00:14:51->Cache initialized 600 / 80000000
19/04/2024, 00:14:52->Cache initialized 600 / 80000000
19/04/2024, 00:14:52->Cache initialized 600 / 80000000
19/04/2024, 00:14:52->Cache initialized 600 / 80000000
19/04/2024, 00:14:52->Cache initialized 600 / 80000000
19/04/2024, 00:14:56->Cache initialized 600 / 80000000
19/04/2024, 00:15:07->Cache initialized 600 / 80000000
19/04/2024, 00:15:43->Chunks saved: doc: DND/Resources/Useful Links.md ,chunks: 2 (new:2, recycled:0, cached:0)
19/04/2024, 00:15:43->STORAGE -> DB (plain) DND/Resources/Useful Links.md
19/04/2024, 00:15:44->OneShot Sync begin... (sync)
19/04/2024, 00:15:44->HTTP:GET to:/ -> failed
19/04/2024, 00:15:44->TypeError:Failed to fetch
19/04/2024, 00:15:44->TypeError:Failed to fetch
19/04/2024, 00:15:44->Could not connect to https://<external-url>/generalnotes: TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.
19/04/2024, 00:15:44->Could not connect to server.
19/04/2024, 00:16:07->OneShot Sync begin... (sync)
19/04/2024, 00:16:07->HTTP:GET to:/ -> failed
19/04/2024, 00:16:07->TypeError:Failed to fetch
19/04/2024, 00:16:07->TypeError:Failed to fetch
19/04/2024, 00:16:07->Could not connect to https://<external-url>/generalnotes: TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.
19/04/2024, 00:16:07->Could not connect to server.
19/04/2024, 00:16:18->Cache initialized 600 / 80000000
19/04/2024, 00:16:18->Cache initialized 600 / 80000000
19/04/2024, 00:16:19->Cache initialized 600 / 80000000
19/04/2024, 00:16:19->Cache initialized 600 / 80000000
19/04/2024, 00:16:23->Cache initialized 600 / 80000000
19/04/2024, 00:16:24->Cache initialized 600 / 80000000
19/04/2024, 00:16:26->Cache initialized 600 / 80000000
19/04/2024, 00:16:26->Cache initialized 600 / 80000000
19/04/2024, 00:16:32->Cache initialized 600 / 80000000
19/04/2024, 00:16:32->Cache initialized 600 / 80000000
19/04/2024, 00:16:35->Cache initialized 600 / 80000000
19/04/2024, 00:16:35->Cache initialized 600 / 80000000
19/04/2024, 00:16:35->Before LiveSync, start OneShot once...
19/04/2024, 00:16:35->OneShot Sync begin... (pullOnly)
19/04/2024, 00:16:35->Before LiveSync, start OneShot once...
19/04/2024, 00:16:35->OneShot Sync begin... (pullOnly)
19/04/2024, 00:16:35->HTTP:GET to:/ -> failed
19/04/2024, 00:16:35->TypeError:Failed to fetch
19/04/2024, 00:16:35->TypeError:Failed to fetch
19/04/2024, 00:16:35->Could not connect to https://<external-url>/generalnotes: TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.
19/04/2024, 00:16:35->Could not connect to server.
19/04/2024, 00:16:35->HTTP:GET to:/ -> failed
19/04/2024, 00:16:35->TypeError:Failed to fetch
19/04/2024, 00:16:35->TypeError:Failed to fetch
19/04/2024, 00:16:35->Could not connect to https://<external-url>/generalnotes: TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.
19/04/2024, 00:16:35->Could not connect to server.
19/04/2024, 00:16:48->All synchronization disabled.
19/04/2024, 00:16:48->Cache initialized 600 / 80000000
19/04/2024, 00:16:48->Cache initialized 600 / 80000000
19/04/2024, 00:16:52->Cache initialized 600 / 80000000
19/04/2024, 00:16:52->could not connect to https://<external-url> :  
(TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.)
19/04/2024, 00:16:52->HTTP:GET to:// -> failed
19/04/2024, 00:16:52->TypeError:Failed to fetch
19/04/2024, 00:16:52->TypeError:Failed to fetch
19/04/2024, 00:17:02->Checking database configuration
19/04/2024, 00:17:03->Checking configuration done
19/04/2024, 00:17:13->Cache initialized 600 / 80000000
19/04/2024, 00:17:14->could not connect to obsidian://setuplivesync?settings=%5B%220lvl5iBqoFHXuVnwcFqNQ7Sgg6Bk4UZcWhzFHX1hwru9VfYPGiadxSZIcokxEWWOG6SdPqCOXElCTZQ5iS0h5dkBkOc2Aw%2FXpr84zhbKqO3mjn%2BITYVfV6KPUl4GiGT97eSOlNATROhG6upb88aWWvlX4FiYcz%2BCleBzFhlvKu8KBamY2wS750yFGldeNFugbRnd%2BNo6bLKcFxie9Y99VWdnpHzXXpqAzAki95QjcXF%2Bx0BJkblIMLCVl6boKp1rNClBSF73DFP5f2va1WllDwHHDl5wTlslIxxZBwAnKx1VVc6P2BWrsOBUKmoG5POLdRdMRPvlgEpWw7ZUg8pZzv96IS0cJAQtLxhK%2FrouSujEkAJMwABtZqdZUcHMXGEgLCvQgCfC%2FK%2F45EeAfREu0jLPVBgzf%2BDmvqf97xHCUxTdnhF%2BoSh0DQgj95557Clmcq3BOAgo%2Fywr3D52i9bcqZoub3eLFtIu1tHExe58MYpBI4qNZRehx7P3HEvwRCpArTquD%2FaT73hplTlB02lWKQi8ukmNDJIMnqdr7ZGYT%2BgA8kBKZ8odEBaeZzwPHfsx2MsXXrzNf8xOs4uQqXEYXnKIAyiYyQCQ9mWGoHAksoTj5swH4FF6PtrAFMpCHEhHsSOjSWafGfrZbj302qXP5dgrXs1vXJrQcsM7Ee06OwmuRGR16oIFkisSu9rdkarDvtBmmabBIWUXgVtX4dkthh6qQBtoUSYTJyX7%2FGfaN1kt1pNiecuYygvVhBn5A7s1UKB1dOZ%2FbH5TvkrAI%2BaJGS3KS%2FqjgwaXSFDhlQ%3D%3D%22%2C%221524475e1df4965605643ec001000000%22%2C%22d95af3fd6a031d7e1580974cbe6dfc26%22%5D :  
(Remote URI is not valid)
19/04/2024, 00:17:17->Cache initialized 600 / 80000000
19/04/2024, 00:17:25->could not connect to https://<external-url> :  
(TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.)
19/04/2024, 00:17:25->HTTP:GET to:// -> failed
19/04/2024, 00:17:25->TypeError:Failed to fetch
19/04/2024, 00:17:25->TypeError:Failed to fetch
19/04/2024, 00:17:32->Cache initialized 600 / 80000000
19/04/2024, 00:17:33->could not connect to <external-url> :  
(Remote URI is not valid)
19/04/2024, 00:17:36->Cache initialized 600 / 80000000
19/04/2024, 00:17:37->could not connect to https://<external-url> :  
(TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.)
19/04/2024, 00:17:37->HTTP:GET to:// -> failed
19/04/2024, 00:17:37->TypeError:Failed to fetch
19/04/2024, 00:17:37->TypeError:Failed to fetch
19/04/2024, 00:18:04->Cache initialized 600 / 80000000
19/04/2024, 00:18:04->could not connect to https://<external-url> : obsidiannotes 
(TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.)
19/04/2024, 00:18:04->HTTP:GET to:/ -> failed
19/04/2024, 00:18:04->TypeError:Failed to fetch
19/04/2024, 00:18:04->TypeError:Failed to fetch
19/04/2024, 00:18:33->Cache initialized 600 / 80000000
19/04/2024, 00:18:33->could not connect to https://<external-url> : _replicator 
(TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.)
19/04/2024, 00:18:33->HTTP:GET to:/ -> failed
19/04/2024, 00:18:33->TypeError:Failed to fetch
19/04/2024, 00:18:33->TypeError:Failed to fetch
19/04/2024, 00:18:35->Cache initialized 600 / 80000000
19/04/2024, 00:18:36->Cache initialized 600 / 80000000
19/04/2024, 00:18:36->Cache initialized 600 / 80000000
19/04/2024, 00:18:36->Cache initialized 600 / 80000000
19/04/2024, 00:18:36->Cache initialized 600 / 80000000
19/04/2024, 00:18:36->Cache initialized 600 / 80000000
19/04/2024, 00:18:37->could not connect to https://<external-url> : _users 
(TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.)
19/04/2024, 00:18:37->HTTP:GET to:/ -> failed
19/04/2024, 00:18:37->TypeError:Failed to fetch
19/04/2024, 00:18:37->TypeError:Failed to fetch
19/04/2024, 00:18:45->Cache initialized 600 / 80000000
19/04/2024, 00:18:46->Cache initialized 600 / 80000000
19/04/2024, 00:18:46->Cache initialized 600 / 80000000
19/04/2024, 00:18:46->Cache initialized 600 / 80000000
19/04/2024, 00:18:46->Cache initialized 600 / 80000000
19/04/2024, 00:18:47->Cache initialized 600 / 80000000
19/04/2024, 00:18:47->Cache initialized 600 / 80000000
19/04/2024, 00:18:47->Cache initialized 600 / 80000000
19/04/2024, 00:18:47->Cache initialized 600 / 80000000
19/04/2024, 00:18:47->Cache initialized 600 / 80000000
19/04/2024, 00:18:47->Cache initialized 600 / 80000000
19/04/2024, 00:18:47->Cache initialized 600 / 80000000
19/04/2024, 00:18:48->Cache initialized 600 / 80000000
19/04/2024, 00:18:49->could not connect to https://<external-url> : generalnotes 
(TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.)
19/04/2024, 00:18:49->HTTP:GET to:/ -> failed
19/04/2024, 00:18:49->TypeError:Failed to fetch
19/04/2024, 00:18:49->TypeError:Failed to fetch
19/04/2024, 00:18:52->Cache initialized 600 / 80000000
19/04/2024, 00:18:52->Cache initialized 600 / 80000000
19/04/2024, 00:18:52->Cache initialized 600 / 80000000
19/04/2024, 00:18:52->Cache initialized 600 / 80000000
19/04/2024, 00:18:53->Cache initialized 600 / 80000000
19/04/2024, 00:18:53->Cache initialized 600 / 80000000
19/04/2024, 00:18:53->Cache initialized 600 / 80000000
19/04/2024, 00:18:53->Cache initialized 600 / 80000000
19/04/2024, 00:18:53->Cache initialized 600 / 80000000
19/04/2024, 00:18:54->Cache initialized 600 / 80000000
19/04/2024, 00:18:54->Cache initialized 600 / 80000000
19/04/2024, 00:18:54->Cache initialized 600 / 80000000
19/04/2024, 00:18:54->Cache initialized 600 / 80000000
19/04/2024, 00:18:55->could not connect to https://<external-url> : obsidiannotes 
(TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.)
19/04/2024, 00:18:55->HTTP:GET to:/ -> failed
19/04/2024, 00:18:55->TypeError:Failed to fetch
19/04/2024, 00:18:55->TypeError:Failed to fetch
19/04/2024, 00:19:07->Cache initialized 600 / 80000000
19/04/2024, 00:19:08->could not connect to https://<external-url> :  
(TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.)
19/04/2024, 00:19:08->HTTP:GET to:// -> failed
19/04/2024, 00:19:08->TypeError:Failed to fetch
19/04/2024, 00:19:08->TypeError:Failed to fetch
19/04/2024, 00:19:55->Cache initialized 600 / 80000000
19/04/2024, 00:20:13->could not connect to https://<external-url> :  
(TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.)
19/04/2024, 00:20:13->HTTP:GET to:// -> failed
19/04/2024, 00:20:13->TypeError:Failed to fetch
19/04/2024, 00:20:13->TypeError:Failed to fetch
19/04/2024, 00:20:17->Checking database configuration
19/04/2024, 00:20:17->Checking configuration done
19/04/2024, 00:22:04->Synchronization setting configured as LiveSync.
19/04/2024, 00:22:04->Cache initialized 600 / 80000000
19/04/2024, 00:22:04->Cache initialized 600 / 80000000
19/04/2024, 00:22:04->Before LiveSync, start OneShot once...
19/04/2024, 00:22:04->OneShot Sync begin... (pullOnly)
19/04/2024, 00:22:04->Before LiveSync, start OneShot once...
19/04/2024, 00:22:04->OneShot Sync begin... (pullOnly)
19/04/2024, 00:22:04->HTTP:GET to:// -> failed
19/04/2024, 00:22:04->TypeError:Failed to fetch
19/04/2024, 00:22:04->TypeError:Failed to fetch
19/04/2024, 00:22:04->Could not connect to https://<external-url>: TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.
19/04/2024, 00:22:04->Could not connect to server.
19/04/2024, 00:22:04->HTTP:GET to:// -> failed
19/04/2024, 00:22:04->TypeError:Failed to fetch
19/04/2024, 00:22:04->TypeError:Failed to fetch
19/04/2024, 00:22:04->Could not connect to https://<external-url>: TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.
19/04/2024, 00:22:04->Could not connect to server.
19/04/2024, 00:22:22->could not connect to https://<external-url> :  
(TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.)
19/04/2024, 00:22:22->HTTP:GET to:// -> failed
19/04/2024, 00:22:22->TypeError:Failed to fetch
19/04/2024, 00:22:22->TypeError:Failed to fetch
19/04/2024, 00:29:23->could not connect to https://<external-url> :  
(TypeError:Failed to fetch
**Note** This error caused by many reasons. The only sure thing is you didn't touch the server.
To check details, open inspector.)
19/04/2024, 00:29:23->HTTP:GET to:// -> failed
19/04/2024, 00:29:23->TypeError:Failed to fetch
19/04/2024, 00:29:23->TypeError:Failed to fetch
19/04/2024, 00:35:54->{
  "cluster": {
    "n": "1"
  },
  "cors": {
    "credentials": "true",
    "origins": "app://obsidian.md,capacitor://localhost,http://localhost"
  },
  "chttpd": {
    "bind_address": "0.0.0.0",
    "enable_cors": "true",
    "max_http_request_size": "4294967296",
    "port": "5984",
    "require_valid_user": "true"
  },
  "admins": {
    "\"obsidian-server-access\"": "<ommited>",
    "obsidian-server-access": "<ommited>"
  },
  "vendor": {
    "name": "The Apache Software Foundation"
  },
  "feature_flags": {
    "partitioned||*": "true"
  },
  "chttpd_auth": {
    "hash_algorithms": "sha256, sha",
    "require_valid_user": "true"
  },
  "indexers": {
    "couch_mrview": "true"
  },
  "prometheus": {
    "additional_port": "false",
    "bind_address": "127.0.0.1",
    "port": "17986"
  },
  "httpd": {
    "WWW-Authenticate": "Basic realm=\"couchdb\"",
    "bind_address": "127.0.0.1",
    "enable_cors": "true",
    "port": "5986"
  },
  "smoosh": {
    "state_dir": "./data"
  },
  "couch_httpd_auth": {
    "authentication_db": "_users"
  },
  "couchdb_engines": {
    "couch": "couch_bt_engine"
  },
  "couchdb": {
    "database_dir": "./data",
    "max_document_size": "50000000",
    "uuid": "dc92bdecc088e1419511b3257869397c",
    "view_index_dir": "./data"
  }
}
19/04/2024, 00:35:54->Information has been copied to clipboard
19/04/2024, 00:39:01->Log window opened

Network log

Available on request

Screenshots

Connection To all_dbs couchdb

2024-04-19 00_42_12-Window

Error in obsidian plugin settings

2024-04-19 00_46_11-Window

Error in database check tool

2024-04-19 00_47_29-Window

Other information, insights and intuition.

  • Fairly certain it isn't my Access-Control-Allow-Origin header as this error still occurs with it set to a * wildcard
  • Open to any discussion, appreciate any help :)

Shit sorry, this was actually a duplicate of #226 I removed the CORS headers from NGINX and it solved the error :)