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

Bug in the CodePath from the changes of new Uri #595

Open
kwangchoiaderant opened this issue Apr 9, 2024 · 0 comments
Open

Bug in the CodePath from the changes of new Uri #595

kwangchoiaderant opened this issue Apr 9, 2024 · 0 comments

Comments

@kwangchoiaderant
Copy link

kwangchoiaderant commented Apr 9, 2024

What version of SQLitePCLRaw are you using?
2.1.8.2226

If you are using one of the SQLitePCLRaw bundle packages, which one?
Microsoft.Data.Sqlite.Core

What platform are you running on? What operating system? Which version? What CPU?
Windows 10

What target framework are you building for?

Are you on .NET Framework or the newer stuff (.NET Core, .NET 5+, etc)?
.NET Framework

Are you using the command line, or an IDE? Which IDE? Which version of that IDE?
VS 2022

Is this problem something that just started happening? For example, were things working well for you and then you updated something and then the problem showed up? What changed?

Limit use of CodeBase to .NET Framework. · ericsink/SQLitePCL.raw@6f70157 (github.com) broke how the SQLite handles the path. GetDirectoryName will strip the backward slashes from CodeBase – as it should as Windows paths support a single backwards slash, which creates an invalid Uri as the scheme for a file uri is file:\ not file:\ and it all goes south from there.

What is the exact error message you are seeing when the problem happens?
Invalid URI: The Authority/Host could not be parsed.
Message: Invalid URI: The Authority/Host could not be parsed.
Exception Type: System.UriFormatException
Source: System
Help Link:
Trace: at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at SQLitePCL.NativeLibrary.MakePossibilitiesFor(String basename, Assembly assy, Int32 flags, LibSuffix suffix)
at SQLitePCL.NativeLibrary.MyLoad(String basename, Assembly assy, Int32 flags, Action`1 log)
at SQLitePCL.NativeLibrary.Load(String libraryName, Assembly assy, Int32 flags)
at SQLitePCL.Batteries_V2.MakeDynamic(String name, Int32 flags)
at SQLitePCL.Batteries_V2.DoDynamic_cdecl(String name, Int32 flags)
Target: CreateThis

Are you using PackageReference or packages.config?

If you are using mobile platforms, are you on classic/legacy Xamarin or on .NET 6 and higher?

Sometimes other packages using SQLitePCLRaw cause problems when they are mixed together. What other packages are you including in your project?

How can we reproduce the problem you are seeing? Your issue will get attention much faster if you attach a minimal reproduction sample project.

  1. Try to create connection via UNC path
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

1 participant