alfred-microsoft-onenote-navigator
alfred-microsoft-onenote-navigator copied to clipboard
"We couldn't open that location."
I'm able to browse my notebooks, but attempting to open any page / section raises an error: "We couldn't open that location. It might not exist or you might not have permission to open it. Please contact the owner of [onenote: URL] for more information."
Thanks! Excited about getting this to work!
@matthauger were you able to figure it out by any chance? I thought it might be permissions but Alfred4 has full disk access on my Mac
@vic-by No luck from my end, but I haven't really tried troubleshooting.
@kevin-funderburg
I tried to play with seturl
links with no luck. It points to Sharepoint cloud location:
onenote:https://<..>.sharepoint.com/personal/<..>/Documents/<Notebook name>/
Any ideas why it won't work?
installed Alfred4 and this extension from scratch on another Mac and with a different OneNote account - same error.
@vic-by sorry for super delayed response! But from my experience that message "We couldn't open that location" means the link is "spelled" wrong actually. if you can, open the workflow in the Alfred editor, turn on debugging and run the workflow, and copy the last line that should look like this:
[19:31:27.216] OneNote Navigator[Launch Apps / Files] Passing output 'onenote:https://d.docs.live.net/9478a1a4ec3795b7/Documents/Mac/Applications.one'
I bet the url is not escaped properly or something like that, run the workflow a few times with different pages and let me know what it says and I'll try to figure it out
no worries @kevin-funderburg, thanks for looking into this.
21:00:29.235] OneNote Navigator[Launch Apps / Files] Passing output 'onenote:https://<my company name>-my.sharepoint.com/personal/<my path>/vic_by @ Work/Meetings.one' to Open URL
When I paste the link (without "onenote:") in browser it downloads Meetings.one file from Sharepoint.
Update: the downloaded Meetings.one file has just one line of text in it "404 NOT FOUND". Same for another section I tried to download.
@kevin-funderburg
Copy Link To Notebook from OneNote app returns this:
https://<my company>-my.sharepoint.com/personal/<path>/_layouts/OneNote.aspx?id=%2Fpersonal%2F<path>%2FDocuments%2Fvic_by%20%40%20Work onenote:https://<my company>-my.sharepoint.com/personal/<path>/Documents/vic_by%20@%20Work/
If I paste either the first part of the link (starts with https) or the second part (starts with leading onenote which I don't copy) in a browser both open web version of OneNote.
@vic-by yeah that seems to be the issue honestly, so here's what my link(s) look like when I do Copy Link to Notebook:
https://onedrive.live.com/edit.aspx/Documents/School?cid=9478a1a4ec3795b7&id=documents onenote:https://d.docs.live.net/9478a1a4ec3795b7/Documents/School/
The one starting with onenote:
will open the app itself while the other opens the web app. The way I have the script set up is to parse that onenote link and use that as the url base to build the urls for the rest of the sections. That sharepoint
thing is definitely the culprit, but I honestly don't know why yours does that and mine doesn't. I'll snoop around and try to get an answer
UPDATE: After looking around, it seems like the sharepoint
occurs when the notebook has been "shared". Do you recall doing that? Or was that notebook shared with you possibly?
@kevin-funderburg right.
so this is the difference between the Copy Link To Notebook (1st line) and the one from the Workflow:
onenote:https://<my company>-my.sharepoint.com/personal/<path>/Documents/vic_by%20@%20Work/
onenote:https://<my company>-my.sharepoint.com/personal/<path>/vic_by @ Work/Meetings.one
Two differences:
- Document part missing in the Workflow path
- Spaces passed in the Workflow one as they are instead of their code %20 in the original one
@vic-by I see. If you just paste the result of 'Copy Link to Notebook' into Alfred and press return, does it open the OneNote app itself? Or go to the website?
Also, the way the workflow is set up just to get the URL string (not encoded) and pass it in quotes to the 'Open URL' action in Alfred, and that action encodes the spaces for %20
@matthauger
- if I paste the whole link (both parts) or only the first part it goes to the website but returns "Sorry, something went wrong" page.
- If I paste the second part: 2.1. Without "onenote:" prefix it goes to the website and opens the page 2.2. With "onenote:" prefix it passes the link to Google search in a browser
BTW MS OneNote dropped local files support starting with some version (mine is 16.29 for Mac) and now only works with OneDrive/Sharepoint locations. I tried to open the downloaded .one file and it cannot.
hmm, I'm on 16.29 as well and mine still works great. the way that the urls are built is just off of a plist supplied by onenote that's used for the share menu when sending stuff to it so I'm not sure why yours would generate the sharepoint part and mine wouldn't.
@vic-by yeah that seems to be the issue honestly, so here's what my link(s) look like when I do Copy Link to Notebook:
https://onedrive.live.com/edit.aspx/Documents/School?cid=9478a1a4ec3795b7&id=documents onenote:https://d.docs.live.net/9478a1a4ec3795b7/Documents/School/
The one starting with
onenote:
will open the app itself while the other opens the web app. The way I have the script set up is to parse that onenote link and use that as the url base to build the urls for the rest of the sections. Thatsharepoint
thing is definitely the culprit, but I honestly don't know why yours does that and mine doesn't. I'll snoop around and try to get an answerUPDATE: After looking around, it seems like the
sharepoint
occurs when the notebook has been "shared". Do you recall doing that? Or was that notebook shared with you possibly?
no, I did not share the notebook for sure. I tried to later when the Alfred Workflow did not work but the issue was there already. Right now the OneNote file and Folders (Sections) show Private in Sharing column.
@vic-by , after doing some reading, what may be happening is that your one note notebook is either currently being stored in microsoft's Sharepoint Online server, or was at least created within the server which is why your urls are created that way. From what I read, it seems the solution is to get your notebook out of sharepoint and onto OneDrive >> Move a OneNote notebook to OneDrive.
This seems logical and it's how my mac is set up as well:
If that's the reason and you decide to go through with it I hope that works and let me know!
In the meantime I'm going to add a trap to look for those sharepoint urls to at least report the error correctly.
FWIW, nearly all of my OneNote notebooks are collaborative via SharePoint Online, but even the ones I store in my personal OneDrive space throw the same error. Let me know if there's anything I can do to help troubleshoot?
On Mon, Oct 14, 2019 at 11:46 PM Kevin Funderburg [email protected] wrote:
In the meantime I'm going to add a trap to look for those sharepoint urls to at least report the error correctly.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kevin-funderburg/alfred-microsoft-onenote-navigator/issues/4?email_source=notifications&email_token=ADXSKQTAMA23A7HATAMMKVLQOU4JPA5CNFSM4IXHFMIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBHJ5KA#issuecomment-542023336, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXSKQSSRRDIQRPRWC2XSVDQOU4JPANCNFSM4IXHFMIA .
@kevin-funderburg the notebook is in OneDrive:
@kevin-funderburg, @matthauger, @vic-by - I'm having the same issue. I tried with a new notebook created on OneDrive, but I still get the sharepoint link. I think that most O365 Enterprise customers still have their OneDrive storage sitting on Sharepoint infrastructure. MS has been slow to migrate.
Good news is I have a simple, working, partial fix. I'll make a pull request in a minute, but it's just 2 lines added at line 78:
if "sharepoint" in url[2]:
urlbase += url[5] + "/"
With this fix, you can paste the url copied straight from OneNote, and it works as expected.
I say partial, because after successfully testing with several notebooks in my account, it did not work with notebooks shared with me, as those have a different base url.