iamhyc / Overleaf-Workshop

Open Overleaf/ShareLaTex projects in vscode, with full collaboration support.
https://marketplace.visualstudio.com/items?itemName=iamhyc.overleaf-workshop
GNU Affero General Public License v3.0
563 stars 13 forks source link

Login Failed; Failed to get User ID for official Overleaf website #200

Closed khizar-anjum closed 1 month ago

khizar-anjum commented 1 month ago

Describe the bug

After using the "login with cookie" option for the default https://www.overleaf.com server login, the vscode responds with two consective notifications as "Login failed." and "Failed to get User ID.". Just to mention that I am using Cursor fork of vscode version 1.91.1. Cannot verify if this bug exists on the official vscode version too. Also, the console shows the following error: workbench.desktop.main.js:497 [Extension Host] rejected promise not handled within 1 second: TypeError [ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING]: A dynamic import callback was not specified ... More details are pasted in the developer logs below.

Expected behavior

After getting the cookie as described in the README.md guide, it should login, and show all the projects and let the user edit them.

How To Reproduce

  1. Get the cookie by following the instructions from README.md
  2. Use the "Login with cookie" method
  3. The issue shows up

Environment

Developer Logs

I have pasted the developer logs here. Just changed the homefolder name for preserving privacy.

workbench.desktop.main.js:497 [Extension Host] rejected promise not handled within 1 second: TypeError [ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING]: A dynamic import callback was not specified. p @ workbench.desktop.main.js:497 workbench.desktop.main.js:497 [Extension Host] stack trace: TypeError: A dynamic import callback was not specified. at importModuleDynamicallyCallback (node:internal/modules/esm/utils:228:9) at Object. (/home/username/.cursor/extensions/iamhyc.overleaf-workshop-0.14.1/node_modules/prettier/index.cjs:593:23) at c._compile (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:1257) at Module._extensions..js (node:internal/modules/cjs/loader:1432:10) at Module.load (node:internal/modules/cjs/loader:1215:32) at Module._load (node:internal/modules/cjs/loader:1031:12) at c._load (node:electron/js2c/node_init:2:13801) at P._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:193:6054) at l._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:190:32147) at c._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:155:34320) at Module.require (node:internal/modules/cjs/loader:1240:19) at g (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:647) at Object. (/home/username/.cursor/extensions/iamhyc.overleaf-workshop-0.14.1/out/intellisense/texDocumentFormatProvider.js:5:18) at c._compile (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:1257) at Module._extensions..js (node:internal/modules/cjs/loader:1432:10) at Module.load (node:internal/modules/cjs/loader:1215:32) at Module._load (node:internal/modules/cjs/loader:1031:12) at c._load (node:electron/js2c/node_init:2:13801) at P._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:193:6054) at l._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:190:32147) at c._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:155:34320) at Module.require (node:internal/modules/cjs/loader:1240:19) at g (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:647) at Object. (/home/username/.cursor/extensions/iamhyc.overleaf-workshop-0.14.1/out/intellisense/langIntellisenseProvider.js:7:37) at c._compile (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:1257) at Module._extensions..js (node:internal/modules/cjs/loader:1432:10) at Module.load (node:internal/modules/cjs/loader:1215:32) at Module._load (node:internal/modules/cjs/loader:1031:12) at c._load (node:electron/js2c/node_init:2:13801) at P._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:193:6054) at l._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:190:32147) at c._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:155:34320) at Module.require (node:internal/modules/cjs/loader:1240:19) at g (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:647) at Object. (/home/username/.cursor/extensions/iamhyc.overleaf-workshop-0.14.1/out/intellisense/index.js:31:34) at c._compile (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:1257) at Module._extensions..js (node:internal/modules/cjs/loader:1432:10) at Module.load (node:internal/modules/cjs/loader:1215:32) at Module._load (node:internal/modules/cjs/loader:1031:12) at c._load (node:electron/js2c/node_init:2:13801) at P._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:193:6054) at l._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:190:32147) at c._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:155:34320) at Module.require (node:internal/modules/cjs/loader:1240:19) at g (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:647) at Object. (/home/username/.cursor/extensions/iamhyc.overleaf-workshop-0.14.1/out/extension.js:10:24) at c._compile (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:1257) at Module._extensions..js (node:internal/modules/cjs/loader:1432:10) at Module.load (node:internal/modules/cjs/loader:1215:32) at Module._load (node:internal/modules/cjs/loader:1031:12) at c._load (node:electron/js2c/node_init:2:13801) at P._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:193:6054) at l._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:190:32147) at c._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:155:34320) at Module.require (node:internal/modules/cjs/loader:1240:19) at require (node:internal/modules/helpers:179:18) at i (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:3:98) at h.yb (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:190:33348) at async Promise.all (index 0) p @ workbench.desktop.main.js:497 workbench.desktop.main.js:3012 [iamhyc.overleaf-workshop]A dynamic import callback was not specified. console.error @ workbench.desktop.main.js:3012 workbench.desktop.main.js:3012 TypeError: A dynamic import callback was not specified. at importModuleDynamicallyCallback (node:internal/modules/esm/utils:228:9) at Object. (/home/username/.cursor/extensions/iamhyc.overleaf-workshop-0.14.1/node_modules/prettier/index.cjs:593:23) at c._compile (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:1257) at Module._extensions..js (node:internal/modules/cjs/loader:1432:10) at Module.load (node:internal/modules/cjs/loader:1215:32) at Module._load (node:internal/modules/cjs/loader:1031:12) at c._load (node:electron/js2c/node_init:2:13801) at P._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:193:6054) at l._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:190:32147) at c._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:155:34320) at Module.require (node:internal/modules/cjs/loader:1240:19) at g (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:647) at Object. (/home/username/.cursor/extensions/iamhyc.overleaf-workshop-0.14.1/out/intellisense/texDocumentFormatProvider.js:5:18) at c._compile (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:1257) at Module._extensions..js (node:internal/modules/cjs/loader:1432:10) at Module.load (node:internal/modules/cjs/loader:1215:32) at Module._load (node:internal/modules/cjs/loader:1031:12) at c._load (node:electron/js2c/node_init:2:13801) at P._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:193:6054) at l._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:190:32147) at c._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:155:34320) at Module.require (node:internal/modules/cjs/loader:1240:19) at g (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:647) at Object. (/home/username/.cursor/extensions/iamhyc.overleaf-workshop-0.14.1/out/intellisense/langIntellisenseProvider.js:7:37) at c._compile (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:1257) at Module._extensions..js (node:internal/modules/cjs/loader:1432:10) at Module.load (node:internal/modules/cjs/loader:1215:32) at Module._load (node:internal/modules/cjs/loader:1031:12) at c._load (node:electron/js2c/node_init:2:13801) at P._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:193:6054) at l._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:190:32147) at c._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:155:34320) at Module.require (node:internal/modules/cjs/loader:1240:19) at g (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:647) at Object. (/home/username/.cursor/extensions/iamhyc.overleaf-workshop-0.14.1/out/intellisense/index.js:31:34) at c._compile (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:1257) at Module._extensions..js (node:internal/modules/cjs/loader:1432:10) at Module.load (node:internal/modules/cjs/loader:1215:32) at Module._load (node:internal/modules/cjs/loader:1031:12) at c._load (node:electron/js2c/node_init:2:13801) at P._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:193:6054) at l._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:190:32147) at c._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:155:34320) at Module.require (node:internal/modules/cjs/loader:1240:19) at g (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:647) at Object. (/home/username/.cursor/extensions/iamhyc.overleaf-workshop-0.14.1/out/extension.js:10:24) at c._compile (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:2:1257) at Module._extensions..js (node:internal/modules/cjs/loader:1432:10) at Module.load (node:internal/modules/cjs/loader:1215:32) at Module._load (node:internal/modules/cjs/loader:1031:12) at c._load (node:electron/js2c/node_init:2:13801) at P._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:193:6054) at l._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:190:32147) at c._load (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:155:34320) at Module.require (node:internal/modules/cjs/loader:1240:19) at require (node:internal/modules/helpers:179:18) at i (/tmp/.mount_cursorYUpgxt/resources/app/out/bootstrap-fork.js:3:98) at h.yb (/tmp/.mount_cursorYUpgxt/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:190:33348) at async Promise.all (index 0) console.error @ workbench.desktop.main.js:3012 workbench.desktop.main.js:3012 Failed to get User ID. console.error @ workbench.desktop.main.js:3012 workbench.desktop.main.js:3012 Login failed. console.error @ workbench.desktop.main.js:3012
iamhyc commented 1 month ago

There is nothing wrong with the vscode extension. Please check if you use the correct cookie, which should be like overleaf_session2=s%......

khizar-anjum commented 1 month ago

Hey, thanks for your comment. I had logged in earlier using the same method as outlined in the README.md and the one you pointed out, but I got logged out last thursday on all my devices, and even though I was able to login with my browser with CAPTCHA, not the same was true for the extension.

Today (after 3-4 days of cooldown), I tried the same method and logged in successfully. So, I think there might be some kind of blocking/captcha being used by Overleaf. Just to keep that in mind for future uses and other users I guess.

Thanks for your help though! Closing the issue now.