-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
error when build native aot with selenium dotnet 7 #86202
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsDescriptionerror when i run it Reproduction Stepsbuild native aot Expected behaviorrunning succesfully Actual behaviorerror Regression?No response Known Workaroundsno Configuration.net 7 Other informationNo response
|
NativeAOT does not support GetCallingAssembly. Either its support will be added as part of #69919 or this API will be obsoleted altogether in favor of Roslyn feature: dotnet/csharplang#4984. |
I don't know how to actually use that function |
Selenium is calling |
How to fix sir, do i need to fix selenium source? |
Yes, making Selenium NativeAOT compatible is the way to go. |
How to making bro,do you can help me |
You can create an issue at https://github.com/SeleniumHQ/selenium/issues for NativeAOT compatibility or reply to this closed issue SeleniumHQ/selenium#8549 with your steps to repro. Someone in their community might be able to help. The version of bazel they are using (rules_dotnet) doesn't support .NET 7 and I'm not familiar with bazel enough to know how to upgrade its rules. It was giving me |
I've submitted a PR to Selenium as SeleniumHQ/selenium#12038 but it looks like it's going to require a CLA signature and I'm not going to authorize a random github app to access my github account to do that. If the PR doesn't go through because they'll insist on the CLA on a de minims change that is not even copyrightable, @NCLnclNCL feel free to submit the same change yourself. I don't care about Selenium, I just wanted to fix this bug. Going to close this as external/dup of #69919. |
@MichalStrehovsky, there are other places using PNSE-throwing APIs. Their build requires bazel in pre-build step to generate code needed by the main build. Without building it locally, it isn't worth pursuing. |
Ah, thanks! I'll just close the PR then. This one looked "obviously wrong" enough that I gave it a go but don't really want to spend time on it. |
You still yet help me |
Help me |
@NCLnclNCL you need to raise this with Selenium. Assembly.GetCallingAssembly is not supported with NativeAOT and we have no plans to add it. |
It looks like Selenium fixed this 3 weeks ago: SeleniumHQ/selenium#12045 |
Description
error when i run it
Reproduction Steps
build native aot
Expected behavior
running succesfully
Actual behavior
error
Unhandled Exception: System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Reflection.Assembly.GetCallingAssembly() + 0x5b
at OpenQA.Selenium.Internal.ResourceUtilities.get_AssemblyVersion() + 0x40
at OpenQA.Selenium.Remote.HttpCommandExecutor..ctor(Uri, TimeSpan, Boolean) + 0xbc
at OpenQA.Selenium.Remote.DriverServiceCommandExecutor..ctor(DriverService, TimeSpan, Boolean) + 0x4d
at OpenQA.Selenium.Chromium.ChromiumDriver..ctor(ChromiumDriverService, ChromiumOptions, TimeSpan) + 0x44
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService, ChromeOptions) + 0x26
Regression?
No response
Known Workarounds
no
Configuration
.net 7
win 10
x64
Other information
No response
The text was updated successfully, but these errors were encountered: