|
Rank: Newbie Groups: Member
Joined: 2/25/2021 Posts: 4
|
I'm testing creating the browser view from a C# .net class library.
The test code is super simple at this point:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using EO.WebBrowser;
namespace FloatingBrowserWindow { public class MyBrowserWindow { public MyBrowserWindow() { ThreadRunner threadRunner = new ThreadRunner(); WebView webView = threadRunner.CreateWebView(); threadRunner.Post(() => { webView.LoadUrl("https://www.google.com"); });
} } }
When attempting to create the class, I receive the following error:
ArgumentException: Illegal characters in path. EO.Base.ThreadRunnerBase+mjei.focl (System.Int32 lwy, System.Boolean& lwz) (at <119be43d8622b09d0b832b7827fd1d81>:0) EO.Base.ThreadRunnerBase.Send (EO.Base.ActionWithResult action, System.Int32 timeoutInMS, System.Boolean& done) (at <119be43d8622b09d0b832b7827fd1d81>:0) EO.Base.ThreadRunnerBase.Send (EO.Base.ActionWithResult action, System.Int32 timeoutInMS) (at <119be43d8622b09d0b832b7827fd1d81>:0) EO.Base.ThreadRunnerBase.Send (EO.Base.ActionWithResult action) (at <119be43d8622b09d0b832b7827fd1d81>:0) EO.WebBrowser.ThreadRunner.Send (EO.WebBrowser.WebViewCallback callback, EO.WebBrowser.WebView webView, System.Object args) (at <e306c692b242fd13cc2d99725abd1e05>:0) EO.WebBrowser.ThreadRunner.tkmr (System.Int32 aaa, System.Int32 aab, System.Boolean aac, EO.WebEngine.BrowserOptions aad) (at <e306c692b242fd13cc2d99725abd1e05>:0) EO.WebBrowser.ThreadRunner.CreateWebView (EO.WebEngine.BrowserOptions options) (at <e306c692b242fd13cc2d99725abd1e05>:0) EO.WebBrowser.ThreadRunner.CreateWebView () (at <e306c692b242fd13cc2d99725abd1e05>:0) FloatingBrowserWindow.MyBrowserWindow..ctor () (at <df21b65bfa054eadbf4da2ff2f373cde>:0) TestBrowser.Start () (at Assets/TestBrowser.cs:11)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
Where do you put our DLL files?
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/25/2021 Posts: 4
|
they are in the same directory as the class library DLL. Do they have to be in a known PATH ? Also, I had originally imported the EO webbrowser through nuget in Visual Studio. But I ALSO isntalled the EO. Total installer
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
Your code looks fine. However we do not know what the binary location info (such as <e306c692b242fd13cc2d99725abd1e05>:0) in your stack trace stands for. This error most likely has to do with the location of the DLL. You can try to have everything in a local folder without any kind of special character (not even space, such as c:\Test) and see if it works for you.
The exception stack trace is not the actual location when the exception occurs. You can try to run your app in Visual Studio and make sure you check "ArgumentException" in your exception dialog, then run the app. This way when an ArgumentException first occurs, it would break into the debugger, you can then copy the stack trace at that moment and we will see what we can find.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/25/2021 Posts: 4
|
there is no stack to speak of. The crash is on creating the MyBrowserWindowClass.
Creating the threadrunner works.
But using threadRunner.CreateWebView seems to generate the error regardless of parameters to it.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, I don't think you understood what I told you in my previous reply. There can be two different locations related to an exception. One location is when the exception first occurs (in this case, the ArgumentException exception most likely occurred inside a call to one of System.IO class). Another location is when this exception is reported to you. You provided the stack trace for the second location, but we need the stack trace for the first location. Additionally, we have also asked you to try to put everything in a local folder. Please try that and let us know the result. If the problem continues, please send us a test project and we will look further. See here for more details: https://www.essentialobjects.com/forum/test_project.aspxThanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/25/2021 Posts: 4
|
To clarify, I'm building a Unity plugin.
To simply things for now, I've instead added it to a regular forms app -- I do not get the exception (I don't see a browser open either, but that's a separate question).
Then I tried a console app: I get this exception:
Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Drawing.Common, Version=4.0.2.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified. File name: 'System.Drawing.Common, Version=4.0.2.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' at EO.WebBrowser.WebView.euuz(tppq jp, kudj jq) at EO.WebBrowser.WebView.euwb(tppq ls, kudj lt) at EO.WebBrowser.WebView.euwa(tppq lq, kudj lr)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, As to the plugin, you may want to contact Unity for additional information. It appears that they have loaded our DLLs from memory. Our DLLs MUST be physical files. They can not be loaded from memory without physical file present. As to System.Drawing.Common error, please see steps here: https://www.essentialobjects.com/doc/common/dotnetcore.aspxThanks!
|
|