Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notion connection fails to complete in Zotero #639

Open
bebinca opened this issue Jan 19, 2025 · 20 comments
Open

Notion connection fails to complete in Zotero #639

bebinca opened this issue Jan 19, 2025 · 20 comments
Labels
bug Something isn't working

Comments

@bebinca
Copy link

bebinca commented Jan 19, 2025

Describe the issue

I clicked "Connect to Notion," selected an existing database, and clicked "Allow Access," but when I opened Zotero, nothing changed, and the "Connect to Notion" button remained visible. I had successfully connected Zotero to the Notion database on another device (Windows) using the same settings, but when I tried the same configuration on Mac, it didn't work. I've also tried restarting Zotero and reinstalling the Notero plugin, but the issue persists. I'm not sure if this issue is related to using multiple devices.

Additional context

I am using Zotero 7.0.11 and Notero 1.0.0 in macOS Sonoma.

Image Image
@dvanoni
Copy link
Owner

dvanoni commented Jan 20, 2025

Hi @bebinca, thanks for reporting this. I don't believe this should be impacted by using Notero on multiple devices, but I'm not entirely sure.

Would you mind trying the connection process again and then sending a screenshot of the Zotero logs? You can open the log window from the menu: Tools > Developer > Error Console

Thanks!

@Louiscdr56
Copy link

Hi,
I have the same issue.
Here is a screen of the logs

Image

@dvanoni
Copy link
Owner

dvanoni commented Jan 22, 2025

Thanks for sharing that screenshot, @Louiscdr56. Did you take that just after attempting the connection process?

I'm not seeing any of the expected messages that are part of the connection process, so it seems like Zotero isn't being activated correctly when opening it from your browser.

The screenshot below shows the messages we're expecting to see. Specifically, the big one starting with Protocol extension received URI is the first we expect when Zotero is opened from the browser.

Image

@bebinca
Copy link
Author

bebinca commented Jan 23, 2025

Hi @bebinca, thanks for reporting this. I don't believe this should be impacted by using Notero on multiple devices, but I'm not entirely sure.

Would you mind trying the connection process again and then sending a screenshot of the Zotero logs? You can open the log window from the menu: Tools > Developer > Error Console

Thanks!

Thank you for the suggestion! I've checked the logs of both Zotero and my browser, but oddly, there are no relevant logs after I clicked "Allow Access" and opened Zotero. It appears that Zotero isn't activating properly. I've attempted this on both Chrome and Safari.

@dvanoni
Copy link
Owner

dvanoni commented Jan 23, 2025

Thanks for the update, @bebinca. That's interesting...

I'm not yet sure what's happening, but I do remember experiencing some odd behavior when I had both Zotero and Zotero Beta installed at the same time. By chance do you happen to have multiple versions of Zotero installed?

@mpatca
Copy link

mpatca commented Jan 25, 2025

HI,

Perhaps the cause of my error is different, but it all boils down to the same problem.

Image

@dvanoni dvanoni added the bug Something isn't working label Jan 26, 2025
@github-project-automation github-project-automation bot moved this to Todo in Notero Jan 26, 2025
@dvanoni
Copy link
Owner

dvanoni commented Jan 26, 2025

Thanks for the input, everyone. To help clarify the exact behavior y'all are encountering, it'd be great if you could answer these questions for me:

Clarifying questions

  1. What operating system are you using?
  2. What web browser are you using?
  3. Do you have multiple versions of Zotero installed (e.g. both the stable and beta versions)?
  4. When you land on the "Connecting Notero to Notion" page, does your browser prompt you to open Zotero?
  5. If your browser does prompt you and you click "Open Zotero," does Zotero open automatically?
  6. If you type zotero://select into your browser address bar and try to open it, what happens?

Workaround

As a workaround, you should be able to connect to Notion using the "internal integration secret" approach that was used in Notero prior to v1.0.0. You can follow the v0.6.8 instructions to create a Notion internal integration.

You then have two options to paste the integration secret into Zotero:

  • Install Notero v0.6.8 which will restore the input field in the Notero preferences where you can paste the integration secret.
  • Staying on Notero v1.0.0, you can paste the integration secret by creating an entry named extensions.notero.notionToken in Zotero's config editor. See video below for how to do this.
CleanShot.2025-01-26.at.10.08.17.mp4

@dvanoni dvanoni moved this from Todo to In Progress in Notero Jan 26, 2025
@dvanoni
Copy link
Owner

dvanoni commented Jan 26, 2025

I searched through the Zotero Forums and found a few threads where other folks also had trouble opening zotero:// URLs.

A couple users on Windows had installed Zotero via Scoop, and it looks like the zotero:// protocol was not registered. One of them seemed to resolve the issue by manually adding the protocol to the Windows registry. The other resolved it by reinstalling Zotero using WinGet. They also suggested that reinstalling using the installer from https://www.zotero.org/download/ might work.

Another user had a similar issue on Linux, and it was suggested that installing the .deb packages should handle registration of the zotero:// protocol.

@bebinca, I know you're on macOS, so the above threads don't directly help—but I wonder if trying to uninstall and reinstall Zotero might do anything? If you try this, be sure you uninstall just the Zotero application itself and don't delete your Zotero profile directory.

@mpatca
Copy link

mpatca commented Jan 27, 2025

Thank you dvanoni for the quick and detailed reply.

I will try one of the alternatives as I think the problem is on my end.

Nevertheless, here are the details

  1. Windows 10 Education 22H2
  2. many and Browser Tamer (thought that was the problem, but that doesn't seem to be the case)
  3. no, but different profiles with different folders
  4. yes
  5. yes, but the profile selection opens (this could be the problem)
  6. the browser asks if Zotero should be opened

@mpatca
Copy link

mpatca commented Jan 27, 2025

I tried the 2nd option because I don't really like installing an old version first. But that doesn't seem to work, see screenshot.

Image

By the way, do I need the paid version of Notion? I am using a free version for students.

@dvanoni
Copy link
Owner

dvanoni commented Jan 28, 2025

Thanks for the input, @mpatca!

Based on your screenshot, it does look like the internal integration token you added is connected to your Notion workspace, so that's good. It appears you might just need to share your Notion database with the internal integration you created. You should be able to select it from the "Connections" menu in your Notion database. See step 4 in the "Configure Notion" section of the v0.6.8 README.


By the way, do I need the paid version of Notion? I am using a free version for students.

The free version of Notion should work just fine. That's what I use. 🙂


yes, but the profile selection opens (this could be the problem)

Yes, I think you're on to something here. I assume when you click "Open Zotero" in your browser that you already have Zotero running in the background because that's where you started the Notion connection process, correct? In my experience, if I already have Zotero running but I do something to activate Zotero (like clicking "Open Zotero" here) and it opens the profile selection window, that means it's trying to open a new instance of Zotero instead of the one that's already running.

I'm not very familiar with Windows these days, but it seems like the zotero:// URL protocol might be associated with a different version of Zotero than the one you're running when you start the Notion connection process. Or perhaps there's some difference between how you start Zotero vs how Windows is trying to start it when attempting to open the zotero:// URL. Maybe running as admin vs non-admin?

@dvanoni dvanoni changed the title Zotero Not Connecting to Notion Database (multiple devices) Notion connection fails to complete in Zotero Jan 28, 2025
@mpatca
Copy link

mpatca commented Jan 28, 2025

Thanks again for the quick and detailed explanation, dvanoni.

Based on your screenshot, it does look like the internal integration token you added is connected to your Notion workspace, so that's good. It appears you might just need to share your Notion database with the internal integration you created. You should be able to select it from the "Connections" menu in your Notion database. See step 4 in the "Configure Notion" section of the v0.6.8 README.

Just as you described, I only had to share the created internal integration with the Notion database. That was done quickly.

I am more of a tinkerer than an expert. So here again just a guess: I have a batch file that starts the profile selection and that then also seems to start Windows via the URL protocol. And then it is exactly as you described here:

I assume when you click "Open Zotero" in your browser that you already have Zotero running in the background because that's where you started the Notion connection process, correct? In my experience, if I already have Zotero running but I do something to activate Zotero (like clicking "Open Zotero" here) and it opens the profile selection window, that means it's trying to open a new instance of Zotero instead of the one that's already running.

Here is a screenshot that seems to confirm the assumption of the cause, because creating the connection to Notion seems to have worked as it is supposed to in the newer version.

Image

So it should be possible to solve the problem by linking the URL protocol directly to the Zotero.exe again. But now that it works, I'm happy and don't need to experiment any further. :)

Thanks for the help in solving my problem!

@ivrolan
Copy link

ivrolan commented Jan 28, 2025

Hi all,

To add my experience to the hread, I had a similar problem in Firefox with Ubuntu22. After completing the connection, I was prompted to Open Zotero, but Zotero did not open.

First I had Zotero installed with the tarball. In Firefox, I chose the /opt/zotero/zotero as the application to open zotero links. Nothing happened when opening the link. In Notion, the application appeared as connected and autorized. However, on Zotero, when pressing Sync To Notion, an error popped up.

Then I installed the .deb files as suggested, and chose the new location /usr/bin/zotero to open the zotero links, but it did not work neither.

Finally, I just tried with Chrome. Logged in Notion and go to Notero plugin preferences to connect again. After completing selecting the pages to give access, Chrome opened automatically the link. So in my case it was a Firefox and Zotero problem.

Thanks for your quick assistance with the previous responses!

@dvanoni
Copy link
Owner

dvanoni commented Jan 28, 2025

Thanks for all the great input, everyone!

It appears the handling of zotero:// URLs is more nuanced and complicated than I realized. My goal with revamping the Notion connection process in v1.0.0 was to simplify the experience, but unfortunately it does currently rely on the zotero:// URLs opening as expected.

I'm glad folks have found ways to get this working, though I would like to try to improve the experience. Ultimately, I just need to get the Notion token response passed back into Zotero somehow.

Any thoughts on doing something like the following with an accompanying input field in Zotero where you could paste this value?

Image

@dvanoni dvanoni pinned this issue Jan 28, 2025
@bebinca
Copy link
Author

bebinca commented Feb 1, 2025

Thank you for the detailed instructions! I tried the second option (pasting the integration secret), and it worked perfectly.

@powmod
Copy link

powmod commented Feb 21, 2025

I'm still having the same problem in Ubuntu.
Tried two browsers (Firefox and Brave) but the link didn't open on both.
Tried the method suggested in #639 (comment) but I now have the option to "Upgrade Connection", which leads back to the problem of not being able to open the link.
The option to select the database if greyed out.

@dvanoni
Copy link
Owner

dvanoni commented Feb 21, 2025

Once you've added an internal integration secret into the config editor, you can ignore the "Upgrade Connection" button for now.

@powmod, are you seeing an error message under the database dropdown?

For example, in the screenshot below, the "No Notion databases are accessible" message means that the Notion database needs to be connected to the internal integration. This can be done from the "Connections" menu on the Notion database.

Image

@emes81

This comment has been minimized.

@dvanoni

This comment has been minimized.

@powmod
Copy link

powmod commented Feb 24, 2025

@dvanoni The only way to solve the problem was by installing both Firefox and Zotero through flatpak instead of snap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

7 participants