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

EdgeFavourites not executing #5

Closed
Berserker2251 opened this issue Jan 7, 2024 · 11 comments
Closed

EdgeFavourites not executing #5

Berserker2251 opened this issue Jan 7, 2024 · 11 comments

Comments

@Berserker2251
Copy link

Knowing that this is experimental, if this stops working due to a reset of edge, how would I make it work?

Recently for a reason I had to reset edge and after doing so it didn't work. Tried removing the file and re-extracting to the destination, still no luck.

If there is a workaround for this issue by editing a file under the folder with some assistance would be nice

Thank you in advance

@davidegiacometti
Copy link
Owner

davidegiacometti commented Jan 7, 2024

Hi @Berserker2251

Which version of Edge are you using?
... (3 dots menu) > Help and feedback > About Microsoft Edge

Can you also attach here the PowerToys Run log? %LOCALAPPDATA%\Microsoft\PowerToys\PowerToys Run\Logs\0.76.2.0\2024-01-07.txt. Ensure to change your PowerToys version in the path if different than 0.76.2.0.

@Berserker2251
Copy link
Author

Edge Version 120.0.2210.121 (Official build) (64-bit)

FYI, Powertoys just updated from 0.76.2.0 to 0.77.0
2024-01-07.txt

@davidegiacometti
Copy link
Owner

There are some errors related to the file used by Edge to store favorites.

[2024-01-07 20:32:05.3217] [WARN] [D:\a\PowerToys-Run-EdgeFavorite\PowerToys-Run-EdgeFavorite\Community.PowerToys.Run.Plugin.EdgeFavorite\Helpers\FavoriteProvider.cs::40]
Failed to find bookmarks file C:\Users\lddha\AppData\Local\Microsoft\Edge\User Data\Default\Bookmarks
System.UnauthorizedAccessException: Access to the path 'C:\Users\lddha\AppData\Local\Microsoft\Edge\User Data\Default\Bookmarks' is denied.
   Source: System.Private.CoreLib
   TargetAssembly: System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
   TargetModule: System.Private.CoreLib.dll
   TargetSite: Microsoft.Win32.SafeHandles.SafeFileHandle CreateFile(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, System.IO.FileOptions)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
   at Community.PowerToys.Run.Plugin.EdgeFavorite.Helpers.FavoriteProvider.InitFavorites()
   at Community.PowerToys.Run.Plugin.EdgeFavorite.Helpers.FavoriteProvider.<.ctor>b__5_0(Object s, FileSystemEventArgs e)
   at System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(WatcherChangeTypes changeType, ReadOnlySpan`1 name)
   at System.IO.FileSystemWatcher.ParseEventBufferAndNotifyForEach(ReadOnlySpan`1 buffer)
   at System.IO.FileSystemWatcher.ReadDirectoryChangesCallback(UInt32 errorCode, UInt32 numBytes, AsyncReadState state)
   at System.IO.FileSystemWatcher.<>c.<StartRaisingEvents>b__85_0(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.PortableThreadPool.IOCompletionPoller.Callback.Invoke(Event e)
   at System.Threading.ThreadPoolTypedWorkItemQueue`2.System.Threading.IThreadPoolWorkItem.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

Can you check if you have the following files and its permissions? Are you able to open it with notepad?
C:\Users\lddha\AppData\Local\Microsoft\Edge\User Data\Default\Bookmarks

@Berserker2251
Copy link
Author

It seems that the folder is existing but no file is within the folder. If I delete the folder and restart would it work properly?

@davidegiacometti
Copy link
Owner

Wondering something happened to the Edge profile during edge reset but I can't give you assistance for this.

Can you type edge://version/ in Edge address bar and paste here the value of the Profile path property?
For me is set to the file where the plugins read the bookmarks file: C:\Users\david\AppData\Local\Microsoft\Edge\User Data\Default. I guess you may have a different folder.

@Berserker2251
Copy link
Author

Yeah, it seems mine is not 'Default'. It has changed to 'Profile 1'

Profile path : C:\Users\lddha\AppData\Local\Microsoft\Edge\User Data\Profile 1

Just renaming the access folder to this path would do the job wouldn't it?

@davidegiacometti
Copy link
Owner

I don't think so and unfortunately I can't provide assistance to change the profile.

The plugin is currently supporting only the default profile.
Implementing #6 would definitely help.

@Berserker2251
Copy link
Author

No problem, thank you of your assistance anyway. 🙂

This is something I would hope to see would come to Powertoys as this is the most beneficial addon for Powertoys Run.
Until that, will be waiting till the multiple profiles support update happens.

@davidegiacometti
Copy link
Owner

Hi @Berserker2251

I have just released a pre-release of the plugin that introduce the support for multiple Edge profiles and it should also fix your case: https://github.com/davidegiacometti/PowerToys-Run-EdgeFavorite/releases/tag/0.3.0

Any feedback would be appreciated.

@Berserker2251
Copy link
Author

Yes, it worked. Thank you for fixing my issue.

This one is just a suggestion,
if you could add support to previewing thumbnails of the bookmarks it would be nice

I'll keep you posted if any other issue comes up.

@davidegiacometti
Copy link
Owner

@Berserker2251 I am glad that it's working! 🚀

I have already looked into thumbnails, but prefer not to implement them for now.
If I change my ideas, I will include them in a future upgrade. Thanks for your understanding! 😊

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

No branches or pull requests

2 participants