Comments (41)
Unfortunately, nothing changed, the issue still exists.
Interesing, let's dive deeper. Are you ready to start this journey?
from openai-translator.
Thanks for the new log. I will checkout tomorrow ๐ฅฐ
from openai-translator.
I'm unfamiliar with frontend techstack so I googled it a bit and I found my UI is somehow different than what I saw in the internet. (No Application page but Storage). Below is the screenshot and I can't found indexeddb.
from openai-translator.
Yes, that's really weird. Here is my side:
Seems indexeddb in your webkit doesn't work well.
Please try the following js in devtools:
let db;
const request = indexedDB.open("MyTestDatabase");
request.onerror = (event) => {
console.error("Why didn't you allow my web app to use IndexedDB?!");
};
request.onsuccess = (event) => {
console.info("Load success");
db = event.target.result;
};
from openai-translator.
Hi, @junaire, to make it's easier to debug, I setup a repro project at https://github.com/Xuanwo/tauri-indexeddb-openfailed. Would you like to give it a try?
It's an empty project that did nothing. If we can still reproduce this issue, it's must be not related to openai-translator.
from openai-translator.
Hi, @Xuanwo @yetone I think I fixed the bug. I bet this is the most weird bug I ever seen in my life. Still I don't understand why this happens, but it indeed works. Below is my fix:
diff --git a/src/common/services/promotion.ts b/src/common/services/promotion.ts
index 5ec9cd7..0f95beb 100644
--- a/src/common/services/promotion.ts
+++ b/src/common/services/promotion.ts
@@ -36,14 +36,7 @@ export interface IPromotionResponse {
}
export async function fetchPromotions(): Promise<IPromotionResponse> {
- const resp = await fetch(
- `https://raw.githubusercontent.com/yetone/openai-translator-configs/main/promotions.json?ts=${Date.now()}`,
- { cache: 'no-cache' }
- )
- if (!resp.ok) {
- throw new Error(resp.statusText)
- }
- return resp.json()
+ return {}
}
Note it's not about failing to fetch config, it's about fetch
itself! As long as you return an empty json, we're good...
I tried to replace the URL to www.example.com
and returned {}
the bug still reproduces. Any ideas about how fetch
could affect the behavior of IndexedDB?
from openai-translator.
I tried to replace the URL to
www.example.com
and returned{}
the bug still reproduces.Does
fetch
return 'ok'? Or does the indexeddb break regardless of whatfetch
returns, as soon as we call it?
Nah, looks like whatever I try to fetch the only thing I got is Failed to load resource: WebKit encountered an internal error
, even in the console.
It even failed to connect to my local server created by python3 -m http.server
, but with a slightly different error message Connection terminated unexpectedly
from openai-translator.
It even failed to connect to my local server created by
python3 -m http.server
, but with a slightly different error messageConnection terminated unexpectedly
That's really weird. Do you have http proxy settings or something? Try cleanup them all and try again.
OMG, I disabled the proxy settings in the global settings then it works! With any patches applied!
from openai-translator.
Great, with NO_PROXY=127.0.0.0/8
, I can reproduce the same error.
I think linux's no proxy setting doesn't support ip ranges, thus 127.0.0.0/8
doesn't work as you expected. So all requests to 127.0.0.1 failed which indexeddb depends on too.
from openai-translator.
3. ๅบ็ฐไพ่ต้่ฏฏ๏ผไฝฟ็จ
sudo apt --fix-broken install
ไฟฎๅค
What's the error? open-ai-translator is packaged under ubuntu-22.04
, it should work just fine on it.
from openai-translator.
- ๅบ็ฐไพ่ต้่ฏฏ๏ผไฝฟ็จ
sudo apt --fix-broken install
ไฟฎๅคWhat's the error? open-ai-translator is packaged under
ubuntu-22.04
, it should work just fine on it.
deb package could depend on other packages so I don't think that's related. I just tried the latest release with AppImage (which should be self-contained), and I found:
The initial UI works fine, but when I clicked the settings icon, it shows the error:
Clicked the Try again
button reproduces the original error message:
I have already built the project and run it in the command line, and I can confirm this still reproduces on main, but the console shows no logs so I don't know where to look at...
from openai-translator.
I highly suspect this is an upstream issue...
from openai-translator.
Seems some wrong on your config dir: openai-translator
will write config to $XDG_CONFIG_HOME/xyz.yetone.apps.openai-translator/config.json
. Do you have XDG_CONFIG_HOME
or HOME
configured? Can openai-translator access ~/.config
or ~/.cache
?
You can try print those env value during startup.
from openai-translator.
Seems some wrong on your config dir:
openai-translator
will write config to$XDG_CONFIG_HOME/xyz.yetone.apps.openai-translator/config.json
. Do you haveXDG_CONFIG_HOME
orHOME
configured? Can openai-translator access~/.config
or~/.cache
?You can try print those env value during startup.
โฏ echo $HOME
/home/jun
โฏ echo $XDG_CONFIG_HOME
โฏ ls -al ~/.config/xyz.yetone.apps.openai-translator/
total 12
drwxrwxr-x 2 jun jun 4096 3ๆ 29 15:03 .
drwx------ 48 jun jun 4096 4ๆ 22 22:19 ..
-rw-rw-r-- 1 jun jun 1048 4ๆ 22 23:15 config.json
โฏ ls -al ~/.cache/open-ai-translator
total 16
drwxrwxr-x 4 jun jun 4096 3ๆ 29 15:03 .
drwx------ 57 jun jun 4096 4ๆ 22 23:21 ..
drwxrwxr-x 2 jun jun 4096 3ๆ 29 15:03 CacheStorage
drwxrwxr-x 3 jun jun 4096 3ๆ 29 15:03 WebKitCache
Not sure but openai translator does write something into the desired directories...
from openai-translator.
Please also check ~/.local/share/xyz.yetone.apps.openai-translator
. I expect to see:
/home/xuanwo/.local/share/xyz.yetone.apps.openai-translator/
โโโ databases
โย ย โโโ indexeddb
โย ย โโโ v0 -> /home/xuanwo/.local/share/xyz.yetone.apps.openai-translator/databases/indexeddb
โย ย โโโ v1
โย ย โโโ tauri_localhost_0
โย ย โโโ E245F118A2329D74BB22E76C9F89A7C7032203F1EE2C611EE7E19D6B6D1EB50B
โย ย โโโ IndexedDB.sqlite3
โย ย โโโ IndexedDB.sqlite3-shm
โย ย โโโ IndexedDB.sqlite3-wal
โโโ localstorage
โโโ tauri_localhost_0.localstorage
โโโ tauri_localhost_0.localstorage-shm
โโโ tauri_localhost_0.localstorage-wal
8 directories, 6 files
Try removing them all if there are some old content there.
from openai-translator.
Please also check
~/.local/share/xyz.yetone.apps.openai-translator
. I expect to see:/home/xuanwo/.local/share/xyz.yetone.apps.openai-translator/ โโโ databases โย ย โโโ indexeddb โย ย โโโ v0 -> /home/xuanwo/.local/share/xyz.yetone.apps.openai-translator/databases/indexeddb โย ย โโโ v1 โย ย โโโ tauri_localhost_0 โย ย โโโ E245F118A2329D74BB22E76C9F89A7C7032203F1EE2C611EE7E19D6B6D1EB50B โย ย โโโ IndexedDB.sqlite3 โย ย โโโ IndexedDB.sqlite3-shm โย ย โโโ IndexedDB.sqlite3-wal โโโ localstorage โโโ tauri_localhost_0.localstorage โโโ tauri_localhost_0.localstorage-shm โโโ tauri_localhost_0.localstorage-wal 8 directories, 6 files
Try removing them all if there are some old content there.
I removed every old stuff and downloaded the latest version. Below is my results:
.
โโโ databases
โโโ indexeddb
โโโ databases
โย ย โโโ indexeddb
โย ย โโโ v0 -> /home/jun/.local/share/xyz.yetone.apps.openai-translator/databases/indexeddb/databases/indexeddb
โย ย โโโ v1
โย ย โโโ tauri_localhost_0
โย ย โโโ E245F118A2329D74BB22E76C9F89A7C7032203F1EE2C611EE7E19D6B6D1EB50B
โย ย โโโ IndexedDB.sqlite3
โย ย โโโ IndexedDB.sqlite3-shm
โย ย โโโ IndexedDB.sqlite3-wal
โโโ deviceidhashsalts
โย ย โโโ 1
โโโ localstorage
โย ย โโโ tauri_localhost_0.localstorage
โย ย โโโ tauri_localhost_0.localstorage-shm
โย ย โโโ tauri_localhost_0.localstorage-wal
โโโ mediakeys
โย ย โโโ v1
โย ย โโโ salt
โโโ storage
โโโ salt
โโโ SNVKpYwvLVxYgAmL-TXRKis9kf_53dJf3ir83LKJBTM
โโโ SNVKpYwvLVxYgAmL-TXRKis9kf_53dJf3ir83LKJBTM
โโโ origin
16 directories, 9 files
from openai-translator.
downloaded
What does downloaded
mean? This issue still exist after cleanup ~/.local/share/xyz.yetone.apps.openai-translator/
?
from openai-translator.
downloaded
What does
downloaded
mean? This issue still exist after cleanup~/.local/share/xyz.yetone.apps.openai-translator/
?
Unfortunately, nothing changed, the issue still exists.
from openai-translator.
Hi, @junaire, please call cargo tauri dev
under project root. You can right click the poped up windows to open devtools:
Please print the error message in console you can find.
from openai-translator.
Hi, @junaire, please call
cargo tauri dev
under project root. You can right click the poped up windows to open devtools:Please print the error message in console you can find.
Thanks, now I know the right way to debug this. Below is my logs when I clicked the settings button:
[Log] OpenFailedError (ErrorFallback.tsx, line 21)
[Error] The above error occurred in the <TranslateModeSelector> component:
TranslateModeSelector@http://localhost:3333/src/common/components/Settings.tsx:122:8
div
@http://localhost:3333/node_modules/.vite/deps/chunk-LR4KRP27.js:454:40
Styled(div)
UID2@http://localhost:3333/node_modules/.vite/deps/chunk-C7D3XKWM.js:121:50
UIDConsumer@http://localhost:3333/node_modules/.vite/deps/chunk-C7D3XKWM.js:150:16
FormControl2@http://localhost:3333/node_modules/.vite/deps/baseui-sd_form-control.js:257:20
Field2@http://localhost:3333/node_modules/.vite/deps/rc-field-form.js:2250:20
WrapperField@http://localhost:3333/node_modules/.vite/deps/rc-field-form.js:2639:19
div
FormItem@http://localhost:3333/src/common/components/Form/item.tsx:21:16
FormItem
div
div
form
Form2@http://localhost:3333/node_modules/.vite/deps/rc-field-form.js:3739:18
@http://localhost:3333/src/common/components/Form/form.ts:109:16
div
InnerSettings@http://localhost:3333/src/common/components/Settings.tsx:1415:9
div
InnerTranslator@http://localhost:3333/src/common/components/Translator.tsx:473:51
Suspense
GlobalSuspense@http://localhost:3333/src/common/components/GlobalSuspense.tsx:19:11
ThemeProvider2@http://localhost:3333/node_modules/.vite/deps/chunk-LIQX2ESN.js:23:20
UIDReset@http://localhost:3333/node_modules/.vite/deps/chunk-C7D3XKWM.js:143:20
div
@http://localhost:3333/node_modules/.vite/deps/chunk-LR4KRP27.js:454:40
Styled(div)
LayersManager2@http://localhost:3333/node_modules/.vite/deps/chunk-2SBMVLQG.js:242:20
BaseProvider2@http://localhost:3333/node_modules/.vite/deps/baseui-sd.js:49:23
DevProvider@http://localhost:3333/node_modules/.vite/deps/chunk-LR4KRP27.js:181:10
div
ErrorBoundary@http://localhost:3333/node_modules/.vite/deps/react-error-boundary.js:18:10
Translator@http://localhost:3333/src/common/components/Translator.tsx:440:15
div
InnerWindow@http://localhost:3333/src/tauri/components/Window.tsx:123:15
ThemeProvider2@http://localhost:3333/node_modules/.vite/deps/chunk-LIQX2ESN.js:23:20
UIDReset@http://localhost:3333/node_modules/.vite/deps/chunk-C7D3XKWM.js:143:20
div
@http://localhost:3333/node_modules/.vite/deps/chunk-LR4KRP27.js:454:40
Styled(div)
LayersManager2@http://localhost:3333/node_modules/.vite/deps/chunk-2SBMVLQG.js:242:20
BaseProvider2@http://localhost:3333/node_modules/.vite/deps/baseui-sd.js:49:23
DevProvider@http://localhost:3333/node_modules/.vite/deps/chunk-LR4KRP27.js:181:10
ErrorBoundary@http://localhost:3333/node_modules/.vite/deps/react-error-boundary.js:18:10
Window@http://localhost:3333/src/tauri/components/Window.tsx:43:15
App@http://localhost:3333/src/tauri/App.tsx:34:82
React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.
logCapturedError (chunk-AY6FKDNS.js:14036)
callback (chunk-AY6FKDNS.js:14082)
callCallback (chunk-AY6FKDNS.js:10511)
commitUpdateQueue (chunk-AY6FKDNS.js:10528)
commitLayoutEffectOnFiber (chunk-AY6FKDNS.js:17065)
commitLayoutMountEffects_complete (chunk-AY6FKDNS.js:17976)
commitLayoutEffects_begin (chunk-AY6FKDNS.js:17965)
commitLayoutEffects (chunk-AY6FKDNS.js:17916)
commitRootImpl (chunk-AY6FKDNS.js:19349)
commitRoot (chunk-AY6FKDNS.js:19273)
performSyncWorkOnRoot (chunk-AY6FKDNS.js:18891)
flushSyncCallbacks (chunk-AY6FKDNS.js:9135)
(anonymous function) (chunk-AY6FKDNS.js:18623)
[Error] Failed to load resource: WebKit encountered an internal error (promotions.json, line 0)
[Error] Failed to load resource: WebKit encountered an internal error (promotions.json, line 0)
[Error] Failed to load resource: WebKit encountered an internal error (promotions.json, line 0)
from openai-translator.
[Error] Failed to load resource: WebKit encountered an internal error (promotions.json, line 0)
export async function fetchPromotions(): Promise<IPromotionResponse> {
const resp = await fetch(
`https://raw.githubusercontent.com/yetone/openai-translator-configs/main/promotions.json?ts=${Date.now()}`,
{ cache: 'no-cache' }
)
if (!resp.ok) {
throw new Error(resp.statusText)
}
return resp.json()
}
Aha, openai-translator start failed for loading promotions. cc @yetone.
from openai-translator.
Hi, @junaire, would you like to give this fix a try? #1473
from openai-translator.
Sorry, unless I misapplied the patch, it doesn't work :(
Failed to load resource: WebKit encountered an internal error
Doesn't this imply some kind of bug of libwebkit? Which version you are using?
from openai-translator.
Sorry, unless I misapplied the patch, it doesn't work :(
If it doesn't work, it should have new errors like Error fetching promotions
. Can you read them?
from openai-translator.
I try to remove the event on this butten, please give this PR a try: #1475
from openai-translator.
Sorry, unless I misapplied the patch, it doesn't work :(
If it doesn't work, it should have new errors like
Error fetching promotions
. Can you read them?
Yes, it has trouble loading the promotion json, but I can observe the error when the initial UI starts up too, so it's unlikely the reason.
I try to remove the event on this butten, please give this PR a try: #1475
Still exists :(
BTW, I have some new logs:
[Error] OpenFailedError: OpenFailedError
useObservable (dexie-react-hooks.js:91)
TranslateModeSelector (Settings.tsx:127)
renderWithHooks (chunk-AY6FKDNS.js:12171)
updateFunctionComponent (chunk-AY6FKDNS.js:14577)
callCallback2 (chunk-AY6FKDNS.js:3674)
dispatchEvent
invokeGuardedCallbackDev (chunk-AY6FKDNS.js:3699)
invokeGuardedCallback (chunk-AY6FKDNS.js:3733)
beginWork$1 (chunk-AY6FKDNS.js:19761)
performUnitOfWork (chunk-AY6FKDNS.js:19194)
workLoopSync (chunk-AY6FKDNS.js:19133)
renderRootSync (chunk-AY6FKDNS.js:19112)
performSyncWorkOnRoot (chunk-AY6FKDNS.js:18870)
flushSyncCallbacks (chunk-AY6FKDNS.js:9135)
(anonymous function) (chunk-AY6FKDNS.js:18623)
[Error] DatabaseClosedError: UnknownError Connection to Indexed Database server lost. Refresh the page to try again
UnknownError: Connection to Indexed Database server lost. Refresh the page to try again
useObservable (dexie-react-hooks.js:91)
InnerTranslator (Translator.tsx:660)
renderWithHooks (chunk-AY6FKDNS.js:12171)
updateFunctionComponent (chunk-AY6FKDNS.js:14577)
callCallback2 (chunk-AY6FKDNS.js:3674)
dispatchEvent
invokeGuardedCallbackDev (chunk-AY6FKDNS.js:3699)
invokeGuardedCallback (chunk-AY6FKDNS.js:3733)
beginWork$1 (chunk-AY6FKDNS.js:19761)
performUnitOfWork (chunk-AY6FKDNS.js:19194)
workLoopSync (chunk-AY6FKDNS.js:19133)
renderRootSync (chunk-AY6FKDNS.js:19112)
performSyncWorkOnRoot (chunk-AY6FKDNS.js:18870)
flushSyncCallbacks (chunk-AY6FKDNS.js:9135)
(anonymous function) (chunk-AY6FKDNS.js:18623)
[Warning] There is a LayersManager already exists in your application. It is not recommended to have more than one LayersManager in an application. (chunk-YDDJB4SJ.js, line 398)
[Error] DatabaseClosedError: UnknownError Connection to Indexed Database server lost. Refresh the page to try again
UnknownError: Connection to Indexed Database server lost. Refresh the page to try again
useObservable (dexie-react-hooks.js:91)
InnerTranslator (Translator.tsx:660)
renderWithHooks (chunk-AY6FKDNS.js:12171)
updateFunctionComponent (chunk-AY6FKDNS.js:14577)
callCallback2 (chunk-AY6FKDNS.js:3674)
dispatchEvent
invokeGuardedCallbackDev (chunk-AY6FKDNS.js:3699)
invokeGuardedCallback (chunk-AY6FKDNS.js:3733)
beginWork$1 (chunk-AY6FKDNS.js:19761)
performUnitOfWork (chunk-AY6FKDNS.js:19194)
workLoopSync (chunk-AY6FKDNS.js:19133)
renderRootSync (chunk-AY6FKDNS.js:19112)
recoverFromConcurrentError (chunk-AY6FKDNS.js:18732)
performSyncWorkOnRoot (chunk-AY6FKDNS.js:18875)
flushSyncCallbacks (chunk-AY6FKDNS.js:9135)
(anonymous function) (chunk-AY6FKDNS.js:18623)
[Error] The above error occurred in the <InnerTranslator> component:
InnerTranslator@http://localhost:3333/src/common/components/Translator.tsx:473:51
Suspense
GlobalSuspense@http://localhost:3333/src/common/components/GlobalSuspense.tsx:19:11
ThemeProvider2@http://localhost:3333/node_modules/.vite/deps/chunk-LIQX2ESN.js:23:20
UIDReset@http://localhost:3333/node_modules/.vite/deps/chunk-C7D3XKWM.js:143:20
div
@http://localhost:3333/node_modules/.vite/deps/chunk-LR4KRP27.js:454:40
Styled(div)
LayersManager2@http://localhost:3333/node_modules/.vite/deps/chunk-YDDJB4SJ.js:242:20
BaseProvider2@http://localhost:3333/node_modules/.vite/deps/baseui-sd.js:49:23
DevProvider@http://localhost:3333/node_modules/.vite/deps/chunk-LR4KRP27.js:181:10
div
ErrorBoundary@http://localhost:3333/node_modules/.vite/deps/react-error-boundary.js:18:10
Translator@http://localhost:3333/src/common/components/Translator.tsx:440:15
div
InnerWindow@http://localhost:3333/src/tauri/components/Window.tsx:123:15
ThemeProvider2@http://localhost:3333/node_modules/.vite/deps/chunk-LIQX2ESN.js:23:20
UIDReset@http://localhost:3333/node_modules/.vite/deps/chunk-C7D3XKWM.js:143:20
div
@http://localhost:3333/node_modules/.vite/deps/chunk-LR4KRP27.js:454:40
Styled(div)
LayersManager2@http://localhost:3333/node_modules/.vite/deps/chunk-YDDJB4SJ.js:242:20
BaseProvider2@http://localhost:3333/node_modules/.vite/deps/baseui-sd.js:49:23
DevProvider@http://localhost:3333/node_modules/.vite/deps/chunk-LR4KRP27.js:181:10
ErrorBoundary@http://localhost:3333/node_modules/.vite/deps/react-error-boundary.js:18:10
Window@http://localhost:3333/src/tauri/components/Window.tsx:43:15
App@http://localhost:3333/src/tauri/App.tsx:34:82
React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.
logCapturedError (chunk-AY6FKDNS.js:14036)
callback (chunk-AY6FKDNS.js:14082)
callCallback (chunk-AY6FKDNS.js:10511)
commitUpdateQueue (chunk-AY6FKDNS.js:10528)
commitLayoutEffectOnFiber (chunk-AY6FKDNS.js:17065)
commitLayoutMountEffects_complete (chunk-AY6FKDNS.js:17976)
commitLayoutEffects_begin (chunk-AY6FKDNS.js:17965)
commitLayoutEffects (chunk-AY6FKDNS.js:17916)
commitRootImpl (chunk-AY6FKDNS.js:19349)
commitRoot (chunk-AY6FKDNS.js:19273)
performSyncWorkOnRoot (chunk-AY6FKDNS.js:18891)
flushSyncCallbacks (chunk-AY6FKDNS.js:9135)
(anonymous function) (chunk-AY6FKDNS.js:18623)
[Error] Unhandled Promise Rejection: DatabaseClosedError: UnknownError Connection to Indexed Database server lost. Refresh the page to try again
UnknownError: Connection to Indexed Database server lost. Refresh the page to try again
from openai-translator.
The logic about init and connect Indexed db is not implemented in openai-translator
. Please try set new $HOME
to /tmp
and start openai?
from openai-translator.
[Log] ActionInternalService::list (action.ts, line 82)
[Log] ActionInternalService::db actions.ts:37 (action.ts, line 5)
[Log] getLocalDB db.ts:44 (db.ts, line 15)
[Log] Already have localDB, return it. (db.ts, line 21)
[Log] ActionInternalService::db actions.ts:37 (action.ts, line 5)
[Log] getLocalDB db.ts:44 (db.ts, line 15)
[Log] Already have localDB, return it. (db.ts, line 21)
[Warning] Dexie: Need to reopen db (chunk-5AGB7WI4.js, line 2126)
[Warning] Unhandled rejection: OpenFailedError: OpenFailedError (chunk-5AGB7WI4.js, line 788)
create@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:3794:46
@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:2122:21
@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:749:22
callListener@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:487:15
endMicroTickScope@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:555:22
physicalTick@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:538:45
@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:749:22
From previous:
then@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:2759:36
list@http://localhost:3333/src/common/internal-services/action.ts:81:16
usePSD@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:734:14
newScope@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:641:18
execute@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:2490:64
doQuery@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:2524:26
@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:2547:12
@http://localhost:3333/node_modules/.vite/deps/dexie-react-hooks.js:73:50
commitHookEffectListMount@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:16904:40
commitPassiveMountOnFiber@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:18152:44
commitPassiveMountEffects_complete@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:18125:42
commitPassiveMountEffects_begin@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:18115:49
commitPassiveMountEffects@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:18105:42
flushPassiveEffectsImpl@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:19486:36
flushPassiveEffects@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:19443:45
commitRootImpl@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:19412:32
commitRoot@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:19273:27
performSyncWorkOnRoot@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:18891:21
flushSyncCallbacks@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:9135:38
@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:18623:39
From previous:
resolve@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:2844:34
enterTransactionScope@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:2111:30
list@http://localhost:3333/src/common/internal-services/action.ts:81:16
usePSD@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:734:14
newScope@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:641:18
execute@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:2490:64
doQuery@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:2524:26
@http://localhost:3333/node_modules/.vite/deps/chunk-5AGB7WI4.js:2547:12
@http://localhost:3333/node_modules/.vite/deps/dexie-react-hooks.js:73:50
commitHookEffectListMount@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:16904:40
commitPassiveMountOnFiber@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:18152:44
commitPassiveMountEffects_complete@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:18125:42
commitPassiveMountEffects_begin@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:18115:49
commitPassiveMountEffects@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:18105:42
flushPassiveEffectsImpl@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:19486:36
flushPassiveEffects@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:19443:45
commitRootImpl@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:19412:32
commitRoot@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:19273:27
performSyncWorkOnRoot@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:18891:21
flushSyncCallbacks@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:9135:38
@http://localhost:3333/node_modules/.vite/deps/chunk-AY6FKDNS.js:18623:39
from openai-translator.
Hi, @junaire, I submit a PR to print errors while open indexeddb failed: #1478. Please give it a try and share the error message.
from openai-translator.
Hi, @junaire, I submit a PR to print errors while open indexeddb failed: #1478. Please give it a try and share the error message.
Hi, thanks for your effort! I tried your PR but the console outputs nothing :( I also tried to use try catch clauses to see if I could catch some exceptions, but sadly no. From the logs in the console, this group of call stack ActionInternalService::list -> ActionInternalService::db -> getLocalDB
at least appears 4 times, and the first time it has no errors, but the last time I can observe warnings like Dexie: Need to reopen db
and Unhandled rejection: OpenFailedError: OpenFailedError
then it throws OpenFailedError: OpenFailedError
.
By stepping into the backtrace of the Dexie: Need to reopen db
I can see code like:
try {
trans.create();
db._state.PR1398_maxLoop = 3;
} catch (ex) {
if (ex.name === errnames.InvalidState && db.isOpen() && --db._state.PR1398_maxLoop > 0) {
console.warn("Dexie: Need to reopen db");
db._close();
return db.open().then(() => enterTransactionScope(db, mode, storeNames, null, scopeFunc));
}
return rejection(ex);
}
This looks so weird like they have some retry logic? and we indeed triggered this 3 times, then it fails. BTW, last time I somehow debugged err.inner.message
is exactly connection to indexed database server lost. refresh the page to try again
, which implies nothing...
from openai-translator.
This looks so weird like they have some retry logic? and we indeed triggered this 3 times, then it fails. BTW, last time I somehow debugged
err.inner.message
is exactlyconnection to indexed database server lost. refresh the page to try again
, which implies nothing...
really weird. Can you inspect the indexeddb in devtools? Anything special?
from openai-translator.
Yes, that's really weird. Here is my side:
Seems indexeddb in your webkit doesn't work well.
Please try the following js in devtools:
let db; const request = indexedDB.open("MyTestDatabase"); request.onerror = (event) => { console.error("Why didn't you allow my web app to use IndexedDB?!"); }; request.onsuccess = (event) => { console.info("Load success"); db = event.target.result; }; db.close()
Yes, I can confirm we can't use indexeddb.
FYI, I created a demo tauri app, tried the code above, and everything works just fine.
from openai-translator.
Does indexeddb work correctly on your own browser (chromium based) correctly? You can use the same scripts.
from openai-translator.
Does indexeddb work correctly on your own browser (chromium based) correctly? You can use the same scripts.
Yes, it's good.
from openai-translator.
I tried to replace the URL to
www.example.com
and returned{}
the bug still reproduces.
Does fetch
return 'ok'? Or does the indexeddb break regardless of what fetch
returns, as soon as we call it?
from openai-translator.
I added fetch promotions in https://github.com/Xuanwo/tauri-indexeddb-openfailed, would you like to give it a try?
from openai-translator.
It even failed to connect to my local server created by
python3 -m http.server
, but with a slightly different error messageConnection terminated unexpectedly
That's really weird. Do you have http proxy settings or something? Try cleanup them all and try again.
from openai-translator.
But I still don't know how proxy settings affect indexed db. Would you like to share your settings you are using?
from openai-translator.
But I still don't know how proxy settings affect indexed db. Would you like to share your settings you are using?
I'm using clash of Windows, a legacy version.
from openai-translator.
OK, I'd like to close the issue since it's only about my local config. Still, I don't understand how can proxy settings affect the behavior of fetch
, then affect the behavior of indexeddb
. Maybe there're some further bugs in webkit or something but that's another story. Anyway, I'm glad that we finally get there and many thanks to @Xuanwo! <3
from openai-translator.
@junaire @Xuanwo I have the same issue today, how do you solve it in the end?
from openai-translator.
Related Issues (20)
- [Bug] ๆๆฉๅฑ็่ฏญ่จ่ฎพ็ฝฎๆไบไธญๆ๏ผๅดๆปๆฏ่ชๅจๅๆ่ฑๆ
- [Bug]`cmd+w`(็ฑปๅ็ๆไฝๆฏ็นๅป็ชไฝ็ๅทฆไธ่ง็็บข่ฒๅๅ) ไนๅ็จๅบ่ฟๅ ฅไธ็ง่ฏกๅผ็้่็ถๆ๏ผๆ ๆณshow HOT 1
- [Bug] chrome extension ่ฏปๅ cookie ๆฅ้ HOT 1
- [Feature]่ฝๅฆไน่ฟๅ่ฏๆบ็ธๅ ณไฟกๆฏ
- [Bug] ่ชๅฎไน API URL ่ทๅไธๅฐ API ๆจกๅๅ่กจๆถๆ ๆณ้ๆฉ API ๆจกๅไธบ่ชๅฎไน HOT 4
- [Bug] ๅฝ็ฟป่ฏๅ ๅฎน่พ้ฟๆถ๏ผๆปๆฏๅบ็ฐๅคงๆฎต็็ฟป่ฏ้่ฏฏๅๆ ผๅผ้่ฏฏใไปฅไธๆฏไธไธช HOT 1
- [Bug] ๅจๆต่งๅจ YouTube ไธญไธๆๅฟซๆท้ฎไผๆๅ/ๆญๆพๅฝๅ็ฝ้กต็่ง้ข
- [Feature]ๅปบ่ฎฎๅขๅ ไธไธชๆฌๅฐๆไปถ็ฟป่ฏๅ่ฝๅนถๆฏๆๅฏผๅบ(TXT/SRT/HTML็ญ)
- Support win on ARM
- ๅปบ่ฎฎ้ป่ฎคๅ ณ้ญgeminiๆจกๅ็ๅ ๅฎนๅฎกๆฅ
- select from downloaded models if choose custom model when using ollama
- ๅธๆๅขๅ ่ฑๅ ๅคงๆจกๅๆฏๆ HOT 1
- [Bug]0.4.22ๆ ็ชๅฃ๏ผ้ช้
- Multiple Tabs for translating asynchronously
- ๅค็ฟป่ฏไปปๅกworkspace
- [Bug] ไฝฟ็จ้ฟ้ไบ้ไนๅ้ฎ๏ผ็ฟป่ฏๆฅ้`'frequency_penalty' is not supported now` HOT 4
- ๅธๆๆทปๅ ๆฏๆ้ฟ้ไบ้ไนๅ้ฎ็ๆจกๅ HOT 3
- ใๅฟซๆท้ฎใๅธๆๅธธ็จ็4ไธชๅ่ฝใ็ฟป่ฏใๆถฆ่ฒใไปฃ็ ่งฃๆใๆป็ปใ่ฝๅค่ชๅฎไนๅฟซๆท้ฎใ
- ใๆจกๅ็ปๅฎใๆฏไธชๅ่ฝๅฏไปฅ็ปๅฎไธๅ็ๆจกๅ
- [Bug] ็ฟป่ฏ็ปๆ่พๅบ็ชๅฃ Markdown ๆธฒๆๆๆพๅผๅธธ๏ผๆฏๅฆ ไธๅฏนๆๅทๅฐฑๆฒกๆๅ ็ฒ
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openai-translator.