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

"No results - go to Notion homepage" after fresh install #23

Closed vlflorian closed 3 years ago

vlflorian commented 3 years ago

Describe the bug Hi, I followed the steps from the readme: installed the workflow, copied my pageId and cookie from the request body and request headers, pasted into the workflow config in Alfred, but when I try to search something I get "No results - go to Notion homepage". enableIcons is set to True, just like isNavigableOnly and useDesktopClient.

To Reproduce Steps to reproduce the behaviour:

  1. Follow the steps in the readme.

Expected behaviour Search results popping up.

Screenshots

image

Workflow (please complete the following information):

Additional context Add any other context about the problem here.

vlflorian commented 3 years ago

I re-entered my pageId and cookie for the third time and now it works. I copied the request headers and request body to sublime text before copying whereas before I copied them straight from the dev tools, so I guess something went wrong there.

Sorry for opening an issue when it was my own fault (though I guess some kind of error message would have been useful).

wrjlewis commented 3 years ago

Thanks for raising this and I'm glad it's working now!

It would be awesome to have an error message in these scenarios. Unfortunately the response received from Notion when you have an invalid cookie is exactly the same as the response for when you have no results (but a valid cookie). Makes it impossible to determine if there is an authentication issue with the cookie.

cosmogrillny commented 3 years ago

I had the same issue, @wrjlewis , I think that's worth mentioning in the main page that it could be a possible bug. I tried copying directly from the dev console and I didn't get any results, and then I read this comment and tried copying the space ID and cookie to TextEdit and then to the Alfred settings and it worked.

Thanks for building this man!! :)

wrjlewis commented 3 years ago

Thanks for the +1 and heads up. I've always copied directly from dev tools in Chrome. I wonder why that doesn't work in your situation and others.

Perhaps something to do with the formatting that's being copied along with it from dev tools, since for other use-cases it can be useful to copy text first to a text editor as an intermediary to strip the text back to plain text.

In any case I'll put a warning up in the readme. Though any additional information here would be extremely useful, especially if you can test the difference between the copied text from dev tools, and the copied text from TextEdit.

Thanks