diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 153941c03f..1f5d49d6b2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -133,20 +133,20 @@ jobs: services: hub: - image: selenium/hub:4.20.0-20240425 + image: selenium/hub:4.23.0-20240727 ports: - 4442:4442 - 4443:4443 - 4444:4444 firefox: - image: selenium/node-firefox:4.20.0-20240425 + image: selenium/node-firefox:4.23.0-20240727 env: SE_EVENT_BUS_HOST: hub SE_EVENT_BUS_PUBLISH_PORT: 4442 SE_EVENT_BUS_SUBSCRIBE_PORT: 4443 options: --shm-size="2g" chrome: - image: selenium/node-chrome:4.20.0-20240425 + image: selenium/node-chrome:4.23.0-20240727 env: SE_EVENT_BUS_HOST: hub SE_EVENT_BUS_PUBLISH_PORT: 4442 diff --git a/src/lib/adapters/NextcloudBookmarks.ts b/src/lib/adapters/NextcloudBookmarks.ts index 6a6f1c809c..962c9e8d66 100644 --- a/src/lib/adapters/NextcloudBookmarks.ts +++ b/src/lib/adapters/NextcloudBookmarks.ts @@ -800,41 +800,57 @@ export default class NextcloudBookmarksAdapter implements Adapter, BulkImportRes Logger.log(`QUEUING ${verb} ${url}`) - if (Capacitor.getPlatform() !== 'web') { - return this.sendRequestNative(verb, url, type, body, returnRawResponse) - } + let i = 0 + let isError = false - const authString = Base64.encode( - this.server.username + ':' + this.server.password - ) + do { + try { + if (Capacitor.getPlatform() !== 'web') { + return this.sendRequestNative(verb, url, type, body, returnRawResponse) + } - try { - res = await this.fetchQueue.add(() => { - Logger.log(`FETCHING ${verb} ${url}`) - return Promise.race([ - fetch(url, { - method: verb, - credentials: this.server.includeCredentials ? 'include' : 'omit', - headers: { - ...(type && type !== 'multipart/form-data' && { 'Content-type': type }), - Authorization: 'Basic ' + authString, - }, - signal: this.abortSignal, - ...(body && !['get', 'head'].includes(verb.toLowerCase()) && { body }), - }), - new Promise((resolve, reject) => - setTimeout(() => { - timedOut = true - reject(new RequestTimeoutError()) - }, TIMEOUT) - ), - ]) - }) - } catch (e) { - if (timedOut) throw e - if (this.canceled) throw new CancelledSyncError() - console.log(e) - throw new NetworkError() + const authString = Base64.encode( + this.server.username + ':' + this.server.password + ) + + try { + res = await this.fetchQueue.add(() => { + Logger.log(`FETCHING ${verb} ${url}`) + return Promise.race([ + fetch(url, { + method: verb, + credentials: this.server.includeCredentials ? 'include' : 'omit', + headers: { + ...(type && type !== 'multipart/form-data' && { 'Content-type': type }), + Authorization: 'Basic ' + authString, + }, + signal: this.abortSignal, + ...(body && !['get', 'head'].includes(verb.toLowerCase()) && { body }), + }), + new Promise((resolve, reject) => + setTimeout(() => { + timedOut = true + reject(new RequestTimeoutError()) + }, TIMEOUT) + ), + ]) + }) + } catch (e) { + if (timedOut) throw e + if (this.canceled) throw new CancelledSyncError() + console.log(e) + throw new NetworkError() + } + isError = false + } catch (e) { + isError = e + await new Promise((resolve) => setTimeout(resolve, 1000 * 2 ** i)) + } + i++ + } while (i < 6 && isError) + + if (isError) { + throw isError } Logger.log(`Receiving response for ${verb} ${url}`) diff --git a/src/ui/NativeApp.vue b/src/ui/NativeApp.vue index acfeba734a..50b15b6165 100644 --- a/src/ui/NativeApp.vue +++ b/src/ui/NativeApp.vue @@ -46,11 +46,13 @@ body { padding-left: env(safe-area-inset-left); padding-right: env(sage-area-inset-right); background: v-bind(background); - font-size: 0.45cm !important; + font-size: 0.55cm !important; + font: -apple-system-body; } html { - font-size: 0.45cm !important; + font-size: 0.55cm !important; + font: -apple-system-body; } .v-navigation-drawer {