Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Troubleshooting login #315

Closed
znck opened this issue Aug 26, 2022 Discussed in #296 · 8 comments
Closed

Troubleshooting login #315

znck opened this issue Aug 26, 2022 Discussed in #296 · 8 comments

Comments

@znck
Copy link
Owner

znck commented Aug 26, 2022

Discussed in #296

Originally posted by BoDonkey July 15, 2022
Hi,
I'm using Grammarly desktop with a premium subscription. When I connect to Grammarly through the command palette, it opens a browser window and seemingly connects. However, the icon at the bottom turns red and states that there is a connection error. There isn't anything special in the output section. Any pointers on troubleshooting this?
Thanks

@InTEGr8or
Copy link

I am having the same error and getting this message at Grammarly: https://vscode-extension-grammarly.netlify.app/.netlify/functions/redirect?code=<long_code>

image

@michidk
Copy link

michidk commented Aug 29, 2022

The URL actually looks like this: https://vscode-extension-grammarly.netlify.app/.netlify/functions/redirect?code=<long_code>&state=<base64url>
As a workaround, you can copy the code and state parameters from the URL. Decode the state value (for example with https://www.base64decode.org/), which should result in a URL. Add the &code=<long_code> to the URL you just decoded and visit that URL in your browser.

For me the decode state value hat the following value: vscode://znck.grammarly/auth/callback?windowId=1
So I added the code value that it looks like this: vscode://znck.grammarly/auth/callback?windowId=1&code=4UNI78423QHtdh...

After visiting it from Firefox, vscode said "Account connected.".

@abbreviatedman
Copy link

abbreviatedman commented Aug 29, 2022

Can confirm the above workaround (quoted below).

To clarify:

  1. Select “Grammarly Login” from the Command Palette.
  2. Go to the URL it gives you and authorize the application.
  3. When you get Netlify’s Page Not Found error, copy the URL you’re currently visiting.
  4. Take the part after &state= and run it through a base64 decoder, like the one at https://www.base64decode.org/. For me, like the author above, it gave me “vscode://znck.grammarly/auth/callback?windowId=1”, which is likely what it gave you as well. If that’s true for everyone, we may be able to skip this step and simply use the “vscode://” URL for the following step.
  5. Take the URL from step 4, append &code= and the end of the original URL---the part after ?code=.
  6. Go to that URL and it should log you in.

The URL actually looks like this: https://vscode-extension-grammarly.netlify.app/.netlify/functions/redirect?code=<long_code>&state=<base64url> As a workaround, you can copy the code and state parameters from the URL. Decode the state value (for example with https://www.base64decode.org/), which should result in a URL. Add the &code= to the URL you just decoded and visit that URL in your browser.

For me the decode state value hat the following value: vscode://znck.grammarly/auth/callback?windowId=1 So I added the code value that it looks like this: vscode://znck.grammarly/auth/callback?windowId=1&code=4UNI78423QHtdh...

After visiting it from Firefox, vscode said “Account connected.”.

@TCNOco
Copy link

TCNOco commented Sep 5, 2022

This is a rather annoying little bug, and I've just run across it trying this extension for the first time. Was about to give up. The fix worked, although took a second to figure out.

@rudeigerc
Copy link

It seems like Netlify Functions is not configured properly. The documentation shows that the default functions directory is YOUR_BASE_DIRECTORY/netlify/functions, which does not meet the current file structure. Since only the maintainers could maintain the configuration on Netlify, I'm unsure whether it is related to the issue. Could someone have a look at it?

@znck
Copy link
Owner Author

znck commented Sep 9, 2022

Fixed 383ae96. And configured to deploy from CI.

@frederikprijck
Copy link

Not sure this belongs here, happy to open another issue if needed.

I just installed the extension for the very first time, was able to login successfully (browser opened, code exchange happened and the extension said "Account connected"), but then it gives me the red icon in the bottom right saying: Connection status: error.

@dudarboh
Copy link

I still experienced the same issue with logging in and it took me two hours to make it work, but this thread helped a lot.

  1. Trying to log in via https://vscode-extension-grammarly.netlify.app/.netlify/functions/redirect didn't work and resulted in the firefox error message : "vscode-extension-grammarly.netlify.app the address wasn't understood"

  2. Trying to use vscode://znck.grammarly/auth/callback?windowId=1 didn't work, as firefox couldn't execute the link and was always googling it.

  3. Using this in terminal finally worked for me

code --open-url "vscode://znck.grammarly/auth/callback?windowId=1&code=..."

OS: Ubuntu 22:04/03
Browser: Firefox 120.0 (x64)
VSCode appimage details:
Version: 1.84.2
Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e
Date: 2023-11-09T10:50:47.800Z
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 5.15.0-88-generic
Grammarly extension: v0.25.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants