wrjlewis / notion-search-alfred-workflow

An Alfred workflow to search Notion with instant results
GNU General Public License v3.0
825 stars 41 forks source link

Notion Search seems not working...... ( it worked for the first few times) #28

Closed jerryyang0611 closed 3 years ago

jerryyang0611 commented 3 years ago

Describe the bug I've followed through the process by README.md and filled up my cookie and notionSpaceId, it worked the first few times but didn't work a few days later. ( I didn't change any variables.) (I'm running on macOS Catalina 10.15.6.)

To Reproduce Steps to reproduce the behaviour:

  1. Type 'no' and the keyword I wanna search (I've changed the workflow keyword to "no").
  2. No result is showing, when I pressed ↵ enter, it didn't show anything
  3. Didn't find any error in the debug mode.

Expected behaviour A few days ago, the search result showed properly but a bit slow. However, another day later the searching seems not yet working since then. (I didn't change any variables further.)

Screenshots The searching command:

Screen Shot 2021-03-20 at 3 05 35 PM

My variables:

Screen Shot 2021-03-20 at 3 06 30 PM

The debug: (no error) image

Workflow (please complete the following information):

Additional context Add any other context about the problem here.

wrjlewis commented 3 years ago

Hey!

Depending on how many pages in your notion workspace, the search api call to notion can be quite slow and take 5-10 seconds to return.

If it was working before for you, I would try copying the cookie again and pasting it into the respective environment variable. Sometimes you session is reset by Notion and the only solution is to copy the new cookie over, I'm not sure exactly what causes this but it seems to happen very infrequently.

Please update if that solves it for you.

Thanks

jerryyang0611 commented 3 years ago

Thx so much for the feedback. However, this happened to me pretty much every single day recently. It may be working perfectly fine a day before, but wake up another morning; it doesn't seem to work (even I changed the chrome cookie).

Is there a waiting time for the notion to load the cookie to let this notion search workflow work when resetting variables? My notion pages are around 25-30; is this considered "many" pages for the notion API call? (when it's working, it normally takes 2-3 secs to pop up) so I don't think is this kind of problem. And, sadly, I didn't see any comments on the Alfred forum similar to my situation. :(

For the "Open URL", do I need to set the URL: to notion://www.notion.so/ if I wanna open in notion app? (doesn't seem to work when I set so..)

Screen Shot 2021-03-23 at 10 15 54 AM

Thanks

wrjlewis commented 3 years ago

It may be working perfectly fine a day before, but wake up another morning

Just to check, do you manually log out, or does anyone else log in on the same browser? Just curious because if it sometimes works then clearly the way you are inserting the cookie is correct and it seems that the issue is with Notion invalidating your token; which can be due to a logout action perhaps.

Is there a waiting time for the notion to load the cookie to let this notion search workflow work when resetting variables?

No there isn't.

My notion pages are around 25-30; is this considered "many" pages for the notion API call?

25-30 pages should not cause an above average response, as that is not a large workspace.

For the "Open URL", do I need to set the URL: to notion://www.notion.so/ if I wanna open in notion app? (doesn't seem to work when I set so..)

No, you should leave this empty. There is an environment variable built in to this workflow which specifies if you want to open links in the desktop app or a web browser: 'useDesktopClient', I can see you have yours set to true in the previous screenshot you provided

wrjlewis commented 3 years ago

Hi, others have had success by logging out, logging in, and updating the cookie in the environment valuables. For now I am going to close this issue since there has not been any activity for a while.