question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Strong name signature could not be verified.

See original GitHub issue

Hello,

I am trying to attach playwright 0.180.0 into my existing project on .Net Framework and I am receiving following error when trying to execute some basic test:

Error message:

System.IO.FileLoadException : Could not load file or assembly 'PlaywrightSharp, Version=0.180.0.0, Culture=neutral, > > PublicKeyToken=db12f80f85d8ba23' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)

Sample code:

        [Fact]
        public async Task Test1()
        {
            IPlaywright playwright = await Playwright.CreateAsync();
            PlaywrightSharp.Chromium.IChromiumBrowser browser = await playwright.Chromium.LaunchAsync();
            var page = await browser.NewPageAsync();
            await page.GoToAsync("http://www.bing.com");
            await page.ScreenshotAsync(path: "");
        }

It will be cool to give it a try. 😉

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:27 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
avodovnikcommented, Jun 18, 2021

@SimonCropp Indeed, we use PublicSign. sn will return an error, however, the relevant bit is set and the assembly is marked as signed, which you can verify:

> CorFlags.exe .\Microsoft.Playwright.dll
Microsoft (R) .NET Framework CorFlags Conversion Tool.  Version  4.8.3928.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Version   : v4.0.30319
CLR Header: 2.5
PE        : PE32
CorFlags  : 0x9
ILONLY    : 1
32BITREQ  : 0
32BITPREF : 0
Signed    : 1

Technically, for OSS projects, this seems to be the way to go. However, the following is called out as a problem:

  • You will not be able to install the assembly to the Global Assembly Cache (GAC)
  • You will not be able to load the assembly in an AppDomain where shadow copying is turned on.
  • You will not be able to load the assembly in a partially trusted AppDomain

I wonder if any of the above might be the cause of the validation error @12masta was seeing though?

0reactions
avodovnikcommented, Jul 5, 2021

Closing this issue for now, as the original problem is fixed. Feel free to open new issues, if you encounter them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix, Could not load file or assembly 'XXX' or one of ...
How to Fix, Could not load file or assembly 'XXX' or one of its dependencies. Strong name signature could not be verified ·...
Read more >
[BUG] Strong name signature could not be verified #1767
I managed to locate the cause of the signing failing. It is 100% human error obscured by incremental builds. The cause of the...
Read more >
How to: Disable the strong-name bypass feature | ...
When you override the bypass feature, the strong name is validated only for correctness; it is not checked for a StrongNameIdentityPermission.
Read more >
The "Could not load file or assembly 'X' or one of its ...
Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed...
Read more >
Debugging Microsoft assemblies? Disable strong signing first
Woohoo, lets debug open source projects with strong signed assembliesWhile experimenting ... Strong name signature could not be verified.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found