element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.15k stars 1.99k forks source link

Impossible to continue after "Element is open in another window" #28168

Open Xzensi opened 8 months ago

Xzensi commented 8 months ago

STR

  1. Have element-desktop (or web, I guess) running
  2. Unclean shutdown (eg reboot)
  3. Wind clock back by 5 minutes or so
  4. Start Element again
  5. Observe "Element is open in another window" dialog: image
  6. Click continue
  7. Observe spinner: image
  8. Wait for clock to pass the time of the unclean shutdown
  9. Element loads at last

Original description follows

Steps to reproduce

Element worked fine. Rebooted Windows 10, suddenly get "Element is open in another window" warning even though I do not have any other client open. Pressing "Continue" does nothing and loads forever.

I tried:

Web and mobile clients still work fine.

Outcome

What did you expect?

Being able to just use Element like normal.

What happened instead?

image

Operating system

Windows 10

Application version

Latest, reinstalled fresh

How did you install the app?

https://element.io/download

Homeserver

No response

Will you send logs?

No

Xzensi commented 8 months ago

Update: After waiting 18 hours and a couple reboots later, whatever file lock or stuck flag caused it to stay stuck in "Element is open in another window", even though the session wasn't even authenticated or logged in anymore, expired or got cleared and I can log into homeurl again.

gmpreussner commented 6 months ago

I'm having the same problem. Happened after rebooting Windows. There was an Element update a few days ago, and I had not rebooted since. Likely a bug in the latest version.

ewof commented 2 months ago

this is so aids it happens almost every time i restart my computer and every time i have to delete .config/Element and every time i have to import my keys again

richvdh commented 1 month ago

Could someone export logs from the developer console when this happens (ctrl-shift-i, "Console", right click -> "Save As") and share them?

richvdh commented 1 month ago

@ewof: your choice of phrasing is somewhat offensive. I appreciate the issue may be frustrating, but please remain civil in your interactions.

1a11 commented 2 weeks ago

Hello there!

rageshake.ts:69 Initialised rageshake.
rageshake.ts:69 To fix line numbers in Chrome: Meatball menu → Settings → Ignore list → Add /rageshake\.ts & /logger\.ts$
rageshake.ts:69 Using Electron platform
Markdown.ts:387 Uncaught (in promise) ReferenceError: Cannot access 'q' before initialization
    at Object.J (Markdown.ts:387:5)
    at _.start (ReadyWatchingStore.ts:30:30)
    at get instance (WidgetLayoutStore.ts:63:35)
    at ./node_modules/matrix-react-sdk/src/stores/widgets/WidgetLayoutStore.ts (WidgetLayoutStore.ts:518:48)
    at u (bootstrap:19:32)
    at ./node_modules/matrix-react-sdk/src/utils/WidgetUtils.ts (Whenable.ts:78:5)
    at u (bootstrap:19:32)
    at ./node_modules/matrix-react-sdk/src/stores/ActiveWidgetStore.ts (shouldHideEvent.ts:75:1)
    at u (bootstrap:19:32)
    at ./node_modules/matrix-react-sdk/src/stores/WidgetStore.ts (WidgetEchoStore.ts:110:1)
Markdown.ts:387 Uncaught (in promise) ReferenceError: Cannot access 'q' before initialization
    at Object.J (Markdown.ts:387:5)
    at l.start (ReadyWatchingStore.ts:30:30)
    at d.start (AsyncStoreWithClient.ts:40:31)
    at WidgetMessagingStore.ts:30:18
    at ./node_modules/matrix-react-sdk/src/stores/widgets/WidgetMessagingStore.ts (WidgetMessagingStore.ts:28:48)
    at u (bootstrap:19:32)
    at ./node_modules/matrix-react-sdk/src/stores/ActiveWidgetStore.ts (shouldHideEvent.ts:75:1)
    at u (bootstrap:19:32)
    at ./node_modules/matrix-react-sdk/src/stores/WidgetStore.ts (WidgetEchoStore.ts:110:1)
    at u (bootstrap:19:32)
Markdown.ts:387 Uncaught (in promise) ReferenceError: Cannot access 'q' before initialization
    at Object.J (Markdown.ts:387:5)
    at l.start (ReadyWatchingStore.ts:30:30)
    at p.start (AsyncStoreWithClient.ts:40:31)
    at WidgetStore.ts:48:18
    at ./node_modules/matrix-react-sdk/src/stores/WidgetStore.ts (WidgetStore.ts:46:48)
    at u (bootstrap:19:32)
    at ./node_modules/matrix-react-sdk/src/modules/ModuleRunner.ts (ModuleUiDialog.tsx:78:5)
    at u (bootstrap:19:32)
    at ./node_modules/matrix-react-sdk/src/SecurityManager.ts (AccessSecretStorageDialog.tsx:447:5)
    at u (bootstrap:19:32)
rageshake.ts:69 Configuring rageshake persistence...
rageshake.ts:69 returning explicit theme: dark
rageshake.ts:69 returning explicit theme: dark
rageshake.ts:69 set language to ru
rageshake.ts:69 Application is running in production mode
rageshake.ts:69 Vector starting at vector://vector/webapp/
rageshake.ts:69 Verifying homeserver configuration
rageshake.ts:69 Config uses a default_server_name - doing .well-known lookup
rageshake.ts:69 DEPRECATED CONFIG OPTION: In the future, default_server_name will not be accepted. Please use default_server_config instead.
Object.keys.forEach.e.<computed> @ rageshake.ts:69
Show 1 more frame
Show less
rageshake.ts:69 Invalid /v2 response
Object.keys.forEach.e.<computed> @ rageshake.ts:69
Show 1 more frame
Show less
rageshake.ts:69 Error determining preferred identity server URL: Object
Object.keys.forEach.e.<computed> @ rageshake.ts:69
Show 1 more frame
Show less
rageshake.ts:69 FetchHttpApi: --> GET https://matrix-client.matrix.org/_matrix/client/unstable/org.matrix.msc2965/auth_issuer
matrix-client.matrix.org/_matrix/client/unstable/org.matrix.msc2965/auth_issuer:1 

       Failed to load resource: the server responded with a status of 404 ()
rageshake.ts:69 FetchHttpApi: <-- GET https://matrix-client.matrix.org/_matrix/client/unstable/org.matrix.msc2965/auth_issuer [322ms 404]
rageshake.ts:69 Using homeserver config: ObjectdelegatedAuthentication: undefinedhsName: "matrix.org"hsNameIsDifferent: truehsUrl: "https://matrix-client.matrix.org"isDefault: trueisNameResolvable: trueisUrl: "https://vector.im"warning: "Identity server URL does not appear to be a valid identity server"[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()__proto__: (...)get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()
rageshake.ts:69 Updating SdkConfig with validated discovery information
rageshake.ts:69 returning explicit theme: dark
ewof commented 2 weeks ago

@ewof: your choice of phrasing is somewhat offensive. I appreciate the issue may be frustrating, but please remain civil in your interactions.

yea my bad i was annoyed since then though ive realized this seams to be related to system time? whenever i run into this i use ntpdate and it seams to fix it

richvdh commented 2 weeks ago

@1a11 thanks. Can you click "Continue" and share the console log after doing so?

richvdh commented 2 weeks ago

@ewof:

since then though ive realized this seams to be related to system time? whenever i run into this i use ntpdate and it seams to fix it

well, yes: if your instance of element desktop is not stopped cleanly (eg, you turn your system off), and then time on your system goes backwards to a time when the old instance was still running, the new instance will see a lock claim apparently from the future, from the new instance. I thoroughly recommend having a reasonably accurate clock on your computer.

richvdh commented 2 weeks ago

oh, I think I see the bug. Do you just see a spinner after clicking "Continue"?

1a11 commented 2 weeks ago

Yep. I'm pretty sure it's a time issue as it resolved after fixing the time server. FYI the log is after clicking the "Continue" button

richvdh commented 2 weeks ago

Ok thanks all. I'll have a think about how to fix this.