riok / Kreya

Kreya is a GUI client for gRPC and REST APIs with innovative features for environments, authorizations and more.
https://kreya.app
279 stars 5 forks source link

"Could not find file LoginService.krcol" after switching from stable to beta channel #215

Closed sgielen closed 2 months ago

sgielen commented 3 months ago

Describe the bug I just switched Kreya from the stable to the beta channel. Most RPCs worked properly but when using a new RPC suddenly this error popped up.

System.IO.FileNotFoundException: Could not find file '/Users/sjors/<snip>/kreya/LoginService.krcol'.
File name: '/Users/sjors/<snip>/kreya/LoginService.krcol'
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.File.OpenRead(String path)
   at System.IO.Abstractions.FileWrapper.OpenRead(String path)
   at Kreya.Data.FileSystem.FileService.ReadJson[T](String path)
   at Kreya.Data.OperationCollectionStorage.LoadDetail(IProject project, String path)
   at Kreya.Core.Operations.OperationCollectionService.Load(String path)
   at Kreya.UI.Invoker.OperationCollectionUiService.Load(String path)
   at SpiderEye.Bridge.ApiMethod.InvokeAsync(Object instance, Object parameter)
   at SpiderEye.Bridge.WebviewBridge.InvokeWithDependencyInjection(IDependencyInjectionApiMethod apiMethod, Object parameters)
   at SpiderEye.Bridge.WebviewBridge.InvokeWithDependencyInjection(IDependencyInjectionApiMethod apiMethod, Object parameters)
   at SpiderEye.Bridge.WebviewBridge.ResolveCall(String id, String parameters)

Environment (if possible, copy the information from the error dialog or the About menu):

{
  "kreyaVersion": "1.14.0-beta.2",
  "releaseChannel": "beta",
  "osDescription": "Darwin 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000",
  "osVersion": "Unix 14.3.1",
  "osArch": "Arm64",
  "processArch": "Arm64",
  "runtimeIdentifier": "osx-arm64",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)"
}
sgielen commented 3 months ago

It looks like the RPC did succeed normally, though. The error also does not reoccur when I perform the RPC again, so it's not blocking.

Looks like I get this error exactly once per new RPC I perform after switching to the beta channel.

CommonGuy commented 3 months ago

Hi and thanks for reporting this bug. LoginService.krcol implies that Kreya tried to open a Collection (krcol file extension).

Can you reproduce this bug consistently? If so, how?

sgielen commented 3 months ago

Can you reproduce this bug consistently? If so, how?

I can reproduce it consistently, but only exactly once per new RPC I try to run, simply by sending the RPC. Luckily, we have a lot of them so I can reproduce for the forseeable future.

I'm not sure what a Kreya Collection is, I wasn't aware I was using this feature. I am sending gRPC-Web requests loaded from a .proto file.

sgielen commented 3 months ago

I expect this bug will have to do with my current Kreya project state, so I'm not sure if the reproduction steps are complete, but I simply open Kreya, browse to any of my gRPC-Web methods by double-clicking one of them in the RPC browser to the left. Then, for all of them, Kreya typically already has the last Request I used loaded, so I just click Send. This then pops up the error, and when I dismiss it, the Response shows the gRPC-Web response as expected.

CommonGuy commented 3 months ago

Ah, I managed to reproduce this. We will fix this in the next release

CommonGuy commented 2 months ago

Kreya 1.14 has been released